This workflow corresponds to n8n.io template #12302 — we link there as the canonical source.
This workflow follows the Agent → Error Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "9c2cbd97-0ec9-42c7-9e9c-8bea2ef48048",
"name": "Approved?",
"type": "n8n-nodes-base.switch",
"position": [
3936,
3024
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Approve",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "44fd7b82-8a91-4c1f-a1ea-48ca2ac4b903",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ $json.data.approved_option }}",
"rightValue": "Option A|Option B|Option C"
}
]
},
"renameOutput": true
},
{
"outputKey": "Decline",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "974f3f8f-14b4-480f-a82f-27945f9bbfe7",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.approved_option }}",
"rightValue": "Decline all"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4,
"alwaysOutputData": false
},
{
"id": "ffe2b24f-0549-4f03-bef7-548aa0023f33",
"name": "Fetch Published History",
"type": "n8n-nodes-base.googleSheets",
"position": [
256,
2080
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "YOUR_SPREADSHEET_NAME"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_SPREADSHEET_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "6d67a278-14f1-4032-9978-b82c9b481542",
"name": "Identify New Portfolio Items",
"type": "n8n-nodes-base.code",
"position": [
928,
2080
],
"parameters": {
"jsCode": "// 1. Grab data from the previous nodes\nconst aggregatedItems = $items(\"Compile History Array\");\nconst driveFiles = $items(\"Scan Portfolio Assets\");\n\n// 2. Extract the Topic names from the Aggregated list\n// We reach into the first item [0], then the 'data' array\nconst publishedTopics = aggregatedItems[0].json.data.map(post => {\n return post.Topic?.trim();\n}).filter(Boolean);\n\n// 3. Filter the Drive files\nconst unpostedFiles = driveFiles.filter(file => {\n // Remove extension (e.g., .pdf)\n const fileNameClean = file.json.name.replace(/\\.[^/.]+$/, \"\").trim();\n \n // Return true ONLY if the filename is NOT in our published list\n return !publishedTopics.includes(fileNameClean);\n});\n\n// 4. Return the result\nreturn unpostedFiles;"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "6df50abb-58eb-46fb-87df-8d4958f3e057",
"name": "New Portfolio Found?",
"type": "n8n-nodes-base.if",
"position": [
1152,
2080
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "17462a12-67b0-4fd8-9111-f20c4e7f57bd",
"operator": {
"type": "object",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.3
},
{
"id": "81d8e946-c04c-4785-89c3-700eec060b8d",
"name": "Human Editor Approval",
"type": "n8n-nodes-base.gmail",
"position": [
3712,
3024
],
"parameters": {
"sendTo": "user@example.com",
"message": "=<div style=\"font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333; max-width: 700px; margin: auto; border: 1px solid #eee; padding: 20px; border-radius: 12px; background-color: #ffffff;\">\n \n <h2 style=\"color: #1a1a1a; border-bottom: 2px solid #f0f0f0; padding-bottom: 15px; margin-top: 0;\">YOUR COMPANY NAME: Editorial Review</h2>\n \n <div style=\"background-color: #fcfcfc; padding: 15px; border-radius: 8px; margin-bottom: 25px; border: 1px solid #efefef;\">\n <p style=\"margin: 5px 0;\"><strong>Topic:</strong> {{ $json.data.subject }}</p>\n <p style=\"margin: 5px 0;\"><strong>Strategy:</strong> {{ $json.data.strategy }}</p>\n <p style=\"margin: 5px 0; color: #777; font-size: 12px;\"><strong>Source:</strong> Internal Topic Bank (Row {{ $json.data.row_number }})</p>\n </div>\n\n <div style=\"margin-bottom: 30px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;\">\n <div style=\"background-color: #10a37f; color: white; padding: 10px 20px; font-weight: bold; font-size: 14px;\">\n OPTION A - GPT-4o (Standard / Punchy)\n </div>\n <div style=\"padding: 20px; background-color: #ffffff; white-space: pre-wrap; line-height: 1.6; font-size: 15px; color: #222;\">{{ $json.data.option_gpt }}</div>\n </div>\n\n <div style=\"margin-bottom: 30px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;\">\n <div style=\"background-color: #7c4dff; color: white; padding: 10px 20px; font-weight: bold; font-size: 14px;\">\n OPTION B - CLAUDE 3.5 SONNET (Thought Leadership / ROI)\n </div>\n <div style=\"padding: 20px; background-color: #ffffff; white-space: pre-wrap; line-height: 1.6; font-size: 15px; color: #222;\">{{ $json.data.option_claude }}</div>\n </div>\n\n <div style=\"margin-bottom: 30px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;\">\n <div style=\"background-color: #4285f4; color: white; padding: 10px 20px; font-weight: bold; font-size: 14px;\">\n OPTION C - GEMINI 1.5 PRO (Lead Gen / Sales Angle)\n </div>\n <div style=\"padding: 20px; background-color: #ffffff; white-space: pre-wrap; line-height: 1.6; font-size: 15px; color: #222;\">{{ $json.data.option_gemini }}</div>\n </div>\n\n <div style=\"margin-top: 30px; padding: 20px; background-color: #fff4f4; border-radius: 8px; text-align: center; border: 1px dashed #d32f2f;\">\n <p style=\"margin: 0; font-weight: bold; color: #d32f2f; font-size: 16px;\">\n ACTION REQUIRED\n </p>\n <p style=\"margin: 5px 0 0 0; color: #555;\">Click the Respond button below to continue.</p>\n </div>\n</div>",
"options": {
"appendAttribution": false
},
"subject": "=LinkedIn Post Review: {{ $json.data.subject }}",
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "approved_option",
"fieldOptions": {
"values": [
{
"option": "Option A"
},
{
"option": "Option B"
},
{
"option": "Option C"
},
{
"option": "Decline all"
}
]
},
"requiredField": true
}
]
},
"responseType": "customForm"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "e456903f-cfac-451f-8216-fc54d16e6170",
"name": "Bi-Weekly Content Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"notes": "Runs Tuesday and Friday at 9am (Europe/Madrid)",
"position": [
32,
2080
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 9 * * 2,4"
}
]
}
},
"notesInFlow": true,
"typeVersion": 1.2
},
{
"id": "4fdbfa51-459f-4893-b2b8-4367b7906387",
"name": "Compile History Array",
"type": "n8n-nodes-base.aggregate",
"position": [
480,
2080
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "7fbd7995-3eab-4617-8215-fc2e06adb377",
"name": "Scan Portfolio Assets",
"type": "n8n-nodes-base.googleDrive",
"position": [
704,
2080
],
"parameters": {
"filter": {
"folderId": {
"__rl": true,
"mode": "id",
"value": "YOUR_PORTFOLIO_FOLDER_ID"
},
"whatToSearch": "files",
"includeTrashed": false
},
"options": {},
"resource": "fileFolder",
"returnAll": true,
"queryString": "=",
"searchMethod": "query"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"executeOnce": true,
"typeVersion": 3
},
{
"id": "16b96567-e610-44a1-a5db-961690d2e519",
"name": "Select Oldest New Item",
"type": "n8n-nodes-base.limit",
"position": [
1520,
1488
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a6a1fc72-d688-401f-9bec-9384472d96a4",
"name": "Retrieve Case Study File",
"type": "n8n-nodes-base.googleDrive",
"position": [
1744,
1488
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "efd37798-9254-43cd-99c8-2c207605e237",
"name": "Draft Portfolio Post (GPT-4o)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2192,
1312
],
"parameters": {
"text": "=Project Summary: {{ $json.Summary }} Task: Write a punchy \"Curiosity Gap\" post for this portfolio item. Focus on why a busy executive should care enough to swipe.",
"options": {
"systemMessage": "Role: You are the Lead Growth Strategist at XX. Objective: Write a short, high-tension LinkedIn post to drive clicks/swipes on an attached PDF document.\n\nWriting Protocol:\n\nThe Hook: Start with a \"Broken System\" observation or a \"Hidden ROI\" claim.\n\nThe Friction: Mention a specific pain point found in the project metadata (e.g., \"9 manual handoffs\").\n\nThe Tease: Highlight one non-obvious result (e.g., \"Architecture that runs while you sleep\").\n\nThe CTA: End with: \"Swipe through the slides below to see the full breakdown.\"\n\nStrict Constraints:\n\nMax 80 words.\n\nNo emojis. No styling. No em-dashes.\n\nShow, don't tell: Instead of saying \"We automated Slack,\" say \"Slack is now a command center, not a distraction.\"",
"passthroughBinaryImages": true
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "43bef068-d5a6-49aa-87a6-1b6eaf0d450e",
"name": "Combine Draft Options",
"type": "n8n-nodes-base.merge",
"position": [
2608,
1616
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "e4c58b6f-2942-4f45-bfcd-41f90ba9f8e6",
"name": "Format Portfolio Drafts",
"type": "n8n-nodes-base.code",
"position": [
2832,
1616
],
"parameters": {
"jsCode": "let optionCount = 1;\nconst allOptions = [];\n\nconst items = $input.all();\n\nfor (let i = 0; i < items.length; i++) {\n let content = items[i].json.output || \"\";\n\n // 1. Sanitization\n content = content.replace(/^[\"']|[\"']$/g, ''); // Remove quotes\n content = content.replace(/[\\u2014\\u2015]/g, '-'); // Fix dashes\n \n // 2. Formatting the CTA\n if (content.includes(\"Swipe through\")) {\n content = content.replace(/\\s*(Swipe through.*)/i, '\\n\\n$1');\n }\n\n // 3. Robust Node Naming\n // This looks at the specific input item to find which node it came from\n let nodeName = items[i].pairedItem?.node?.name;\n \n // Fallback if metadata is missing: \n // Usually, Item 0 is the top input (GPT) and Item 1 is the bottom (Claude)\n if (!nodeName) {\n nodeName = (i === 0) ? \"Draft Portfolio Post (GPT-4o)\" : \"Draft Portfolio Post (Claude 4.5)\";\n }\n\n allOptions.push({\n json: {\n agent: nodeName,\n option: optionCount++, \n content: content.trim()\n }\n });\n}\n\nreturn allOptions;"
},
"typeVersion": 2
},
{
"id": "5b911b67-8e78-4e2c-99c5-9c555730ff0b",
"name": "Prepare Draft Package",
"type": "n8n-nodes-base.aggregate",
"position": [
3056,
1616
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "b42848c8-d5c0-41a6-b860-4fe7616065be",
"name": "Portfolio Post Approval Gate",
"type": "n8n-nodes-base.gmail",
"position": [
3280,
1616
],
"parameters": {
"sendTo": "user@example.com",
"message": "=<div style=\"font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333; max-width: 700px; margin: auto; border: 1px solid #eee; padding: 20px; border-radius: 12px; background-color: #ffffff;\">\n \n <h2 style=\"color: #1a1a1a; border-bottom: 2px solid #f0f0f0; padding-bottom: 15px; margin-top: 0;\">YOUR COMPANY NAME: Portfolio Review</h2>\n \n <div style=\"background-color: #fcfcfc; padding: 15px; border-radius: 8px; margin-bottom: 25px; border: 1px solid #efefef;\">\n <p style=\"margin: 5px 0;\"><strong>Project:</strong> {{ $json.data[0].agent.includes('Portfolio') ? 'Case Study Asset' : 'Automation Breakdown' }}</p>\n <p style=\"margin: 5px 0;\"><strong>Source Summary:</strong> {{ $node[\"Lookup Project Summary\"].json.Summary.substring(0, 150) }}...</p>\n <p style=\"margin: 10px 0 5px 0; color: #d32f2f; font-weight: bold;\">[Attached: PDF Document for Carousel]</p>\n </div>\n\n <div style=\"margin-bottom: 30px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;\">\n <div style=\"background-color: #10a37f; color: white; padding: 10px 20px; font-weight: bold; font-size: 14px;\">\n OPTION A - GPT-4o\n </div>\n <div style=\"padding: 20px; background-color: #ffffff; white-space: pre-wrap; line-height: 1.6; font-size: 15px; color: #222;\">{{ $json.data[0].content }}</div>\n </div>\n\n <div style=\"margin-bottom: 30px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden;\">\n <div style=\"background-color: #7c4dff; color: white; padding: 10px 20px; font-weight: bold; font-size: 14px;\">\n OPTION B - CLAUDE 4.5\n </div>\n <div style=\"padding: 20px; background-color: #ffffff; white-space: pre-wrap; line-height: 1.6; font-size: 15px; color: #222;\">{{ $json.data[1].content }}</div>\n </div>\n\n <div style=\"margin-top: 30px; padding: 20px; background-color: #fff4f4; border-radius: 8px; text-align: center; border: 1px dashed #d32f2f;\">\n <p style=\"margin: 0; font-weight: bold; color: #d32f2f; font-size: 16px;\">\n ACTION REQUIRED\n </p>\n <p style=\"margin: 5px 0 0 0; color: #555;\">Click the Respond button below to select the post and publish the carousel.</p>\n </div>\n</div>",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.subject }}",
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "approved_option",
"defaultValue": "=",
"fieldOptions": {
"values": [
{
"option": "Option A"
},
{
"option": "Option B"
},
{
"option": "Decline all"
}
]
},
"requiredField": true
}
]
},
"responseType": "customForm"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "39ab9bb7-0c87-4f97-914c-13c55cb4e2f4",
"name": "LI API: Init Image/Doc Upload",
"type": "n8n-nodes-base.httpRequest",
"position": [
3744,
1360
],
"parameters": {
"url": "https://api.linkedin.com/rest/documents?action=initializeUpload",
"method": "POST",
"options": {},
"jsonBody": "{\n \"initializeUploadRequest\": {\n \"owner\": \"urn:li:organization:110151891\"\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "LinkedIn-Version",
"value": "202502"
},
{
"name": "X-Restli-Protocol-Version",
"value": "2.0.0"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"nodeCredentialType": "linkedInOAuth2Api"
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "81d9921a-fca5-4717-aabf-4ecd6eab665f",
"name": "Sync File & Approved Text",
"type": "n8n-nodes-base.merge",
"position": [
3968,
1280
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "ebcea7cf-0e4b-4fa3-9232-1ce7e8440978",
"name": "API Throttle Delay",
"type": "n8n-nodes-base.wait",
"position": [
4192,
1280
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "5cb8d9f7-ef55-4f10-a56c-2ffb736de2bf",
"name": "LI API: Transfer Binary Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
4416,
1280
],
"parameters": {
"url": "={{ $json.value.uploadUrl }}",
"method": "PUT",
"options": {
"response": {
"response": {
"responseFormat": "text"
}
}
},
"sendBody": true,
"contentType": "binaryData",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/pdf"
}
]
},
"inputDataFieldName": "data"
},
"typeVersion": 4.3,
"alwaysOutputData": true
},
{
"id": "bf0c1d03-e0cd-48f8-b78e-c12aa3a9b586",
"name": "LI API: Publish Live Post",
"type": "n8n-nodes-base.httpRequest",
"position": [
4640,
1280
],
"parameters": {
"url": "https://api.linkedin.com/rest/posts",
"method": "POST",
"options": {},
"jsonBody": "={\n \"author\": \"urn:li:organization:110151891\",\n \"commentary\": {{ \n JSON.stringify(\n $node[\"Prepare Draft Package\"].json.data[\n ($node[\"Portfolio Post Approval Gate\"].json.query?.response || \"\").includes(\"A\") ? 0 : 1\n ].content\n ) \n}},\n \"visibility\": \"PUBLIC\",\n \"lifecycleState\": \"PUBLISHED\",\n \"content\": {\n \"media\": {\n \"id\": \"{{ $node[\"LI API: Init Image/Doc Upload\"].json.value.document }}\",\n \"title\": \"Automation Project Showcase\"\n }\n },\n \"distribution\": {\n \"feedDistribution\": \"MAIN_FEED\",\n \"targetEntities\": []\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "LinkedIn-Version",
"value": "202511"
},
{
"name": "X-Restli-Protocol-Version",
"value": "2.0.0"
}
]
},
"nodeCredentialType": "linkedInOAuth2Api"
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "3b1dfaa1-4f87-4b02-9b9b-a92d9658806e",
"name": "Strategy: GPT Architect",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2560,
2416
],
"parameters": {
"text": "=Topic: {{ $json.selected_title }} Strategic Goal: {{ $json.strategic_brief.the_shift }} Pain Point: {{ $json.strategic_brief.what_changed }} Business Value: {{ $json.strategic_brief.why_it_matters }}\n\nBuild the architectural logic for a LinkedIn post based on these inputs.",
"options": {
"systemMessage": "You are a Senior Agency Operations Consultant. Your role is to analyze a strategic brief and break it down into a logical flow for a LinkedIn post.\n\n** Persona & Voice:**\n\nTone: Authoritative, professional, and data-driven.\n\nPerspective: Focused on agency \"Bottom Line,\" Billable Utilization, and Scalability.\n\n** Output Structure (Strictly Plain Text):**\n\nHOOK: 3 variations of a pain-point focused opening.\n\nBODY POINTS: 3-5 logical arguments why the manual process is failing the agency.\n\nTRANSFORMATION: The specific benefit of moving to the automated system.\n\nDO NOT use markdown, bolding, or symbols like # or ---."
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "8990f318-ad4f-458a-8c00-d2800af0b919",
"name": "Strategy: Claude Architect",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2560,
2816
],
"parameters": {
"text": "=Strategic Brief:\n\nTopic: {{ $json.selected_title }}\n\nThe Problem: {{ $json.strategic_brief.what_changed }}\n\nThe Vision: {{ $json.strategic_brief.the_shift }}\n\nProvide a deep-dive analysis. Do not exceed 300 words in this analysis.",
"options": {
"systemMessage": "You are a Strategic Systems Designer for Digital Agencies. You focus on the \"Opportunity Cost\" of manual labor.\n\n** Persona & Voice:**\n\nTone: Insightful, visionary, and high-level.\n\nPerspective: Automation is a competitive advantage that increases agency valuation.\n\n** Output Structure:**\n\nAnalyze the \"Hidden Tax\" of the current manual process.\n\nContrast the \"Manual vs. Automated\" business models.\n\nFocus on the ROI of strategic capacity.\n\nDO NOT use markdown bolding or decorative dividers."
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "a78287d3-58ff-479c-b306-45baf8a2ea8a",
"name": "Voice: GPT Editor",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2912,
2416
],
"parameters": {
"text": "=Transform this strategy into a LinkedIn post.\n\nConstraint: Ensure every bullet point starts with \u2022 and is on a new line. No bold text.\n\nSTRATEGY: {{ $json.output }}",
"options": {
"systemMessage": "You are a LinkedIn Content Specialist. Your job is to turn a strategy into a punchy, readable post.\n\n** Formatting Rules (Zero Tolerance):**\n\nNO BOLDING: Do not use text or any markdown.\n\nBULLET LIMIT: Use a maximum of 3-4 bullet points per post. Every bullet MUST be on its own new line.\n\nNO SYMBOLS: Do not use --- or ___ or #.\n\nBULLETS: Use the \"bullet\" symbol (\u2022). Every bullet MUST be on its own new line.\n\nSPACING: Use double line breaks between paragraphs to create white space.\n\nSTRUCTURE: > 1. Use short, single-sentence paragraphs for the hooks. 2. Use 3 bullets (\u2022) only for the specific \"Hidden Costs\" or \"Pain Points.\" 3. Use standard paragraphs for the solution and the closing.\n\nSTYLE: Short, punchy sentences. One sentence per paragraph for the hook."
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "220cb3b4-0089-478a-b297-dcd7ebe61297",
"name": "Voice: Claude Editor",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2912,
2816
],
"parameters": {
"text": "=Refine this analysis into a LinkedIn post.\n\nStrict Constraints: > 1. Max 200 words total. 2. No bolding. 3. Use \u2022 for bullets on new lines. 4. Use double line breaks for spacing.\n\nANALYSIS: {{ $json.output }}",
"options": {
"systemMessage": "You are a Ghostwriter for Agency CEOs. You write with \"Quiet Authority.\"\n\n** CRITICAL FORMATTING & LENGTH LIMITS:**\n\nLENGTH: You MUST keep the post under 200 words. This is a hard limit to stay under LinkedIn's character count.\n\nNO MARKDOWN: Do not use bold, italics, or #.\n\nBULLETS: Use the \u2022 symbol. Limit yourself to a single list of 3 items max. Every bullet must be on a new line with an empty line between bullets.\n\nSTYLE: Focus on the narrative flow. Use bullet points only when comparing the \"Before\" vs \"After\" metrics.\n\nNO DIVIDERS: Never use \"---\" or \"___\". Use white space only.\n\nSTRUCTURE: > 1. Short hook.\n\nThe \"Hidden Cost\" logic.\n\nThe transformation.\n\nProvocative closing question."
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "283938af-459d-466f-a5c0-43df50cca772",
"name": "Combine Cleaned Options",
"type": "n8n-nodes-base.merge",
"position": [
3264,
3008
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3.2
},
{
"id": "97413275-b5a0-47a2-ae08-7f400c1b7d60",
"name": "Draft Review Email",
"type": "n8n-nodes-base.code",
"position": [
3488,
3024
],
"parameters": {
"jsCode": "// 1. Get all items from the Merge node (GPT, Claude, Gemini)\nconst items = $input.all();\n\n// 2. Get the specific topic data from your Google Sheet node\nlet topicTitle = \"Agency Strategy Topic\";\nlet rowId = \"\";\n\ntry {\n // Pulls from the 'Select Single Topic' node\n const sheetNode = $(\"Select Single Topic\").first().json;\n topicTitle = sheetNode.Topic || topicTitle;\n rowId = sheetNode.row_number || \"\";\n} catch (e) {\n // Fallback if the reference fails\n}\n\n// 3. Helper Function to Clean and Sanitize Text\nconst cleanContent = (text) => {\n if (!text) return \"\";\n \n let content = text;\n\n // A. Replaces 3 or more newlines with just 2\n content = content.replace(/\\n{3,}/g, '\\n\\n'); \n \n // B. Strip Markdown Bold (**) and Italics (_)\n content = content.replace(/\\*\\*|\\_\\_/g, '');\n\n // C. Convert long dashes to \" - \"\n content = content.replace(/[\\u2014\\u2015\\u2013]/g, ' - ');\n\n // D. Normalize hyphens to [space]-[space]\n content = content.replace(/\\s*-\\s*/g, ' - ');\n\n // E. Fix compound words (e.g., \"revenue - generating\" -> \"revenue-generating\")\n content = content.replace(/([a-z])\\s+-\\s+([a-z])/gi, '$1-$2');\n\n // F. Fix run-on bullets (ensure a new line exists before every \u2022 symbol)\n content = content.replace(/([^\\n])\\s*\u2022/g, '$1\\n\u2022');\n \n // G. Remove quotes around the whole post\n content = content.replace(/^[\"']|[\"']$/g, '');\n\n return content.trim();\n};\n\n// 4. Map the outputs\n// Item 0 = GPT (Top Branch)\n// Item 1 = Claude (Middle Branch)\n// Item 2 = Gemini (Bottom Branch)\nconst options = {\n subject: topicTitle,\n strategy: \"Multi-Angle Strategy (Standard, ROI, Lead-Gen)\",\n row_number: rowId,\n option_gpt: cleanContent(items[0]?.json?.output),\n option_claude: cleanContent(items[1]?.json?.output),\n option_gemini: cleanContent(items[2]?.json?.output)\n};\n\n// Return as a single object for the Gmail node\nreturn { data: options };"
},
"typeVersion": 2
},
{
"id": "0a4e4593-a472-4598-9b28-62c4ae46e53b",
"name": "Discard Drafts",
"type": "n8n-nodes-base.noOp",
"position": [
4160,
3120
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ba1b46fe-036e-4ffe-8fd8-578d8efa4d42",
"name": "GPT-4o (Creative Logic)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2256,
1536
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {
"temperature": 0.7
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "3f1e5342-94cb-4901-ba07-5d1d54b7a8b9",
"name": "Claude 4.5 Sonnet (Analytical Logic)",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
2272,
2032
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "91554c84-3cb5-4569-b161-5e20215c6aa3",
"name": "GPT-4o (Content Architect)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2640,
2640
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "4f1ac4ee-53ec-4686-96b9-e6f2f4b8dcb4",
"name": "GPT-4o (Brand Voice Editor)",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2992,
2640
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "781ec4d6-f12b-400f-b0af-4164488a9a6b",
"name": "Claude 4.5 (Content Architect)",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
2640,
3040
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "12691bd9-96cb-488b-bb8c-1db69d59d906",
"name": "Claude 4.5 (Brand Voice Editor)",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
2992,
3040
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "c0cedc16-a1c7-4562-a723-6719bc88329a",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
3504,
1616
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Approve",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b022f708-c596-4b43-bc0a-e1ccc7b80e3c",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ $json.data.approved_option }}",
"rightValue": "Option A|Option B"
}
]
},
"renameOutput": true
},
{
"outputKey": "Decline",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f983c8d0-888a-4fb6-a533-c84ae6057f63",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.approved_option }}",
"rightValue": "Decline all"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "ebd7669d-a2c1-4124-9c92-9a6b7210e328",
"name": "Draft Portfolio Post (Claude 4.5)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2192,
1808
],
"parameters": {
"text": "=Input Project Summary: > {{ $json.Summary }}\n\nDrafting Instructions: Write a 4-paragraph LinkedIn post following the PAS framework. Paragraph 1: The expensive problem. Paragraph 2: Why it's actually getting worse for most teams. Paragraph 3: How we built the \"Bridge\" using automation. Paragraph 4: The call to action to swipe.\n\nConstraint: Stay under 120 words. Focus on business outcomes, not technical theories.",
"options": {
"systemMessage": "Role: You are a World-Class B2B Conversion Copywriter specialized in AI Automation.\n\nObjective: Write a high-converting LinkedIn post teaser for a portfolio case study. Your goal is to make the reader feel the \"pain\" of the old way and see the \"logic\" of the new way.\n\nWriting Formula (PAS):\n\nProblem: Identify the manual, soul-crushing bottleneck mentioned in the summary.\n\nAgitate: Briefly explain the cost of ignoring this (errors, wasted hours, mental fatigue).\n\nSolution: Mention the XX architecture as the bridge to the \"after\" state.\n\nThe Tease: Reference the attached PDF as the blueprint they can follow.\n\nCTA: End with: \"Swipe through the slides below to see the full breakdown.\"\n\nBrand Voice Rules:\n\nNo \"AI-isms\" (e.g., \"In the ever-evolving landscape,\" \"Deliberate underengineering\").\n\nUse short, punchy sentences.\n\nFormatting: No emojis. No bolding. No hashtags.\n\nTone: Confident, empathetic, and results-oriented.",
"passthroughBinaryImages": false
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "d79bd332-f000-40b3-9410-86cc29eb04bc",
"name": "Lookup Project Summary",
"type": "n8n-nodes-base.googleSheets",
"position": [
1968,
1616
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $json.name.replace(/\\.[^/.]+$/, \"\") }}",
"lookupColumn": "Workflow"
}
]
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "YOUR_SPREADSHEET_NAME"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_SPREADSHEET_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "6fd8ee26-8a21-49ba-b38f-b33ad46b070c",
"name": "Fetch Content Queue",
"type": "n8n-nodes-base.googleSheets",
"position": [
1536,
2912
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "YOUR_SPREADSHEET_NAME"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_SPREADSHEET_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "1cb6423d-66a9-4dfb-a9de-36b52cf0a156",
"name": "Prioritize Oldest Content",
"type": "n8n-nodes-base.sort",
"position": [
1760,
2912
],
"parameters": {
"options": {},
"sortFieldsUi": {
"sortField": [
{
"fieldName": "Date Posted"
}
]
}
},
"typeVersion": 1
},
{
"id": "d03695ea-22d5-411d-9ddd-51c131e3d287",
"name": "Select Single Topic",
"type": "n8n-nodes-base.limit",
"position": [
1984,
2912
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5c9e8295-7584-4986-8e31-a9ad50db36b3",
"name": "Generate Agency Strategy",
"type": "n8n-nodes-base.code",
"position": [
2272,
2912
],
"parameters": {
"jsCode": "// Pulls the top row from the selection node\nconst topicData = $node[\"Select Single Topic\"].json;\n\nreturn [\n {\n json: {\n selected_title: topicData[\"Topic\"],\n strategic_brief: {\n the_shift: \"Moving agency operations from manual oversight to automated, data-driven systems.\",\n what_changed: topicData[\"Pain Point\"],\n why_it_matters: \"To scale billable capacity and improve client retention without increasing operational overhead.\"\n },\n // Pass the row number for the final timestamp update\n row_number: topicData[\"row_number\"] \n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "b546ee91-bea0-45f3-94d8-a674b4dbde64",
"name": "Strategy: Gemini Architect",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2560,
3312
],
"parameters": {
"text": "=Target Topic: {{ $json.selected_title }} The Core Problem: {{ $json.strategic_brief.what_changed }} The Desired Outcome: {{ $json.strategic_brief.the_shift }}\n\nInstructions:\n\nIdentify a specific \"hidden\" manual process related to this topic that small-to-medium businesses usually ignore.\n\nExplain why this process is a \"growth killer.\"\n\nDescribe how a professionally engineered automation solution turns this from a liability into a competitive asset.\n\nDo not mention tool names; focus on the business transformation and the expertise required to build it.",
"options": {
"systemMessage": "You are a Strategic Sales Engineer for a high-end Automation Agency. Your goal is to identify high-friction manual processes within businesses and explain the massive ROI of professional automation.\n\nYour Persona:\n\nTone: Professional, inquisitive, and solution-oriented.\n\nPerspective: You look for \"invisible leaks\"\u2014processes that owners think are \"just part of doing business\" but are actually draining profit and slowing down the sales cycle.\n\nGoal: Position the automation as a custom-engineered asset, not a DIY tool.\n\nOutput Structure:\n\nThe Identification: Pinpoint a specific, messy manual workflow related to the provided topic (e.g., technical validation, contract generation, lead routing).\n\nThe Opportunity Gap: Contrast the current \"Manual Mess\" (slow, error-prone, unscalable) with the \"Automated Future\" (instant, precise, highly leveraged).\n\nThe Business Case: Explain how this specific fix allows the team to focus on higher-value, revenue-generating tasks.\n\nFormatting: Do not use markdown, bolding, or headers. Use plain text only."
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "f9e62079-5277-4555-be2f-7a3815aade8f",
"name": "Voice: Gemini Editor",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2912,
3312
],
"parameters": {
"text": "=Transform the Sales Engineer's logic into a LinkedIn post.\n\nConstraint: Focus on getting the reader to realize they have a problem only a professional automation team should fix.\n\nSTRATEGY: {{ $json.output }}",
"options": {
"systemMessage": "You are a B2B LinkedIn Specialist who writes posts that convert business owners into agency leads.\n\nWriting Rules:\n\nLENGTH: Hard limit of 200 words.\n\nTHE HOOK: Start with a provocative question about a specific business bottleneck.\n\nNO MARKDOWN: Do not use bold, italics, or #. LinkedIn does not render these correctly.\n\nBULLETS: Use the \u2022 symbol. Every bullet must be on a new line with an empty line between bullets.\n\nBULLET LIMIT: Max 3 high-impact bullet points.\n\nNO DIVIDERS: Never use \"---\" or \"___\". Use white space (double line breaks) for structure.\n\nTHE ANGLE: Position the agency as the expert. Use terms like \"custom-engineered,\" \"operational leverage,\" and \"architecting solutions.\"\n\nSTRUCTURE: > 1. Start with the provocative question. 2. Use a short paragraph to explain the \"Growth Killer.\" 3. Use exactly 3 bullets to describe the \"Custom-Engineered\" transformation. 4. End with your closing question.\n\nTHE CLOSER (Critical): You MUST end the post with a single, provocative question that asks the reader to reflect on their own operations.\n\nExample: \"What's the one manual process holding back your next $1M in revenue?\"\n\nExample: \"How much faster could you scale if your team stopped acting like human APIs between your software tools?\""
},
"promptType": "define"
},
"typeVersion": 3
},
{
"id": "1ff59c5c-7fd9-4b8c-98f6-f946026d0a6e",
"name": "Gemini 2.5-Pro (Brand Voice Editor)",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2992,
3536
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-pro"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "4100b3d0-5844-4c8a-97a7-67b2b15c6883",
"name": "Gemini 2.5-Pro (Content Architect)",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2640,
3536
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-pro"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "ce2c24c9-9f92-4f4f-9fc8-6cc65ba49779",
"name": "Log Approved Post",
"type": "n8n-nodes-base.googleSheets",
"position": [
4160,
2912
],
"parameters": {
"columns": {
"value": {
"Date": "={{ $now.toFormat('dd-MM-yyyy') }}",
"Type": "News/Trend",
"Topic": "={{ $('Draft Review Email').item.json.data.subject }}",
"Status": "Draft",
"Content": "={{ \n ($node[\"Human Editor Approval\"].json.query?.response || \"\").toLowerCase().includes(\"a\") \n ? $node[\"Draft Review Email\"].json.data.option_gpt \n : ($node[\"Human Editor Approval\"].json.query?.response || \"\").toLowerCase().includes(\"b\")\n ? $node[\"Draft Review Email\"].json.data.option_claude\n : $node[\"Draft Review Email\"].json.data.option_gemini \n}}"
},
"schema": [
{
"id": "Topic",
"type": "string",
"display": true,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content",
"type": "string",
"display": true,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn URL",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "LinkedIn URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Type",
"type": "string",
"display": true,
"required": false,
"displayName": "Type",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "YOUR_SPREADSHEET_NAME"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_SPREADSHEET_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "724d0b43-6220-4a3a-99f6-d7c091de66e5",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
1008
],
"parameters": {
"width": 1232,
"height": 640,
"content": "## The Multi-Model Agency Content Engine (GPT, Claude, Gemini)\n\n**Goal:** To maintain a perpetual, high-authority presence on LinkedIn by alternating between Real-World Case Studies (Portfolio Path) and Strategic Thought Leadership (Agency Path).\n\n**Workflow Logic:**\n\nTrack A (Portfolio): Scans for new project files, retrieves case study data, and drafts posts using GPT and Claude.\n\nTrack B (Strategy): Pulls from a Google Sheet Topic Bank and drafts content across three specialized AI models (GPT, Claude, Gemini).\n\nGatekeeper: Both tracks utilize a \"Wait for Response\" email node, ensuring 100% human editorial control before anything goes live.\n\n**Resiliency & Error Handling:**\n\nError Trigger: Any node failure triggers an immediate alert via Gmail.\n\nAPI Throttle: Built-in delays ensure LinkedIn's binary data transfers comply with API limits.\n\nData Integrity: Automated \"Cleanup\" nodes strip AI artifacts and normalize formatting.\n\n**Setup Requirements:**\n\nGoogle Drive: Folder for Case Study PDF/Images.\n\nGoogle Sheets:\n- Topic Bank with headers: Topic, Pain Points, Status, Date Posted.\n- LinkedIn Post History with headers: Topic, Content, Date, Status, Type of Post.\n- Portfolio Summary: Title, Summary.\n\n\n**Credentials:** LinkedIn API, OpenAI, Anthropic, Google Gemini, and Gmail."
},
"typeVersion": 1
},
{
"id": "adfe5b8d-90c6-4604-9efd-1d4178e16de3",
"name": "Error Trigger",
"type": "n8n-nodes-base.errorTrigger",
"position": [
48,
2784
],
"parameters": {},
"typeVersion": 1
},
{
"id": "811b6bee-75fc-4046-81df-ed442469c1ea",
"name": "Send a message",
"type": "n8n-nodes-base.gmail",
"position": [
272,
2784
],
"parameters": {
"sendTo": "user@example.com",
"message": "=The LinkedIn engine failed at node: {{ $node[\"Error Trigger\"].json[\"node\"][\"name\"] }}. Reason: {{ $node[\"Error Trigger\"].json[\"execution\"][\"error\"][\"message\"] }}",
"options": {},
"subject": "\u26a0\ufe0f Workflow Error: LinkedIn Content Engine"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "efc7d7be-8328-4989-a545-af924e22e936",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
2688
],
"parameters": {
"color": 7,
"width": 448,
"height": 336,
"content": "## SYSTEM: Error Handling"
},
"typeVersion": 1
},
{
"id": "0e808cb2-0c58-48b1-b7d2-6a44cce1996f",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
1952
],
"parameters": {
"color": 7,
"width": 1328,
"height": 352,
"content": "## PHASE 1: INTAKE & ROUTING"
},
"typeVersion": 1
},
{
"id": "186488dd-480d-483a-ba28-0cb8ab98148d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
1376
],
"parameters": {
"color": 7,
"width": 672,
"height": 464,
"content": "## PHASE 2: PORTFOLIO EXTRACTION (TRUE PATH)"
},
"typeVersion": 1
},
{
"id": "25b65ed3-eeb7-4673-b207-2d837eef0cc5",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
2784
],
"parameters": {
"color": 7,
"width": 992,
"height": 528,
"content": "## PHASE 6: STRATEGY ENGINEERING (FALSE PATH)"
},
"typeVersion": 1
},
{
"id": "97e0a03e-a3e6-423e-938c-08036039e9bc",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
2464,
2272
],
"parameters": {
"color": 7,
"width": 944,
"height": 1472,
"content": "## PHASE 7: MULTI-MODEL CREATIVE & QC"
},
"typeVersion": 1
},
{
"id": "c393023c-b98e-4532-8632-89dacc1f0c38",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
3440,
2800
],
"parameters": {
"color": 7,
"width": 624,
"height": 528,
"content": "## PHASE 8: EDITORIAL GATEKEEPER"
},
"typeVersion": 1
},
{
"id": "e03bc446-e239-404a-b5d5-738ef01a51e8",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
3696,
1184
],
"parameters": {
"color": 7,
"width": 1376,
"height": 864,
"content": "## PHASE 5: PORTFOLIO POSTING & DELIVERY"
},
"typeVersion": 1
},
{
"id": "ef2e70ea-5b82-4876-bd4b-fdaa501d2aa5",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
4096,
2800
],
"parameters": {
"color": 7,
"width": 512,
"height": 528,
"content": "## PHASE 9: TOPIC BANK DELIVERY"
},
"typeVersion": 1
},
{
"id": "738eeb35-4a14-4155-8e22-4acf0b5e7b6f",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
2144,
1184
],
"parameters": {
"color": 7,
"width": 624,
"height": 992,
"content": "## PHASE 3: PORTFOLIO POST CREATION"
},
"typeVersion": 1
},
{
"id": "059e6ce3-222c-4e76-a92a-21df53f614af",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
2800,
1376
],
"parameters": {
"color": 7,
"width": 864,
"height": 496,
"content": "## PHASE 4: PORTFOLIO EDITORIAL GATEKEEPER"
},
"typeVersion": 1
},
{
"id": "52761b60-2adf-4d6f-9cb0-d5e85cab2931",
"name": "Archive Portfolio Publication",
"type": "n8n-nodes-base.googleSheets",
"position": [
4864,
1280
],
"parameters": {
"columns": {
"value": {
"Date": "={{ $now.toFormat('dd-MM-yyyy') }}",
"Type": "Portfolio",
"Topic": "={{ $('API Throttle Delay').item.json.name.replace(/\\.[^/.]+$/, \"\") }}",
"Status": "Posted",
"Content": "={{ \n $node[\"Prepare Draft Package\"].json.data[\n ($node[\"Portfolio Post Approval Gate\"].json.query?.response || \"\").includes(\"A\") ? 0 : 1\n ].content \n}}"
},
"schema": [
{
"id": "Topic",
"type": "string",
"display": true,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content",
"type": "string",
"display": true,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date",
"type": "string",
"display": true,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn URL",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "LinkedIn URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Type",
"type": "string",
"display": true,
"required": false,
"displayName": "Type",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "YOUR_SPREADSHEET_NAME"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "YOUR_SPREADSHEET_ID"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "f1c28d21-49c7-4635-b3d0-87e0d2606658",
"name": "Halt: Review Required",
"type": "n8n-nodes-base.noOp",
"position": [
3760,
1792
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5309e8dd-911c-4620-a2da-deb9d36d0001",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-688,
1840
],
"parameters": {
"width": 608,
"height": 816,
"content": "## \ud83d\ude80 START HERE: SETUP GUIDE\n1. Google Sheets Configuration\n\nCreate a Topic Bank sheet with headers: Topic, Pain Points, Status, Date Posted. Populate the sheet with high-value topics and their corresponding client pain points tailored to your agency's specific expertise and service offerings.\n\nCreate a LinkedIn Post History sheet with headers: Topic, Content, Date, Status, Type of Post.\n\nCreate a Portfolio Summary sheet with headers: Topic, Summary.\n\n2. Google Drive Configuration\n\nCreate a folder for your Case Study files (PDFs or Docs).\n\nUpdate the Folder and Document IDs in the Fetch Published History, Scan Portfolio Assets, Retrieve Case Study File, Lookup Project Summary, Archive Portfolio Publication, Fetch Content Queue, Log Approved Post, Update Topic Bank: Posted Status nodes.\n\n3. Node Connectivity\n\nUpdate the Spreadsheet ID in all Google Sheets nodes.\n\nUpdate your Recipient Email in the Portfolio Post Approval Gate, Human Editor Approval node and the Error Trigger Gmail nodes.\n\n4. Brand Customization\n\nSearch in the Draft Portfolio Post (GPT-4o) and Draft Portfolio Post (Claude 4.5) AI Agent nodes (Architects and Editors) for the placeholder \"XX\" and replace it with your Company Name.\n\nSearch in both Gmail nodes body copy and replace \"YOUR COMPANY NAME\" with the correct Company Name.\n\n5. Credentials Needed\n\nAPIs: LinkedIn (Marketing Developer Platform), OpenAI (GPT-4o), Anthropic (Claude 3.5), and Google (Gemini 1.5).\n\nOAuth: Google Drive, Google Sheets, and Gmail."
},
"typeVersion": 1
},
{
"id": "499a608d-f9e9-4eea-af01-5707633bfcaf",
"name": "Update Topic Bank: Posted Status",
"type": "n8n-nodes-base.googleSheets",
"position": [
4400,
2912
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": fals
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
anthropicApigmailOAuth2googleDriveOAuth2ApigooglePalmApigoogleSheetsOAuth2ApilinkedInOAuth2ApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
The Multi-Model Agency Content Engine is a high-performance editorial system designed for agencies. It solves the "blank page" problem by alternating between real-world social proof and strategic expertise.
Source: https://n8n.io/workflows/12302/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform
This workflow is for beauty salons who want consistent, high‑quality social media content without writing every post manually. It also suits agencies and automation builders who manage multiple beauty
This workflow automates the creation, rendering, approval, and posting of TikTok-style POV (Point of View) videos to Instagram, with cross-posting to Facebook and YouTube. It eliminates manual video p
This workflow helps you find and evaluate job opportunities automatically, without spending hours searching and comparing roles. It uses your resume to look for relevant jobs on LinkedIn, checks how w
If you teach on Udemy at any meaningful scale, you already know the problem: 80% of student messages are variations of the same handful of questions, but every one of them needs a thoughtful reply to