{
    "componentChunkName": "component---src-templates-post-js",
    "path": "/serverless-marketing-automation",
    "result": {"data":{"site":{"siteMetadata":{"title":"your friend Joel's digital garden","description":"Articles and notes from a collaborator at egghead.io. Musings on software, business, and life from a skilled virtual assistant.","author":{"name":"Joel Hooks"},"keywords":["Video Blogger"]}},"mdx":{"excerpt":"Tools like  Convertkit  provide a lot of powerful tools you can use for marketing automation, but as a developer I want to goa layer deeper and find that using serverless functions with a framework like Next.js provides immense power to…","fields":{"github":"https://github.com/joelhooks/joelhooks-com/tree/master/content/blog/2021-02-17--serverless-marketing-automation-with-convertkit-and-nextjs~~UpFuf0CFx/index.mdx"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"id\": \"UpFuf0CFx\",\n  \"slug\": \"serverless-marketing-automation\",\n  \"date\": \"2021-02-17T00:00:00.000Z\",\n  \"title\": \"Serverless Marketing Automation with Convertkit and Next.js\",\n  \"published\": false\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar ResponsiveEmbed = makeShortcode(\"ResponsiveEmbed\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Tools like \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://convertkit.com?lmref=ia534A\"\n  }, \"Convertkit\"), \" provide a lot of powerful tools you can use for marketing automation, but as a developer I want to goa layer deeper and find that using serverless functions with a framework like Next.js provides immense power to customize automation.\"), mdx(\"p\", null, \"In \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.learnwithjason.dev/serverless-marketing-automation-for-react\"\n  }, \"this episode of Learn with Jason\"), \", I guide Jason through subscribing somebody to his email list, setting a cookie with their Convertkit ID, and then using that ID to load the subscriber from Convertkit anywhere in his application via a React Context and a custom React Hook.\\nimport ResponsiveEmbed from \\\"react-responsive-embed\\\";\"), mdx(ResponsiveEmbed, {\n    src: \"https://www.youtube.com/embed/5g11ejiA-ec\",\n    allowFullScreen: true,\n    mdxType: \"ResponsiveEmbed\"\n  }), mdx(\"p\", null, \"This approach is inspired by \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://createandsell.co/courses/mastering-convertkit?ref=joelhooks\"\n  }, \"the fundamentals that Brennan Dunn teaches in his amazing Mastering Converkit workshop\"), \" which I highly recommend.\"));\n}\n;\nMDXContent.isMDXComponent = true;","frontmatter":{"title":"Serverless Marketing Automation with Convertkit and Next.js","date":"February 17, 2021","banner":null,"slug":"serverless-marketing-automation","keywords":null}}},"pageContext":{"id":"c40958ff-ffc8-568d-916b-02b2214fdde1","prev":{"id":"02611702-40fa-5b7d-a03e-774f4d2c3f19","parent":{"name":"index","sourceInstanceName":"blog"},"excerpt":"If you want to generate a (pseudo) random number using a Liquid filter in  Convertkit , here's the code: What's actually going on here? This is a complex liquid template, so let's break it down, starting from the right and working our way left. using…","fields":{"title":"Using a Random Number to Segment Emails in ConvertKit Automations using Liquid","slug":"random-number-convertkit-liquid","date":"2021-03-09T00:00:00.000Z"}},"next":{"id":"58e37861-9594-58a9-a764-405a25e1d9f5","parent":{"name":"index","sourceInstanceName":"blog"},"excerpt":"Over the last few years, we've done  a lot  of  React . Which is great. I love using React personally, and building  egghead-next  using Next.js and TypeScript has been fantastic. This year we'd like to give some of the other great frameworks and…","fields":{"title":"What to Teach Web Developers in 2021","slug":"what-to-teach-web-developers-in-2021","date":"2021-01-08T00:00:00.000Z"}}}},
    "staticQueryHashes": ["1045846374"]}