AutomationFlowsAI & RAG › Automate Linkedin Content Creation with Openai, Google Sheets & Linkedin API

Automate Linkedin Content Creation with Openai, Google Sheets & Linkedin API

ByMuhammad Qaisar Mehmood @qaisar on n8n.io

Build a completely automated LinkedIn content engine using n8n, OpenAI, Google Sheets, and the LinkedIn API. This workflow reads unpublished topics from a Google Sheet, generates engaging AI-powered post content and a relevant image, and publishes directly to LinkedIn — no…

Cron / scheduled trigger★★★★☆ complexityAI-powered18 nodesOutput Parser StructuredGoogle SheetsMemory Buffer WindowLinkedInOpenAIOpenAI ChatAgent
AI & RAG Trigger: Cron / scheduled Nodes: 18 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Google Sheets 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": {
    "templateId": "self-building-ai-agent",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "3e6e5168-948a-4bda-810c-bfe5dcc27fc5",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        704,
        432
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "904f09a7-2d98-4d78-bc9f-15d1a11d80f6",
      "name": "Get row(s) in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -64,
        128
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "cd1224dc-23f4-4d87-a354-48c754d88b80",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        560,
        448
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "a595fb5a-8e20-4ab4-b11b-7b0a69c7b3dd",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        944,
        160
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "ca78e0aa-b2a6-450a-bdd0-1ab39177ca5d",
      "name": "Create a post",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1152,
        160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ec242ec6-08a8-44e9-a536-b1ae6dc84c15",
      "name": "Split Row",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        128,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cfcadeed-5aef-4094-ad03-a2c2154ad55b",
      "name": "Generate Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        560,
        32
      ],
      "parameters": {},
      "executeOnce": false,
      "typeVersion": 1.8,
      "alwaysOutputData": false
    },
    {
      "id": "f5150824-2b2f-467b-985a-3d767298a8c4",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        416,
        448
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a29795ff-1e1c-4c70-8e87-94bd5cb4d352",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        480,
        272
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "75318f0f-8d6a-441f-954f-c7a7e31aa9e9",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "Set Trigger (Day or Hour). ",
      "position": [
        -320,
        128
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "4fba5087-9d95-462b-b10e-0e659643f0cf",
      "name": "Mark as Published",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1408,
        160
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "47876340-caff-4e90-b4d1-a090d336ea70",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        304
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cdcfdbaa-b332-4996-bb87-567719ed2bd3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -48
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a1070dd9-2506-421c-813f-a0eb605c4fa1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        288
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7526901a-585d-42b7-960d-baed4ad8a09c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -144
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "aff6745e-f610-4f2a-81c2-f203749043b4",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -32
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3fe225e6-4934-4e5a-b3bb-5f532436b86a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d9c086f8-0ecb-4c19-adc3-0fe316b07b32",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        -32
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Create a post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Row": {
      "main": [
        [
          {
            "node": "Generate Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a post": {
      "main": [
        [
          {
            "node": "Mark as Published",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "Split Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

Build a completely automated LinkedIn content engine using n8n, OpenAI, Google Sheets, and the LinkedIn API. This workflow reads unpublished topics from a Google Sheet, generates engaging AI-powered post content and a relevant image, and publishes directly to LinkedIn — no…

Source: https://n8n.io/workflows/6182/ — 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

⚠️ DISCLAIMER: This workflow uses the AnySite LinkedIn community node, which is only available on self-hosted n8n instances. It will not work on n8n.cloud.

OpenAI Chat, Output Parser Structured, Google Sheets +6
AI & RAG

This workflow is designed for content creators, social media managers, digital marketers, and business owners who want to automate their LinkedIn content creation and publishing process. It's especial

Chain Llm, Agent, Agent Tool +6
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Mailgun, OpenAI, OpenAI Chat +8
AI & RAG

HDW Lead Geländewagen. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, outputParserStructured. Chat trigger; 92 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +5
AI & RAG

This workflow is designed for: Content creators and marketers E-commerce and product-based businesses Agencies producing social media visuals and videos Automation builders looking for AI-powered crea

HTTP Request, Edit Image, Google Drive +7