This workflow corresponds to n8n.io template #13323 — we link there as the canonical source.
This workflow follows the Agent → Facebookgraphapi 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": "f3f5e54a-b91e-4a25-81a7-b4066053212d",
"name": "Get Content",
"type": "n8n-nodes-base.googleSheets",
"position": [
-336,
576
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupValue": "Ready To Post",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA/edit?usp=drivesdk",
"cachedResultName": "(Old) Auto Posting"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "1f4b46df-2a61-4494-bd32-f4389cae3ddf",
"name": "Image Prompt Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
48,
576
],
"parameters": {
"text": "=Social Media Post: {{ $json.Content }}",
"options": {
"systemMessage": "=# Overview\nYou are an AI agent that transforms LinkedIn posts into visual prompt descriptions for generating graphic marketing materials. These visuals are designed to be paired with the post on LinkedIn, helping communicate the message in a visually engaging, brand-aligned way.\n\n## Objective:\n- Read and analyze the given LinkedIn post.\n- Identify the main message, insight, or takeaway from the post.\n- Create a clear and compelling graphic prompt that can be used with a text-to-image generator.\n- The result should be a marketing-style graphic \u2014 not a literal scene or hyperrealistic photo \u2014 that:\n1) Visually supports or illustrates the key idea of the post\n2) Looks appropriate for use in a professional LinkedIn feed\n3) Feels polished, modern, and engaging\n\n## Output Instructions:\n- Output only the final image prompt. Do not output quotation marks.\n- Do not repeat or rephrase the LinkedIn post.\n- Do not add any explanations or extra content \u2014 just the image prompt.\n- Never leave things blank like \"Header area reserved for customizable callout text\"\n- Output numeric stats when available in the original post\n\n## Style Guidelines:\n- Think like a brand designer or marketing creative.\n- Visuals may include: text, charts, icons, abstract shapes, overlays, modern illustrations, motion-like effects, bold typography elements (described, not rendered), or metaphorical concepts.\n- You can mention layout suggestions (e.g., \"split screen design,\" \"header with bold title and subtle background illustration\").\n- Assume the output will be generated using AI image tools \u2014 your prompt should guide those tools effectively.\n\n## Example Prompt Format:\nA modern flat-style graphic showing a human brain connected to mechanical gears, representing the fusion of AI and automation. Minimalist background, soft gradients, clean sans-serif text placement space at the top."
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "a9181bdb-c186-469f-bad3-f86642576eae",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
800
],
"parameters": {
"color": 6,
"width": 460,
"height": 228,
"content": "## 3. AI Image Generation\n\nYour post is analyzed by an AI agent that creates a visual prompt.\n\nThen:\n* GPT-Image generates a matching graphic \n* The image is uploaded to ImgBB \n* A shareable image URL is created for reuse "
},
"typeVersion": 1
},
{
"id": "7f47c4eb-137d-44ea-8793-d0a9b1c918c2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
-224
],
"parameters": {
"color": 2,
"width": 400,
"height": 212,
"content": "## 2. Publish Text to X and Threads\n\nYour post text is sent directly to:\n* X (Twitter)\n* Threads \n\nNo images are required for this part \u2014 it\u2019s pure text posting.\n"
},
"typeVersion": 1
},
{
"id": "70096271-6ce2-48cb-af43-85054408c108",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
304
],
"parameters": {
"color": 4,
"width": 440,
"height": 244,
"content": "## 1. Trigger + Get Content\n\nA Schedule Trigger runs the workflow at set times.\n\nEach run:\n* Looks at your Google Sheet \n* Finds one row where **Status = Ready To Post** \n* Sends that post into the rest of the workflow \n\nThis keeps everything automatic and prevents duplicates.\n"
},
"typeVersion": 1
},
{
"id": "8c11be2a-fbc7-49fd-be36-bf09b22f85a5",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
928
],
"parameters": {
"color": 7,
"width": 406,
"height": 228,
"content": "## 4. Publish Image Posts\n\nThe hosted AI image + your caption are posted to:\n* LinkedIn \n* Facebook \n* Instagram \n\nEach platform receives the same message with the same custom visual."
},
"typeVersion": 1
},
{
"id": "f2c87ac1-eae7-4f49-af0a-d90f3854dcc5",
"name": "X",
"type": "n8n-nodes-base.twitter",
"position": [
976,
16
],
"parameters": {
"text": "={{ $json.Content }}",
"additionalFields": {}
},
"credentials": {
"twitterOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "73973a2d-077c-4644-9912-33d4e762f1e1",
"name": "Instagram",
"type": "n8n-nodes-base.facebookGraphApi",
"position": [
976,
752
],
"parameters": {
"edge": "media_publish",
"node": "17841462646273569",
"options": {
"queryParameters": {
"parameter": [
{
"name": "creation_id",
"value": "={{ $json.id }}"
},
{
"name": "caption",
"value": "={{ $('Get Content').item.json.Content }}"
}
]
}
},
"graphApiVersion": "v23.0",
"httpRequestMethod": "POST"
},
"credentials": {
"facebookGraphApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "7b8ab850-288f-45a9-8192-5babf903ea0b",
"name": "Facebook",
"type": "n8n-nodes-base.facebookGraphApi",
"position": [
976,
576
],
"parameters": {
"edge": "photos",
"node": "884325181427396",
"options": {
"queryParameters": {
"parameter": [
{
"name": "message",
"value": "={{ $('Get Content').item.json.Content }}"
}
]
}
},
"sendBinaryData": true,
"graphApiVersion": "v23.0",
"httpRequestMethod": "POST",
"binaryPropertyName": "data"
},
"credentials": {
"facebookGraphApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "b9397dd6-35a8-4d2b-b946-5c1a10e73b27",
"name": "Instagram Image",
"type": "n8n-nodes-base.facebookGraphApi",
"position": [
784,
736
],
"parameters": {
"edge": "media",
"node": "17841462646273569",
"options": {
"queryParameters": {
"parameter": [
{
"name": "image_url",
"value": "={{ $json.data.url }}"
},
{
"name": "caption",
"value": "={{ $('Get Content').item.json.Content }}"
}
]
}
},
"graphApiVersion": "v23.0",
"httpRequestMethod": "POST"
},
"credentials": {
"facebookGraphApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "432dd904-63e9-4d2c-b397-7e4be6763603",
"name": "ImgBB",
"type": "n8n-nodes-base.httpRequest",
"position": [
608,
656
],
"parameters": {
"url": "https://api.imgbb.com/1/upload",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "image",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
},
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "dc9fd802-bbe1-4630-8667-1680a885372d",
"name": "LinkedIn",
"type": "n8n-nodes-base.linkedIn",
"position": [
976,
416
],
"parameters": {
"text": "={{ $('Get Content').item.json.Content }}",
"person": "B5TC_VlQdn",
"additionalFields": {},
"shareMediaCategory": "IMAGE"
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "6e0d373f-062d-4ad2-87a2-ffff5888c8fe",
"name": "Create Threads",
"type": "n8n-nodes-base.httpRequest",
"position": [
784,
176
],
"parameters": {
"url": "https://graph.threads.net/v1.0/{your_threads-id}/threads",
"method": "POST",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "text",
"value": "={{ $json.Content }}"
},
{
"name": "media_type",
"value": "TEXT"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "5fbac1ca-ff04-4638-969b-4fd787a26275",
"name": "Threads",
"type": "n8n-nodes-base.httpRequest",
"position": [
976,
176
],
"parameters": {
"url": "https://graph.threads.net/v1.0/{your_threads-id}/threads_publish",
"method": "POST",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "creation_id",
"value": "={{ $json.id }}"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.3
},
{
"id": "a1e2784e-5a5e-4a0f-8085-0220dfb178f0",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-656,
576
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 12,
"triggerAtMinute": 1
},
{
"triggerAtHour": 19,
"triggerAtMinute": 2
},
{
"triggerAtHour": 7,
"triggerAtMinute": 3
}
]
}
},
"typeVersion": 1.2
},
{
"id": "56cc7d40-481b-47f8-ad9b-b7fd80fbbeda",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1392,
512
],
"parameters": {
"color": 5,
"width": 464,
"height": 240,
"content": "## 5. Update Google Sheet\n\nIf everything works:\nStatus \u2192 Posted \n\nIf anything fails:\nStatus \u2192 Errored \n\nThis makes it easy to track what went live and what needs fixing."
},
"typeVersion": 1
},
{
"id": "6373518c-5d60-4247-a781-d0656d2c5ea1",
"name": "Error",
"type": "n8n-nodes-base.googleSheets",
"position": [
1296,
800
],
"parameters": {
"columns": {
"value": {
"Title": "={{ $('Get Content').item.json.Title }}",
"Status": "Errored"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Title"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA/edit?usp=drivesdk",
"cachedResultName": "(Old) Auto Posting"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "0fcb568e-b632-4d88-8650-80e1ea6c36dc",
"name": "Done",
"type": "n8n-nodes-base.googleSheets",
"position": [
1296,
352
],
"parameters": {
"columns": {
"value": {
"Title": "={{ $('Get Content').item.json.Title }}",
"Status": "Posted"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Title"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/100OG7Wx5PcRrc6N02ZEdfXxfx_fFTY57qKfE2-l_sdA/edit?usp=drivesdk",
"cachedResultName": "(Old) Auto Posting"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "393ba727-d6c0-4985-80cb-c6c931b61f02",
"name": "Generate an image",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
400,
576
],
"parameters": {
"model": "gpt-image-1",
"prompt": "={{ $json.output }}",
"options": {},
"resource": "image"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "3badd741-21f1-4890-8287-4d61bef2bbe9",
"name": "OpenRouter Gemini 2.5 Flash",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
-96,
784
],
"parameters": {
"model": "google/gemini-2.5-flash",
"options": {}
},
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "d1302b30-d0a8-4270-90b7-76e9eeb19bb2",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1648,
80
],
"parameters": {
"width": 816,
"height": 1072,
"content": "## Auto Cross-Posting with AI Images\n\n### This n8n template shows how to fully automate your social media workflow from Google Sheets to X, Threads, LinkedIn, Facebook, and Instagram \u2014 with AI-generated visuals.\n\nInstead of manually writing, designing, and posting content, this workflow turns a single Google Sheet row into multi-platform posts plus a custom AI image that matches your message.\n\nYou write once. n8n posts everywhere.\n\n### How it works\n* A scheduled trigger checks your Google Sheet for content marked **\u201cReady To Post.\u201d**\n* The post text is pulled from Sheets and sent to all text-only platforms (X and Threads).\n* At the same time, an AI agent analyzes your post and generates a high-quality image prompt.\n* GPT-Image creates a custom visual based on that prompt.\n* The image is uploaded to ImgBB to create a shareable URL.\n* That image + your caption are automatically posted to LinkedIn, Facebook, and Instagram.\n* Finally, your Google Sheet is updated so you never repost the same content twice.\n\n### How to use\n1. Add your posts to Google Sheets in the **Content** column.\n2. Set **Status = Ready To Post** when you want it published.\n3. Make sure all platform credentials are connected in n8n.\n4. Turn the workflow on and let it run automatically.\n\n### What you get\n* Hands-free posting to 5 platforms \n* AI-generated visuals for every post \n* Zero manual design work \n* Built-in error handling \n* No duplicate posts \n\n### Requirements\n* Google Sheets access \n* X (Twitter) account \n* Threads account \n* LinkedIn account \n* Facebook & Instagram Page access \n* ImgBB account \n* OpenAI credentials for image generation \n\n### Need help?\nAsk in the [n8n Forum](https://community.n8n.io/) or shoot me a DM on [LinkedIn](https://www.linkedin.com/in/vincentthenguyen/)\n\nHappy automating \ud83d\ude80"
},
"typeVersion": 1
}
],
"connections": {
"ImgBB": {
"main": [
[
{
"node": "Instagram Image",
"type": "main",
"index": 0
}
]
]
},
"Get Content": {
"main": [
[
{
"node": "Image Prompt Agent",
"type": "main",
"index": 0
},
{
"node": "Error",
"type": "main",
"index": 0
},
{
"node": "Done",
"type": "main",
"index": 0
},
{
"node": "X",
"type": "main",
"index": 0
},
{
"node": "Create Threads",
"type": "main",
"index": 0
}
]
]
},
"Create Threads": {
"main": [
[
{
"node": "Threads",
"type": "main",
"index": 0
}
]
]
},
"Instagram Image": {
"main": [
[
{
"node": "Instagram",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get Content",
"type": "main",
"index": 0
}
]
]
},
"Generate an image": {
"main": [
[
{
"node": "ImgBB",
"type": "main",
"index": 0
},
{
"node": "LinkedIn",
"type": "main",
"index": 0
},
{
"node": "Facebook",
"type": "main",
"index": 0
}
]
]
},
"Image Prompt Agent": {
"main": [
[
{
"node": "Generate an image",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Gemini 2.5 Flash": {
"ai_languageModel": [
[
{
"node": "Image Prompt Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
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.
facebookGraphApigoogleSheetsOAuth2ApihttpHeaderAuthhttpQueryAuthlinkedInOAuth2ApiopenAiApiopenRouterApitwitterOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Instead of manually writing, designing, and posting content, this workflow turns a single Google Sheet row into multi-platform posts plus a custom AI image that matches your message.
Source: https://n8n.io/workflows/13323/ — 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.
Managing content for multiple social media platforms manually is time-consuming and error-prone. This workflow automates content creation, image generation, approval flows, and publishing for LinkedIn
AI Posts Content Machine. Uses agent, stickyNote, outputParserStructured, lmChatAnthropic. Scheduled trigger; 28 nodes.
How it works
This comprehensive n8n workflow automatically transforms trending Google search queries into engaging LinkedIn posts using AI. The system runs autonomously, discovering viral topics, researching conte
This workflow is ideal for individuals, marketers, agencies, and brands who want to effortlessly automate the entire blogging and social media process—from idea generation to promotion. Its primary go