AutomationFlowsAI & RAG › AI Social Media Posts: Scrape, Rewrite & Post to X, Facebook, LinkedIn

AI Social Media Posts: Scrape, Rewrite & Post to X, Facebook, LinkedIn

Original n8n title: Create Ai-driven Social Media Posts and Publish to All Major Platforms

ByVincent Nguyen @vincentthenguyen on n8n.io

Instead of staring at a blank page, this workflow scrapes top-performing content, breaks down the psychological hooks, rewrites it for your specific audience, and drafts a custom text graphic. Once you approve the draft, n8n handles the heavy lifting of posting it everywhere.

Event trigger★★★★★ complexityAI-powered36 nodesTwitterFacebook Graph ApiLinkedInHTTP RequestAgent@Apify/N8N Nodes ApifyAirtableAirtable Trigger
AI & RAG Trigger: Event Nodes: 36 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #13528 — we link there as the canonical source.

This workflow follows the Agent → Airtable 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 →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e5bf2846-7844-4c8b-882b-160230af6a1a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -1296,
        1088
      ],
      "parameters": {
        "width": 1740,
        "height": 1204,
        "content": "# Flow 3+4: Auto-Posting & Repurposing"
      },
      "typeVersion": 1
    },
    {
      "id": "e9dd0feb-8b59-48b5-bcd6-1d08ed6fde96",
      "name": "X",
      "type": "n8n-nodes-base.twitter",
      "position": [
        128,
        1104
      ],
      "parameters": {
        "text": "={{ $json.fields['New Post'] }}",
        "additionalFields": {}
      },
      "credentials": {
        "twitterOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "33a50993-9d8c-4ec5-815d-9e95ad78ffc0",
      "name": "Facebook",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        128,
        1760
      ],
      "parameters": {
        "edge": "photos",
        "node": "884325181427396",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "message",
                "value": "={{ $('Approved Trigger').item.json.fields['New Caption'] }}"
              }
            ]
          }
        },
        "sendBinaryData": true,
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST",
        "binaryPropertyName": "data"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c20a32c7-868d-47ac-8cd4-8b0e8946bf9b",
      "name": "LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        128,
        1536
      ],
      "parameters": {
        "text": "={{ $('Approved Trigger').item.json.fields['New Caption'] }}",
        "person": "nY1EvjMSIJ",
        "additionalFields": {},
        "shareMediaCategory": "IMAGE"
      },
      "credentials": {
        "linkedInOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "31f48749-de65-4fd8-a595-b648782e5732",
      "name": "Threads",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        1296
      ],
      "parameters": {
        "url": "https://graph.threads.net/v1.0/25302735036057876/threads_publish",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "creation_id",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.3,
      "waitBetweenTries": 5000
    },
    {
      "id": "6abce79d-ca66-4cf2-bb7b-d468af2f929b",
      "name": "Writing Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        656,
        608
      ],
      "parameters": {
        "text": "=Inspired Post: {{ $('Limit').item.json.text }}\nAnalysis: {{ $('Analysis Agent').item.json.output }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an AI writing agent responsible for rewriting tweets based on the inspired post and analysis. Your role is to transform that analysis into a fresh tweet that matches the user\u2019s tone, topic, and target audience.\n\n## Context\n- The agent receives a structured analysis\n- The agent must recreate a new tweet following:\n  - Tone: timeless, motivational, punchy, casual\n  - Topic areas (pick one that's relevant): AI, social media marketing, AI-powered marketing, AI marketing automation, audience growth, lead generation, sales funnels\n  - My audience: Entrepreneurs who struggle to grow and monetize on social media\n  - My expertise: I build AI marketing automation to help online businesses save time and cut costs\n\n## Instructions\n1. Read and interpret the original post provided in the user message\n2. Read and interpret the analysis\n3. Extract the key insights about tone, structure, angle, and message\n4. Rewrite a new tweet that:\n   - Aligns with the provided tone guidelines\n   - Uses information from the breakdown as inspiration, not duplication\n   - Fits within the user\u2019s niche, expertise and audience\n5. Ensure:\n   - Under 280 characters\n   - No emojis\n   - No jargon\n   - No em-dashe\n6. Produce the final tweet only, with no explanations\n\n## Examples\nInput Breakdown:\n- Tone: casual, timeless\n- Structure: hook + myth busting + encouragement\n- Message: You don\u2019t need a huge audience to sell coaching\n- Audience Pain: struggling to monetize small followings\n\nOutput Tweet:\nYou don\u2019t need thousands of followers to build a real business.  \nYou need the right offer, clear messaging, and one channel you can show up on consistently.  \nSmall audiences convert when the value is undeniable.\n\n## Final Notes\n- Never copy the original tweet or breakdown directly. Always create a fresh, original version.\n- Keep the tone simple, human, and high-signal.\n- Prioritize clarity, usefulness, and relevance to coaches, consultants, educators."
        },
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "ed865cd6-1571-455b-88d3-7da479f9dd6e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -1312,
        464
      ],
      "parameters": {
        "color": 4,
        "width": 3160,
        "height": 468,
        "content": "# Flow 1+2: Research & Recreating"
      },
      "typeVersion": 1
    },
    {
      "id": "1dc11fbb-8386-4481-9999-ba58d9dfc2e5",
      "name": "Scrape Tweets",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -720,
        608
      ],
      "parameters": {
        "memory": 256,
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "CJdippxWmn9uRfooo",
          "cachedResultUrl": "https://console.apify.com/actors/CJdippxWmn9uRfooo/input",
          "cachedResultName": "Tweet Scraper|$0.25/1K Tweets | Pay-Per Result | No Rate Limits (kaitoeasyapi/twitter-x-data-tweet-scraper-pay-per-result-cheapest)"
        },
        "timeout": {},
        "operation": "Run actor and get dataset",
        "customBody": "={\n    \"filter:blue_verified\": false,\n    \"filter:consumer_video\": false,\n    \"filter:has_engagement\": false,\n    \"filter:hashtags\": false,\n    \"filter:images\": false,\n    \"filter:links\": false,\n    \"filter:media\": false,\n    \"filter:mentions\": false,\n    \"filter:native_video\": false,\n    \"filter:nativeretweets\": false,\n    \"filter:news\": false,\n    \"filter:pro_video\": false,\n    \"filter:quote\": false,\n    \"filter:replies\": false,\n    \"filter:safe\": false,\n    \"filter:spaces\": false,\n    \"filter:twimg\": false,\n    \"filter:videos\": false,\n    \"filter:vine\": false,\n    \"from\": \"{{ $('Get Username').item.json.Username }}\",\n    \"include:nativeretweets\": false,\n    \"lang\": \"en\",\n    \"maxItems\": 15,\n    \"queryType\": \"Latest\"\n}"
      },
      "credentials": {
        "apifyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "23f3a44c-3029-48e5-ac1f-b1188c96a719",
      "name": "Analysis Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        240,
        608
      ],
      "parameters": {
        "text": "=Social media post: {{ $json.text }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an AI agent designed to analyze social media posts and break down their structure so they can be recreated from scratch. Your primary purpose is to help users understand why a post works, what psychological patterns are being used, and how to rebuild the post into a repeatable template. Your analysis focuses on posts from X.\n\n## Context\n- The agent receives a social media post.\n- The user wants to understand how to recreate the post for growing followers, generating leads, building authority, and storytelling.\n- The agent should break down the post in detail.\n- The agent should generate a reusable template that mirrors the structure and psychological intent of the original post.\n- The agent determines what psychological frameworks apply naturally to the post rather than following a predefined list.\n\n## Instructions\n1. Grab the social media post\n2. Break down the structure of the post into clear components.\n3. Explain why each component works and what psychological principles are at play.\n4. Extract the underlying narrative, persuasive techniques, and style choices.\n5. Convert the structure into a fill-in-the-blank template that users can reuse.\n6. Avoid stylistic bias. Base the analysis strictly on the post provided.\n\n## Examples\nInput:\n\"Here\u2019s the biggest shift that helped me grow my business\u2026  \nI stopped trying to appeal to everyone.  \nThe moment I went all-in on serving creators, everything changed.  \nYour niche isn\u2019t limiting. Your niche is leverage.\"\n\nOutput Overview:\n- Hook type: Curiosity-based transformation.\n- Analysis describing purpose, psychological elements, and effect on readers.\n- Recreation template:  \n  \"Here\u2019s the biggest shift that helped me [achieve desired outcome]\u2026  \n  I stopped [common mistake].\n  The moment I [specific pivot], everything changed.  \n  Your [niche/topic] isn\u2019t [negative belief]. Your [niche/topic] is [reframe].\"\n\n## Output Guidelines\n- Always maintain clarity and keep explanations simple\n- Do not rewrite or improve the original post; only analyze it\n- Ensure all outputs are easy to copy-paste into workflow tools such as n8n\n- Skip the pleasantries, compliments, or preamble. Get straight to the task\n- Skip the conclusion, just end with the \"recreation template\"\n- Do not bold text (avoid this syntax: **This is bold text**)"
        },
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "39d5493a-5f8b-4a69-b249-e2e8433a959e",
      "name": "Get Username",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -992,
        608
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "app1OpqBHenznP8od",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od",
          "cachedResultName": "Lv1: Text Based Posts"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblEovZulFXLEjOFv",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od/tblEovZulFXLEjOFv",
          "cachedResultName": "Inspiration"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "{Scraped?} = FALSE()"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e358d1f2-ab6a-48d7-956e-e259003bfdd4",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        0,
        608
      ],
      "parameters": {
        "maxItems": 5
      },
      "typeVersion": 1
    },
    {
      "id": "a47189dc-b92f-420b-b7aa-e362ab6c02a0",
      "name": "Sort by Views",
      "type": "n8n-nodes-base.sort",
      "position": [
        -224,
        608
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "order": "descending",
              "fieldName": "viewCount"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "360ab0c1-d64b-4fb0-95a3-6f2bb979e687",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        -464,
        608
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1a484f81-ae38-47b1-997e-506ca3e005bc",
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.viewCount }}",
              "rightValue": ""
            },
            {
              "id": "865adc10-c656-4a06-aba9-17c449e39f1b",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.text }}",
              "rightValue": "@"
            },
            {
              "id": "635ecf76-f095-4b18-8e7f-f508c8cced33",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.text }}",
              "rightValue": "https"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "baeeb513-58ff-4382-8d25-2526d5b0adac",
      "name": "Scraped?",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1664,
        608
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "app1OpqBHenznP8od",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od",
          "cachedResultName": "Lv1: Text Based Posts"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblEovZulFXLEjOFv",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od/tblEovZulFXLEjOFv",
          "cachedResultName": "Inspiration"
        },
        "columns": {
          "value": {
            "Scraped?": true,
            "Username": "={{ $('Get Username').item.json.Username }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Username",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Username",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Scraped?",
              "type": "boolean",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Scraped?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Username"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "07c03044-076f-404b-ac94-6edebf1cb64e",
      "name": "Create records",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1440,
        608
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "app1OpqBHenznP8od",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od",
          "cachedResultName": "Lv1: Text Based Posts"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblbVyuvTdlvoRk4U",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od/tblbVyuvTdlvoRk4U",
          "cachedResultName": "Content"
        },
        "columns": {
          "value": {
            "URL": "={{ $('Limit').item.json.url }}",
            "Date": "={{ $('Limit').item.json.createdAt }}",
            "Name": "={{ $('Limit').item.json.author.name }}",
            "Likes": "={{ $('Limit').item.json.likeCount }}",
            "Views": "={{ $('Limit').item.json.viewCount }}",
            "Reposts": "={{ $('Limit').item.json.retweetCount }}",
            "Analysis": "={{ $('Analysis Agent').item.json.output }}",
            "Comments": "={{ $('Limit').item.json.replyCount }}",
            "New Post": "={{ $('Writing Agent').item.json.output }}",
            "Bookmarks": "={{ $('Limit').item.json.bookmarkCount }}",
            "New Caption": "={{ $('Caption Agent').item.json.output }}",
            "Inspired Post": "={{ $('Limit').item.json.text }}"
          },
          "schema": [
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Views",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Views",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Comments",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Comments",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reposts",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Reposts",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Bookmarks",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Bookmarks",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Analysis",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Analysis",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Inspired Post",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Inspired Post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Post",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "New Post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Caption",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "New Caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Modified",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last Modified",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Approved",
                  "value": "Approved"
                },
                {
                  "name": "Posted",
                  "value": "Posted"
                }
              ],
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2c7a74f4-be2a-4940-9e6e-e4e43f1a1e2f",
      "name": "Approved Trigger",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        -1232,
        1664
      ],
      "parameters": {
        "baseId": {
          "__rl": true,
          "mode": "id",
          "value": "app1OpqBHenznP8od"
        },
        "tableId": {
          "__rl": true,
          "mode": "id",
          "value": "tblbVyuvTdlvoRk4U"
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerField": "=Last Modified",
        "authentication": "airtableTokenApi",
        "additionalFields": {
          "formula": "{Status} = \"Approved\""
        }
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "79c6b2b4-2303-4f1d-97af-2f01cfa3bcbe",
      "name": "Mark as Posted",
      "type": "n8n-nodes-base.airtable",
      "position": [
        128,
        2144
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "app1OpqBHenznP8od",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od",
          "cachedResultName": "Social Media Posts"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblbVyuvTdlvoRk4U",
          "cachedResultUrl": "https://airtable.com/app1OpqBHenznP8od/tblbVyuvTdlvoRk4U",
          "cachedResultName": "Table 1"
        },
        "columns": {
          "value": {
            "Title": "={{ $json.fields.Title }}",
            "Status": "Posted"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Views",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Views",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Likes",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Comments",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Comments",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reposts",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Reposts",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Bookmarks",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Bookmarks",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Analysis",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Analysis",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Inspired Post",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Inspired Post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Post",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "New Post",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "New Caption",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "New Caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Modified",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last Modified",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Approved",
                  "value": "Approved"
                },
                {
                  "name": "Posted",
                  "value": "Posted"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Title"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "602c26fe-20b9-4953-b513-012b776f317e",
      "name": "Instagram",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        128,
        1968
      ],
      "parameters": {
        "edge": "media_publish",
        "node": "17841462646273569",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "creation_id",
                "value": "={{ $json.id }}"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 5000
    },
    {
      "id": "00088dc1-dd79-4260-b163-85398939a136",
      "name": "Generate an image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -800,
        1664
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "=Create an image with a black background and soft white serif, 12 pixels text that reads:\n\"{{ $json.fields['New Post'] }}\"\n\nThe text should be left-aligned, easily readable, and has line breaks between sections",
        "options": {
          "size": "1024x1536",
          "quality": "medium"
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "415e9735-8527-48ad-849b-66173d4c9aaa",
      "name": "Caption Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1072,
        608
      ],
      "parameters": {
        "text": "=Post: {{ $json.output }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an expert social media caption writer. Your task is to create engaging captions for Instagram, Facebook, and LinkedIn based on the post content provided.\n\n## Instructions\nCAPTION REQUIREMENTS:\n- Write in a tone that matches the content\n- Hook readers in the first line to stop the scroll\n- Keep it concise and scannable\n- Include a clear call-to-action (CTA) when appropriate\n- Use natural language - avoid overly salesy or robotic phrasing\n- Suggest 3-5 relevant hashtags that aren't overly generic\n\nCAPTION STRUCTURE:\n1. Opening hook (1-2 sentences that grab attention)\n2. Main message (expand on the key point or story)\n3. Value or takeaway (what the audience gains)\n4. Call-to-action (engage, share, comment, click, etc.)\n5. Hashtags (on separate lines at the end)\n\n## OUTPUT\nProvide ONE polished, ready-to-post caption that feels authentic and engaging.\n\n## Additional notes\n- Avoid clich\u00e9s like \"in today's digital world\" or \"game-changer\"\n- No emojis\n- No jargon\n- No em-dashe\n- Write like a human, not a marketing robot\n- Make it shareable and conversation-starting"
        },
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "c81b787a-2d06-417f-8c56-abc5e896298f",
      "name": "Upload Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -544,
        1776
      ],
      "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": "bb58d070-1335-4408-97d7-284bfdff6a6a",
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        -48,
        1296
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "ef49b2eb-c542-40d7-9e35-1173dd8afb15",
      "name": "Threads Container",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -224,
        1296
      ],
      "parameters": {
        "url": "https://graph.threads.net/v1.0/25302735036057876/threads",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{ $json.fields['New Post'] }}"
            },
            {
              "name": "media_type",
              "value": "TEXT"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "ebd354d7-a628-47d5-9e2e-163dbd0cc70e",
      "name": "Wait 5 sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        -48,
        1968
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "3e751cbd-2b85-47ed-bf46-1dd4566aaa34",
      "name": "Instagram Container",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -224,
        1968
      ],
      "parameters": {
        "edge": "media",
        "node": "17841462646273569",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "image_url",
                "value": "={{ $('Upload Image').item.json.data.image.url }}"
              },
              {
                "name": "caption",
                "value": "={{ $('Approved Trigger').item.json.fields['New Caption'] }}"
              },
              {
                "name": "node",
                "value": "=17841462646273569"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4d9ae902-37f4-4d6a-a947-da4a8928f982",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1248,
        608
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 12
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "18a22468-6fe3-41c3-893c-0329ed75fbca",
      "name": "Gemini 3 Flash",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        160,
        816
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-3-flash-preview"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "83a68f0e-12e2-44b3-99ae-5517fbfdce0a",
      "name": "GPT 5.2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        864,
        816
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "gpt-5.2"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "284453f7-4240-4521-a270-f238382a9f87",
      "name": "Wait 5sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        -400,
        1888
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5fbe259d-6817-4562-bcbb-7eb21606550c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2432,
        704
      ],
      "parameters": {
        "color": 3,
        "width": 976,
        "height": 1264,
        "content": "# Social Media Post Automation for Content Creators\nThis n8n template is a complete, two-part social media engine: it automates competitor/inspiration research, uses AI to recreate viral formats for your niche, and handles multi-platform distribution with auto-generated visuals.\n\nInstead of staring at a blank page, this workflow scrapes top-performing content, breaks down the psychological hooks, rewrites it for your specific audience, and drafts a custom text graphic. Once you approve the draft, n8n handles the heavy lifting of posting it everywhere.\n\nYou curate and approve. n8n researches, writes, designs, and publishes.\n\n## How it works\n### Part 1: Research & Recreating\n1. A scheduled trigger runs daily to pull a target username from your Airtable database.\n2. Apify scrapes the latest tweets from that user, filtering out replies and links, and sorts them by the highest view count.\n3. An AI Analysis Agent (Gemini) breaks down the top post's structure and creates a reusable template.\n4. An AI Writing Agent (GPT) uses that template to write a fresh, original post tailored to your niche.\n5. A Caption Agent (GPT) writes an engaging, long-form caption with hooks and hashtags.\n6. The draft is saved into Airtable for your review.\n\n### Part 2: Auto-Posting & Repurposing\n1. When you change a draft's status to **\"Approved\"** in Airtable, the second flow triggers.\n2. An AI Image generator creates a sleek text-graphic based on your short post.\n3. The image is uploaded to ImgBB to generate a public URL.\n4. The pure text version is pushed directly to X (Twitter) and Threads (via authenticated HTTP requests).\n5. The generated image and long-form caption are published to LinkedIn, Facebook, and Instagram.\n6. Finally, the Airtable record is marked as **\"Posted.\"**\n\n## How to use\n1. Set up an Airtable base with your target usernames and a table for content drafts.\n2. Update the AI Agent system prompts (Writing and Caption) to match your specific target audience, expertise, and tone.\n3. Connect all your platform credentials in n8n (ensure you use the credential manager for the HTTP nodes, like HTTP Header Auth for Threads and Query Auth for ImgBB).\n4. Let the schedule scrape and draft content for you.\n5. Simply mark a draft as \"Approved\" in Airtable when you want it to go live.\n\n## What you get\n* Automated viral content research and curation\n* AI-driven structural analysis and rewriting\n* Auto-generated text-graphics for visual platforms\n* Hands-free publishing to 5 platforms (X, Threads, IG, FB, LinkedIn)\n* A centralized content approval system\n\n## Requirements\n* Airtable account\n* Apify account (Twitter Scraper actor)\n* OpenAI & Google Gemini API credentials\n* ImgBB account\n* X (Twitter), Threads, LinkedIn, Facebook, and Instagram accounts\n\nNeed help tweaking the AI agents for your specific funnel?\n\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
    },
    {
      "id": "d8577aad-e76f-4775-849a-1e98b76626e6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        192
      ],
      "parameters": {
        "color": 2,
        "width": 448,
        "height": 240,
        "content": "### 1. Research & Scrape Top Content\n\nA Schedule Trigger runs daily to find inspiration.\n\nEach run:\n\n* Pulls a target username from Airtable\n* Uses Apify to scrape their recent posts\n* Filters out junk and sorts the remaining posts by View Count\n* Grabs the top 5 performing posts to feed into the AI agents"
      },
      "typeVersion": 1
    },
    {
      "id": "43eb49a9-1b0f-4b8d-a7c5-753eb7e7525e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        192
      ],
      "parameters": {
        "color": 5,
        "width": 624,
        "height": 240,
        "content": "### 2. AI Analysis & Rewriting\n\nThe top-performing post is sent through three AI agents:\n\n* **Analysis Agent (Gemini):** Breaks down the psychology and structure of the post.\n* **Writing Agent (GPT):** Uses that breakdown to write a fresh, original short-form post for your niche.\n* **Caption Agent (GPT):** Expands the idea into a long-form caption with hooks and hashtags."
      },
      "typeVersion": 1
    },
    {
      "id": "46f76efa-7222-4cb8-a771-0e7de149f773",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        192
      ],
      "parameters": {
        "color": 6,
        "width": 448,
        "height": 240,
        "content": "### 3. Save Drafts for Approval\n\nThe generated content isn't posted immediately.\n\nInstead:\n\n* The original post, AI analysis, new short post, and new caption are saved as a new row in Airtable.\n* The original target username is marked as \"Scraped\" so you cycle through fresh inspiration."
      },
      "typeVersion": 1
    },
    {
      "id": "edb041dd-d40d-4f98-88aa-6ea2de2544a0",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        1856
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 240,
        "content": "### 4. Approval Trigger & Image Generation\n\nThe publishing sequence is completely controlled by you.\n\n* An Airtable trigger listens for any record where **Status = Approved**.\n* Once triggered, an OpenAI image node generates a dark-mode text graphic of your short post.\n* The image is uploaded to ImgBB to create a shareable URL for social platforms."
      },
      "typeVersion": 1
    },
    {
      "id": "7c85b19b-d874-42ff-9bf4-d651a9d8d908",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        1120
      ],
      "parameters": {
        "color": 6,
        "width": 454,
        "height": 192,
        "content": "### 5. Publish Text to X and Threads\n\nYour short-form post is sent to text-first platforms:\n\n* X (Twitter) via the native node\n* Threads via an HTTP request (using n8n's secure credential manager)"
      },
      "typeVersion": 1
    },
    {
      "id": "3f90b377-9b3c-4fc4-9a88-ce769222f54a",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        1648
      ],
      "parameters": {
        "color": 4,
        "width": 358,
        "height": 304,
        "content": "### 6. Publish Visuals to LinkedIn, Facebook & Instagram\nThe hosted AI image + your long-form caption are posted to:\n\n* LinkedIn\n* Facebook\n* Instagram (using a container + publish sequence via Facebook Graph API)\n\nOnce all platforms are successfully published, the Airtable record is updated to \"Posted.\""
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "X": {
      "main": [
        []
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Analysis Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Sort by Views",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT 5.2": {
      "ai_languageModel": [
        [
          {
            "node": "Writing Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Caption Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Threads": {
      "main": [
        []
      ]
    },
    "Wait 5s": {
      "main": [
        [
          {
            "node": "Threads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook": {
      "main": [
        []
      ]
    },
    "LinkedIn": {
      "main": [
        []
      ]
    },
    "Wait 5sec": {
      "main": [
        [
          {
            "node": "Instagram Container",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5 sec": {
      "main": [
        [
          {
            "node": "Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Username": {
      "main": [
        [
          {
            "node": "Scrape Tweets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image": {
      "main": [
        [
          {
            "node": "Wait 5sec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Caption Agent": {
      "main": [
        [
          {
            "node": "Create records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Tweets": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort by Views": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Writing Agent": {
      "main": [
        [
          {
            "node": "Caption Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analysis Agent": {
      "main": [
        [
          {
            "node": "Writing Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create records": {
      "main": [
        [
          {
            "node": "Scraped?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 3 Flash": {
      "ai_languageModel": [
        [
          {
            "node": "Analysis Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Posted": {
      "main": [
        []
      ]
    },
    "Approved Trigger": {
      "main": [
        [
          {
            "node": "X",
            "type": "main",
            "index": 0
          },
          {
            "node": "Mark as Posted",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Username",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "LinkedIn",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Threads Container",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads Container": {
      "main": [
        [
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram Container": {
      "main": [
        [
          {
            "node": "Wait 5 sec",
            "type": "main",
            "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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Instead of staring at a blank page, this workflow scrapes top-performing content, breaks down the psychological hooks, rewrites it for your specific audience, and drafts a custom text graphic. Once you approve the draft, n8n handles the heavy lifting of posting it everywhere.

Source: https://n8n.io/workflows/13528/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents. ​

Tool Http Request, Agent, HTTP Request +27
AI & RAG

Hacker News to Video Template - AlexK1919. Uses manualTrigger, hackerNews, splitInBatches, lmChatOpenAi. Event-driven trigger; 48 nodes.

Hacker News, OpenAI Chat, Tool Http Request +11
AI & RAG

Ultimate Blogblizt is a powerhouse workflow that solves the tedious task of crafting and publishing SEO-optimized tech blog posts. It integrates AI models (OpenAI, Google Gemini), WordPress, and multi

Chain Llm, Telegram Trigger, OpenAI Chat +10
AI & RAG

Awesome N8N Templates. Uses stickyNote, gmail, executeWorkflowTrigger, httpRequest. Event-driven trigger; 35 nodes.

Gmail, Execute Workflow Trigger, HTTP Request +7
AI & RAG

Whether you’re a product manager, developer, or simply curious about workflow automation, you’re in the right place. This n8n workflow is designed to help you streamline and automate your social media

Output Parser Structured, OpenAI Chat, LinkedIn +8