{"active":false,"connections":{"Get Article":{"main":[[{"index":0,"node":"Load Article","type":"main"}]]},"Load Article":{"main":[[{"index":0,"node":"Repurpose Content (LLM)","type":"main"}]]},"Repurpose Content (LLM)":{"main":[[{"index":0,"node":"Split Repurposed Content","type":"main"}]]},"Save to Sheet":{"main":[[{"index":0,"node":"Notify Telegram","type":"main"}]]},"Split Repurposed Content":{"main":[[{"index":0,"node":"Save to Sheet","type":"main"}]]}},"id":"wf-04-content-repurposer","meta":{"instanceId":"n8n-template-factory","templateCredsSetupCompleted":false},"name":"Multi-Channel Content Repurposer","nodes":[{"id":"node-trigger","name":"Get Article","parameters":{},"position":[0,0],"type":"n8n-nodes-base.manualTrigger","typeVersion":1},{"id":"node-load","name":"Load Article","parameters":{"jsCode":"return [{ json: {\n  title: 'How to Automate Your Content in 2026',\n  url: 'https://example.com/automate-content',\n  body: 'Content automation saves hours every week. Start with one workflow, measure the result, then scale to every channel. The key is a single source of truth for your ideas.'\n} }];","mode":"runOnceForAllItems"},"position":[240,0],"type":"n8n-nodes-base.code","typeVersion":2},{"id":"node-repurpose","name":"Repurpose Content (LLM)","parameters":{"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer YOUR_OPENAI_API_KEY"}]},"jsonBody":"={{ JSON.stringify({ model: 'gpt-4o-mini', response_format: { type: 'json_object' }, messages: [{ role: 'user', content: 'Repurpose this article into 3 formats and return JSON with keys twitter_post, linkedin_post, newsletter_section. Article title: ' + $json.title + '. Body: ' + $json.body }] }) }}","method":"POST","sendBody":true,"sendHeaders":true,"specifyBody":"json","url":"={{ ($env.MOCK_API_URL || 'https://api.openai.com') + '/v1/chat/completions' }}"},"position":[480,0],"type":"n8n-nodes-base.httpRequest","typeVersion":4.2},{"id":"node-split","name":"Split Repurposed Content","parameters":{"jsCode":"const data = $input.first().json;\nconst content = data.choices && data.choices[0] ? data.choices[0].message.content : '{}';\nlet parsed = {};\ntry { parsed = JSON.parse(content); } catch (e) { parsed = {}; }\nconst article = $('Load Article').first().json;\nreturn [{ json: { title: article.title, url: article.url, twitter: parsed.twitter_post || parsed.title || '', linkedin: parsed.linkedin_post || parsed.summary || '', newsletter: parsed.newsletter_section || parsed.summary || '' } }];","mode":"runOnceForAllItems"},"position":[720,0],"type":"n8n-nodes-base.code","typeVersion":2},{"id":"node-save","name":"Save to Sheet","parameters":{"jsonBody":"={{ JSON.stringify({ range: 'Repurposed!A1', values: [[$json.title, $json.twitter, $json.linkedin, $json.newsletter]] }) }}","method":"POST","sendBody":true,"specifyBody":"json","url":"={{ ($env.MOCK_API_URL || 'https://sheets.googleapis.com') + '/v4/spreadsheets/' + 'YOUR_SPREADSHEET_ID' + '/values/Repurposed!A1:append' }}"},"position":[960,0],"type":"n8n-nodes-base.httpRequest","typeVersion":4.2},{"id":"node-telegram","name":"Notify Telegram","parameters":{"jsonBody":"={{ JSON.stringify({ chat_id: 'YOUR_TELEGRAM_CHAT_ID', text: 'Repurposed article: ' + $json.title + ' — X post: ' + $json.twitter }) }}","method":"POST","sendBody":true,"specifyBody":"json","url":"={{ ($env.MOCK_API_URL || 'https://api.telegram.org') + '/bot' + 'YOUR_TELEGRAM_BOT_TOKEN' + '/sendMessage' }}"},"position":[1200,0],"type":"n8n-nodes-base.httpRequest","typeVersion":4.2}],"pinData":{},"settings":{"executionOrder":"v1"},"staticData":null}