{"name":"Turn a Notion content calendar into social graphics with Templated","nodes":[{"parameters":{"content":"## Turn your Notion content calendar into social graphics\nFor marketing and social teams that plan posts in Notion and want every post's graphic made on brand, without a designer.\n\n### How it works\n1. **Notion Trigger** checks your content calendar database every minute for updated pages.\n2. **Config** holds the values you set once: your Templated template ID and the status names.\n3. **Status is Ready** lets only pages marked Ready continue.\n4. **Templated** fills your template with the page's title, subtitle, image and channel and renders a JPG.\n5. **Save graphic to Notion** writes the image link to the Graphic property and moves the Status to Designed, so the page is not rendered twice.\n\n### Requirements\n- A [Templated](https://templated.io) account (the free plan includes 50 renders) and a template with layers named `headline`, `subtitle`, `photo` and `tag`.\n- The Templated community node, package `n8n-nodes-templated`, verified by n8n. Install it from the nodes panel (search \"Templated\"), see [n8n.io/integrations/templated](https://n8n.io/integrations/templated/). Tested with version 0.4.6 on n8n 2.48.7 and 1.100.0.\n- A Notion database with these properties: `Name` (title), `Subtitle` (text), `Image URL` (URL), `Channel` (select), `Status` (status, with the options Ready and Designed) and `Graphic` (URL), shared with your Notion integration.\n\n### Setup\n1. Add your Notion credential to **Notion Trigger** and **Save graphic to Notion**, and pick your database in the trigger.\n2. Add your Templated API key from [app.templated.io/api-key](https://app.templated.io/api-key) as the Templated credential.\n3. In **Config**, set `templateId` (copy it from your template in Templated) and, if yours differ, the status names.\n4. Different property names? Edit the Layers (JSON) field in the Templated node and the property keys in the last node.\n5. Activate the workflow, then set a page's Status to Ready.\n\n### Good to know\n- If a render fails (wrong template ID or layer name), the execution stops and the page stays Ready. Fix it and edit the page again to retry.\n- Each render uses one Templated credit.","height":1000,"width":560},"id":"499f4a73-c2b0-5a75-b90b-8b51b098ba90","name":"Overview","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-620,-320]},{"parameters":{"content":"### Fill your template\nThe Layers (JSON) field maps Notion properties to template layers: `headline` (Name), `subtitle`, `photo` (Image URL, skipped when empty) and `tag` (Channel). Rename the keys to match your template's layer names.","height":220,"width":300,"color":7},"id":"8117c5f9-709e-5a9f-b77e-989e99f0c845","name":"Note: layers","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[680,-260]},{"parameters":{"pollTimes":{"item":[{"mode":"everyMinute"}]},"event":"pagedUpdatedInDatabase","databaseId":{"__rl":true,"mode":"id","value":"YOUR_NOTION_DATABASE_ID"},"simple":true},"id":"d13d3d82-1995-57a5-9e90-9859bdf960ad","name":"Notion Trigger","type":"n8n-nodes-base.notionTrigger","typeVersion":1,"position":[0,0]},{"parameters":{"assignments":{"assignments":[{"id":"5e4cb84d-8bb4-5903-a2c7-0986a36c584b","name":"templateId","value":"YOUR_TEMPLATE_ID","type":"string"},{"id":"6f454be9-2796-561c-9830-e1a546f6f4f9","name":"readyStatus","value":"Ready","type":"string"},{"id":"9e8d648a-a618-5c6c-beda-3982f86f2642","name":"doneStatus","value":"Designed","type":"string"}]},"includeOtherFields":true,"options":{}},"id":"a9b4d457-efe0-587f-8346-a7baa0a98796","name":"Config","type":"n8n-nodes-base.set","typeVersion":3.4,"position":[240,0]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"d531e4ec-8766-5d90-891a-cee2fe15811d","leftValue":"={{ $json.property_status }}","rightValue":"={{ $json.readyStatus }}","operator":{"type":"string","operation":"equals"}}],"combinator":"and"},"options":{}},"id":"9fdbecd4-eef4-5117-98e1-ad07ad46b70c","name":"Status is Ready","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[480,0]},{"parameters":{"operation":"createRender","template":{"__rl":true,"mode":"id","value":"={{ $json.templateId }}"},"format":"jpg","layersMode":"json","layersJson":"={{ JSON.stringify(Object.assign({ headline: { text: $json.property_name }, subtitle: { text: $json.property_subtitle || '' }, tag: { text: $json.property_channel || '' } }, $json.property_image_url ? { photo: { image_url: $json.property_image_url } } : {})) }}"},"id":"a952254c-5199-517d-8253-5b5e23a09aa9","name":"Templated: Create a Render","type":"n8n-nodes-templated.templated","typeVersion":1,"position":[720,-20]},{"parameters":{"resource":"databasePage","operation":"update","pageId":{"__rl":true,"mode":"id","value":"={{ $('Notion Trigger').item.json.id }}"},"propertiesUi":{"propertyValues":[{"key":"Graphic|url","urlValue":"={{ $json.url }}"},{"key":"Status|status","statusValue":"={{ $('Config').item.json.doneStatus }}"}]},"options":{}},"id":"6988146f-05dc-5d49-a7e8-db0706239e77","name":"Save graphic to Notion","type":"n8n-nodes-base.notion","typeVersion":2.2,"position":[960,-20]}],"pinData":{},"connections":{"Notion Trigger":{"main":[[{"node":"Config","type":"main","index":0}]]},"Config":{"main":[[{"node":"Status is Ready","type":"main","index":0}]]},"Status is Ready":{"main":[[{"node":"Templated: Create a Render","type":"main","index":0}]]},"Templated: Create a Render":{"main":[[{"node":"Save graphic to Notion","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"},"meta":{"templateCredsSetupCompleted":false,"templated":{"recipe":"https://templated.io/workflows/notion-content-calendar-graphics/"}},"tags":[]}