AutomationFlowsAI & RAG › AI-Powered LinkedIn Post Writer

AI-Powered LinkedIn Post Writer

Original n8n title: Linkedin Writer API

LinkedIn Writer API. Uses agent, lmChatOpenAi. Webhook trigger; 4 nodes.

Webhook trigger★★☆☆☆ complexityAI-powered4 nodesAgentOpenAI Chat
AI & RAG Trigger: Webhook Nodes: 4 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → OpenAI Chat 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
{
  "name": "LinkedIn Writer API",
  "description": null,
  "active": true,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "path": "linkedin-api",
        "responseMode": "responseNode",
        "httpMethod": "POST",
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Access-Control-Allow-Origin",
                "value": "*"
              },
              {
                "name": "Access-Control-Allow-Headers",
                "value": "Content-Type"
              }
            ]
          }
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        200,
        300
      ],
      "id": "webhook-node",
      "name": "Webhook"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Write a LinkedIn post with the following parameters:\n- Topic: {{ $json.body.topic || \"professional growth\" }}\n- Tone: {{ $json.body.tone || \"inspirational\" }}\n- Length: {{ $json.body.length || \"medium\" }}",
        "options": {
          "systemMessage": "You are a LinkedIn content expert and social media strategist. You create engaging, professional LinkedIn posts that drive engagement.\n\nBased on the input:\n- Topic: What the post should be about\n- Tone: The desired tone (inspirational, educational, storytelling, controversial, etc.)\n- Length: How long the post should be (short, medium, long)\n\nWrite a compelling LinkedIn post. Include:\n- An attention-grabbing hook in the first line\n- Proper formatting with line breaks\n- Relevant hashtags at the end (3-5)\n- A call to action\n\nReturn ONLY the post content, ready to copy-paste to LinkedIn."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        500,
        300
      ],
      "id": "ai-agent-node",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        500,
        500
      ],
      "id": "openai-model-node",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ \"post\": $json.output }) }}",
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Access-Control-Allow-Origin",
                "value": "*"
              },
              {
                "name": "Access-Control-Allow-Headers",
                "value": "Content-Type"
              },
              {
                "name": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        }
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        800,
        300
      ],
      "id": "respond-node",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false
  },
  "staticData": null,
  "meta": null,
  "activeVersionId": "c1312ef6-4dd5-467c-9289-52465a53350a",
  "versionCounter": 14,
  "triggerCount": 1,
  "shared": [
    {
      "updatedAt": "2026-03-01T23:54:06.103Z",
      "createdAt": "2026-03-01T23:54:06.103Z",
      "role": "workflow:owner",
      "workflowId": "hxPHGRMVfa0p7b5t",
      "projectId": "jISBlT19NO0fn5mT",
      "project": {
        "updatedAt": "2025-11-19T23:58:51.301Z",
        "createdAt": "2025-11-19T23:57:07.759Z",
        "id": "jISBlT19NO0fn5mT",
        "name": "Armani Cunningham <hamstudios101@gmail.com>",
        "type": "personal",
        "icon": null,
        "description": null,
        "creatorId": "a8e49b89-e536-45ff-8330-fab9f0943ab1"
      }
    }
  ],
  "tags": [],
  "activeVersion": {
    "updatedAt": "2026-03-02T01:03:34.416Z",
    "createdAt": "2026-03-02T01:03:34.416Z",
    "versionId": "c1312ef6-4dd5-467c-9289-52465a53350a",
    "workflowId": "hxPHGRMVfa0p7b5t",
    "nodes": [
      {
        "parameters": {
          "path": "linkedin-api",
          "responseMode": "responseNode",
          "httpMethod": "POST",
          "options": {
            "responseHeaders": {
              "entries": [
                {
                  "name": "Access-Control-Allow-Origin",
                  "value": "*"
                },
                {
                  "name": "Access-Control-Allow-Headers",
                  "value": "Content-Type"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          200,
          300
        ],
        "id": "webhook-node",
        "name": "Webhook",
        "webhookId": "linkedin-api-wh"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Write a LinkedIn post with the following parameters:\n- Topic: {{ $json.body.topic || \"professional growth\" }}\n- Tone: {{ $json.body.tone || \"inspirational\" }}\n- Length: {{ $json.body.length || \"medium\" }}",
          "options": {
            "systemMessage": "You are a LinkedIn content expert and social media strategist. You create engaging, professional LinkedIn posts that drive engagement.\n\nBased on the input:\n- Topic: What the post should be about\n- Tone: The desired tone (inspirational, educational, storytelling, controversial, etc.)\n- Length: How long the post should be (short, medium, long)\n\nWrite a compelling LinkedIn post. Include:\n- An attention-grabbing hook in the first line\n- Proper formatting with line breaks\n- Relevant hashtags at the end (3-5)\n- A call to action\n\nReturn ONLY the post content, ready to copy-paste to LinkedIn."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 2.2,
        "position": [
          500,
          300
        ],
        "id": "ai-agent-node",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4.1-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          500,
          500
        ],
        "id": "openai-model-node",
        "name": "OpenAI Chat Model",
        "credentials": {
          "openAiApi": {
            "id": "xVvmBQ0k0B49oB4q",
            "name": "n8n free OpenAI API credits"
          }
        }
      },
      {
        "parameters": {
          "respondWith": "json",
          "responseBody": "={{ JSON.stringify({ \"post\": $json.output }) }}",
          "options": {
            "responseHeaders": {
              "entries": [
                {
                  "name": "Access-Control-Allow-Origin",
                  "value": "*"
                },
                {
                  "name": "Access-Control-Allow-Headers",
                  "value": "Content-Type"
                },
                {
                  "name": "Content-Type",
                  "value": "application/json"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.1,
        "position": [
          800,
          300
        ],
        "id": "respond-node",
        "name": "Respond to Webhook"
      }
    ],
    "connections": {
      "Webhook": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "authors": "Armani Cunningham",
    "name": null,
    "description": null,
    "autosaved": false,
    "workflowPublishHistory": [
      {
        "createdAt": "2026-03-02T01:03:34.860Z",
        "id": 343,
        "workflowId": "hxPHGRMVfa0p7b5t",
        "versionId": "c1312ef6-4dd5-467c-9289-52465a53350a",
        "event": "activated",
        "userId": "a8e49b89-e536-45ff-8330-fab9f0943ab1"
      }
    ]
  }
}

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

LinkedIn Writer API. Uses agent, lmChatOpenAi. Webhook trigger; 4 nodes.

Source: https://github.com/mhmdmnsor292003-arch/free-ai-tools/blob/main/workflows/ai-linkedin-post-generator-api.json — 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

jarvis. Uses agent, lmChatOpenAi, outputParserStructured, toolWorkflow. Webhook trigger; 13 nodes.

Agent, OpenAI Chat, Output Parser Structured +3
AI & RAG

This template is ideal for: Businesses that want to provide 24/7 automated voice-based customer support Service providers needing to schedule appointments via voice interaction Teams looking to handle

Agent, Tool Think, OpenAI Chat +3
AI & RAG

Description: This n8n workflow automates a Discord bot to fetch messages from a specified channel and send AI-generated responses in threads. It ensures smooth message processing and interaction, maki

Tool Calculator, Discord, OpenAI Chat +2
AI & RAG

AI chatbot for appointment scheduling. Uses memoryBufferWindow, lmChatOpenAi, toolWorkflow, chatTrigger. Webhook trigger; 12 nodes.

Memory Buffer Window, OpenAI Chat, Tool Workflow +4
AI & RAG

💥 Build a Customer Support AI Voice Agent with GPT-5 and ElevenLabs _ VIDE. Uses agent, toolThink, lmChatOpenAi, googleSheetsTool. Webhook trigger; 12 nodes.

Agent, Tool Think, OpenAI Chat +3