{
  "id": 7007,
  "name": "Ai-powered LinkedIn content generator with OpenAI GPT-4 and DALL-E",
  "description": "\n## This n8n template helps you build a full AI-powered LinkedIn content generator with just a few clicks. \n\nPaired with the [free WeWeb UI template](https://go.weweb.io/zoYeg5g), it becomes a ready-to-use web app where users can:\n- Add their own OpenAI API key  \n- Customize the prompt and define 6 content topics  \n- Edit the AI-generated topics  \n- Choose when to generate LinkedIn posts, complete with hashtags and an optional image\n\n## Who This Is For\nPerfect for marketers, indie hackers, and solopreneurs who want to build their personal brand on LinkedIn while staying in control of what gets posted.\n\n---\n\n## \ud83e\udde0 What Makes This Different\n\nUnlike most AI agents, **you stay fully in control**:\n- You define the tone and focus via the prompt.\n- You choose which topics to keep or modify.\n- You decide when to generate a post.\n- You can build on top of this and create your own SaaS product.\n\nIt\u2019s also **modular and extendable**\u2014hook it up to your backend, add user login, or feed AI improvements based on user input.\n\n---\n\n## \u2699\ufe0f How It Works\n1. **Triggering Events**: The app includes 3 pre-configured triggers, ready to be hooked into your WeWeb frontend. Just update the webhook URLs after duplicating the n8n workflow.\n2. **Topic Generation**: A call is made to OpenAI (GPT-4) to generate topic ideas based on your prompt.\n3. **Post Creation**: Once topics are approved or edited, GPT-4 writes full posts with suggested hashtags.\n4. **Image Generation** *(Optional)*: If enabled, a DALL\u00b7E call generates a relevant image.\n5. **Everything Stays Local**: All data and images are handled locally, no cloud storage setup needed.\n\n---\n\n## \ud83e\uddea Requirements & Setup\nNo fancy infrastructure required. Here\u2019s what helps you get started:\n- **Free WeWeb account** (recommended) to use the frontend UI template  \n- **OpenAI account** with API access (for GPT-4 and DALL\u00b7E)  \n- **n8n account** (self-hosted or cloud) to run the backend workflow  \n\nThe template is **completely free** to use. Since each user adds their own OpenAI API key, you don't need to worry about usage costs or rate limits on your end.\n\n---\n\n## \ud83d\udd27 Want to Go Further?\nThis setup is beginner-friendly, but developers can:\n- Add user accounts  \n- Save post history  \n- Feed user feedback back into the prompt logic  \n- Launch their own branded version as a SaaS",
  "categories": [
    {
      "id": 31,
      "name": "Content Creation"
    },
    {
      "id": 51,
      "name": "Multimodal AI"
    }
  ],
  "totalViews": 1676,
  "createdAt": "2025-08-05T11:50:25.930Z",
  "workflow": {
    "id": "Fd1PvKuULAbZsQuf",
    "meta": {
      "instanceId": "1dcd9ef6d607f38b819b26a2c4dbd06dac0f27a5f67d658e0aebc81336da332e",
      "templateId": "4968",
      "templateCredsSetupCompleted": true
    },
    "name": "Automated LinkedIn Content Creation with GPT-4 and DALL-E on top of a UI",
    "tags": [
      {
        "id": "d6uTHkmw5JpIUCo4",
        "name": "weweb-version",
        "createdAt": "2025-07-10T11:32:42.142Z",
        "updatedAt": "2025-07-10T11:32:42.142Z"
      }
    ],
    "nodes": [
      {
        "id": "f6716480-5a8c-4f84-9e91-b672b388d4bc",
        "name": "OpenAI Chat Model",
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "position": [
          1120,
          -260
        ],
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "credentials": {
          "openAiApi": {
            "id": "credential-id",
            "name": "openAiApi Credential"
          }
        },
        "typeVersion": 1.2
      },
      {
        "id": "06f17fd9-21cf-4540-a3c3-44f0f9c87e2a",
        "name": "Structured Output Parser",
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "position": [
          1320,
          -240
        ],
        "parameters": {
          "jsonSchemaExample": "[{\n \"title\": \"AI as Your First Content Hire: Why Founders Shouldn't Wait to Outsource Creation\",\n            \"rationale\": \"Most solopreneurs delay content scaling because they think hiring a ghostwriter is the next step \u2014 but AI can handle 80% with proper systems. This shifts content from a creative bottleneck to a scalable growth lever.\",\n            \"hook\": \"Ghostwriters are outdated. Train GPT once, and it ships LinkedIn gold in your voice daily. Welcome to hands-free thought leadership.\"\n          }]"
        },
        "typeVersion": 1.2
      },
      {
        "id": "3eefe0fd-b856-4b43-ae29-df4876c6545e",
        "name": "Content creator",
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "position": [
          1080,
          160
        ],
        "parameters": {
          "text": "=You are a linkedin content creator and copywriter. Given the title {{ $json.body.title }}, the rationale {{ $json.body.rationale }}, and suggested hook: {{ $json.body.hook }}. Generate text content for a linkedin post. Also describe a suitable image for the post.",
          "batching": {},
          "promptType": "define",
          "hasOutputParser": true
        },
        "typeVersion": 1.7
      },
      {
        "id": "1318cc36-eee8-46f7-9a56-37d9d7cb9a35",
        "name": "OpenAI Chat Model1",
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "position": [
          1060,
          400
        ],
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "credentials": {
          "openAiApi": {
            "id": "credential-id",
            "name": "openAiApi Credential"
          }
        },
        "typeVersion": 1.2
      },
      {
        "id": "2e59bfdc-e691-4d13-824a-10ab0d5e935c",
        "name": "Structured Output Parser1",
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "position": [
          1228,
          380
        ],
        "parameters": {
          "jsonSchemaExample": "{\n  \"post title\": \"Exciting New Feature Launch \ud83d\ude80\",\n  \"post content\": \"After months of collaboration, testing, and fine-tuning, we're thrilled to introduce our latest product feature: Smart Insights. It helps users uncover meaningful patterns in their data with just a few clicks. This wouldn't have been possible without our incredible team and supportive community. We're excited for what's next \u2014 and we'd love your feedback!\",\n  \"image description\": \"A laptop screen showcasing the new Smart Insights dashboard with colorful charts and graphs, surrounded by a team clapping in the background.\"\n}"
        },
        "typeVersion": 1.2
      },
      {
        "id": "dcd07c39-6727-479b-bc65-33dcace9bd82",
        "name": "Hashtag generator /SEO",
        "type": "@n8n/n8n-nodes-langchain.agent",
        "disabled": true,
        "position": [
          1456,
          260
        ],
        "parameters": {
          "text": "=You are an SEO specialist for LinkedIn. Your task is to generate highly relevant and effective hashtags for the following post. Consider the post's content, target audience, and current LinkedIn trends to maximize visibility and engagement.\n\n<post_title>{{ $json.output['post title'] }}</post_title>\n<post_content>{{ $json.output['post content'] }}</post_content>\n\nPlease generate:\n1. **3-5 broad, high-volume hashtags** (e.g., #AI, #Marketing, #Business)\n2. **3-5 niche-specific hashtags** that are directly relevant to the post's core topic (e.g., #SocialMediaAutomation, #ContentCreationAI, #LinkedInMarketingTips)\n3. **1-2 trending/topical hashtags** if applicable (e.g., #FutureOfWork, #DigitalTransformation)\n\nPresent them as a comma-separated list.",
          "options": {},
          "promptType": "define",
          "hasOutputParser": true
        },
        "typeVersion": 2
      },
      {
        "id": "08fcc303-b0ba-4c95-9075-c141c93c6355",
        "name": "OpenAI Chat Model2",
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "position": [
          1484,
          480
        ],
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "credentials": {
          "openAiApi": {
            "id": "credential-id",
            "name": "openAiApi Credential"
          }
        },
        "typeVersion": 1.2
      },
      {
        "id": "b33b1379-b258-4213-9496-f0c7d5750421",
        "name": "Structured Output Parser2",
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "position": [
          1604,
          480
        ],
        "parameters": {
          "jsonSchemaExample": "{\n  \"post title\": \"Exciting New Feature Launch \ud83d\ude80\",\n  \"post content\": \"After months of collaboration, testing, and fine-tuning, we're thrilled to introduce our latest product feature: Smart Insights. It helps users uncover meaningful patterns in their data with just a few clicks. This wouldn't have been possible without our incredible team and supportive community. We're excited for what's next \u2014 and we'd love your feedback!\",\n  \"image description\": \"A laptop screen showcasing the new Smart Insights dashboard with colorful charts and graphs, surrounded by a team clapping in the background.\",\n\"Hashtags\":[\"#AI\",\"#Automation\"]\n}"
        },
        "typeVersion": 1.2
      },
      {
        "id": "841270d3-9773-485e-a445-0a5caa1cd544",
        "name": "Respond to Webhook",
        "type": "n8n-nodes-base.respondToWebhook",
        "position": [
          1580,
          -540
        ],
        "parameters": {
          "options": {},
          "respondWith": "json",
          "responseBody": "={{ $json.output }}"
        },
        "typeVersion": 1.3
      },
      {
        "id": "3309ad70-6683-4a95-9f74-7388353992f6",
        "name": "Respond to Webhook1",
        "type": "n8n-nodes-base.respondToWebhook",
        "position": [
          1832,
          260
        ],
        "parameters": {
          "options": {},
          "respondWith": "allIncomingItems"
        },
        "typeVersion": 1.3
      },
      {
        "id": "da0ef4de-963e-40b4-ba39-ba7f6f7fa54f",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "position": [
          1080,
          1080
        ],
        "parameters": {
          "url": "https://api.openai.com/v1/images/generations",
          "method": "POST",
          "options": {},
          "sendBody": true,
          "authentication": "predefinedCredentialType",
          "bodyParameters": {
            "parameters": [
              {
                "name": "model",
                "value": "dall-e-3"
              },
              {
                "name": "prompt",
                "value": "={{ $json.body.imgDescription }}"
              },
              {
                "name": "size",
                "value": "1024x1024"
              },
              {
                "name": "response_format",
                "value": "b64_json"
              }
            ]
          },
          "nodeCredentialType": "openAiApi"
        },
        "credentials": {
          "openAiApi": {
            "id": "credential-id",
            "name": "openAiApi Credential"
          },
          "httpBearerAuth": {
            "id": "credential-id",
            "name": "httpBearerAuth Credential"
          }
        },
        "typeVersion": 4.2
      },
      {
        "id": "7e70feb1-1341-4673-9676-d93c791c29b7",
        "name": "Respond to Webhook2",
        "type": "n8n-nodes-base.respondToWebhook",
        "position": [
          1300,
          1080
        ],
        "parameters": {
          "options": {}
        },
        "typeVersion": 1.3
      },
      {
        "id": "ec50678d-d47a-4435-8665-f390dc409447",
        "name": "Generate post with hashtags",
        "type": "n8n-nodes-base.webhook",
        "position": [
          860,
          260
        ],
        "webhookId": "691a4b8d-542c-4d58-af2d-6851c2ba0edf",
        "parameters": {
          "path": "691a4b8d-542c-4d58-af2d-6851c2ba0edf",
          "options": {},
          "httpMethod": "POST",
          "responseMode": "responseNode"
        },
        "typeVersion": 2
      },
      {
        "id": "b69486be-f649-439a-a851-888945bb333d",
        "name": "Generate 6 topics",
        "type": "n8n-nodes-base.webhook",
        "position": [
          780,
          -520
        ],
        "webhookId": "4aebedf5-666f-40a8-925c-5ce8a5a6b967",
        "parameters": {
          "path": "4aebedf5-666f-40a8-925c-5ce8a5a6b967",
          "options": {},
          "httpMethod": "POST",
          "responseMode": "responseNode"
        },
        "typeVersion": 2
      },
      {
        "id": "343f3302-b180-42b1-888a-98245a331409",
        "name": "Generate image",
        "type": "n8n-nodes-base.webhook",
        "position": [
          860,
          1080
        ],
        "webhookId": "61b02992-5fde-4dd6-a7f9-8edc50e1f6c6",
        "parameters": {
          "path": "61b02992-5fde-4dd6-a7f9-8edc50e1f6c6",
          "options": {},
          "httpMethod": "POST",
          "responseMode": "responseNode"
        },
        "typeVersion": 2
      },
      {
        "id": "46433d24-5145-484c-b75e-df8db830a2e4",
        "name": "Sticky Note",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          360,
          -800
        ],
        "parameters": {
          "width": 360,
          "height": 660,
          "content": "## Step 1 - Generate topics\nThis webhook expect two values: \n1. api_key: this should be an OpenAI key \n2. prompt: this should be a detailed prompt giving the AI information about your context\n\nHere's an example of what the API call needs to look like\n\n![](https://cdn.weweb.io/designs/d8eabf49-48a9-4c2f-995c-594936425772/sections/api_call_for_topics.png?_wwcv=1754315044747)"
        },
        "typeVersion": 1
      },
      {
        "id": "9f2bdded-b0ae-490a-ab58-39618f3b3c1d",
        "name": "Content topic generator",
        "type": "@n8n/n8n-nodes-langchain.agent",
        "position": [
          1140,
          -540
        ],
        "parameters": {
          "text": "={{ $json.body.prompt }}",
          "options": {},
          "promptType": "define",
          "hasOutputParser": true
        },
        "typeVersion": 2
      },
      {
        "id": "58361897-236b-46d7-8f73-3be0e1a1f9d5",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1860,
          -680
        ],
        "parameters": {
          "width": 380,
          "height": 520,
          "content": "## Output \nThis webhook returns a list of 6 items, each containing a title, hook, and rationale for writing about the topic:\n\n![](https://cdn.weweb.io/designs/d8eabf49-48a9-4c2f-995c-594936425772/sections/topics_output.png?_wwcv=1754315497587)\n\nSave this list in your UI builder so users can edit it and reference it later."
        },
        "typeVersion": 1
      },
      {
        "id": "e55b4a55-8b7b-445b-af09-70611a05cac7",
        "name": "Sticky Note2",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          420,
          -20
        ],
        "parameters": {
          "color": 4,
          "width": 380,
          "height": 860,
          "content": "## Step 2 - Generate a post & related hashtags\nThis webhook expects an OpenAI API key (api_key) and information about the post you want to generate (title, hook, rationale)\n\nThe API call from your UI builder will look something like this:\n\n![](https://cdn.weweb.io/designs/d8eabf49-48a9-4c2f-995c-594936425772/sections/api_call_for_post.png?_wwcv=1754315778347)"
        },
        "typeVersion": 1
      },
      {
        "id": "1797d890-d60b-43e8-84d2-cab481440df7",
        "name": "Sticky Note3",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          360,
          -1260
        ],
        "parameters": {
          "color": 3,
          "width": 1020,
          "height": 320,
          "content": "## Why 3 webhooks? TL;DR: to give users full control over AI outputs\n\nMany n8n templates use an all-in-one AI agent, which is great for saving time. However, we structured this template a bit differently. The goal: give end-users more control over the AI-generated content.\n\nThis template is designed to serve as the backbone of a UI built with an app builder like WeWeb. The interface includes three screens:\n1. Create topics\n2. Edit topics and generate posts\n3. Edit posts and generate images\n\nEach screen has its own dedicated webhook. This ensures users are 100% in control of the content that\u2019s generated and published to their LinkedIn account.\n\nIf you'd like to connect this n8n template directly to a WeWeb UI, it's possible. The WeWeb template is available for free [right here](https://go.weweb.io/zoYeg5g). "
        },
        "typeVersion": 1
      },
      {
        "id": "3861ae5e-7bed-4c90-a81c-686be1fe2097",
        "name": "Sticky Note4",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          2080,
          140
        ],
        "parameters": {
          "color": 4,
          "width": 460,
          "height": 400,
          "content": "## Output\n\nThis webhook returns an item with a post title, post content, and an image description:\n\n![](https://cdn.weweb.io/designs/d8eabf49-48a9-4c2f-995c-594936425772/sections/post_output.png?_wwcv=1754316208986)\n\nSave this in your UI builder so users can edit and reference it later."
        },
        "typeVersion": 1
      },
      {
        "id": "9f2ef103-a790-43f8-b176-610ca2413686",
        "name": "Sticky Note5",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          340,
          940
        ],
        "parameters": {
          "color": 5,
          "width": 460,
          "height": 800,
          "content": "## Step 3 - Generate an image\nThis webhook expects an image description (imgDescription) and an OpenAI key (api_key). \n\nThe API call might looks something like this:\n\n![](https://cdn.weweb.io/designs/d8eabf49-48a9-4c2f-995c-594936425772/sections/api_call_for_image.png?_wwcv=1754317807201)"
        },
        "typeVersion": 1
      },
      {
        "id": "1fa23c8c-542f-4ba6-88ff-8c93093b7621",
        "name": "Sticky Note6",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1580,
          960
        ],
        "parameters": {
          "color": 5,
          "width": 460,
          "height": 480,
          "content": "## Output\nThis webhook returns an image encoded in base64 format:\n\n![](https://cdn.weweb.io/designs/d8eabf49-48a9-4c2f-995c-594936425772/sections/image_output.png?_wwcv=1754317807206)\n\nYou will need to convert it to a Blob in your frontend to display it."
        },
        "typeVersion": 1
      }
    ],
    "active": true,
    "pinData": {},
    "settings": {},
    "versionId": "1dfbcd16-3799-4bf6-aeea-f1db4b006d5b",
    "connections": {
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Respond to Webhook2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate image": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Content creator": {
        "main": [
          [
            {
              "node": "Hashtag generator /SEO",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate 6 topics": {
        "main": [
          [
            {
              "node": "Content topic generator",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Content topic generator",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model1": {
        "ai_languageModel": [
          [
            {
              "node": "Content creator",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model2": {
        "ai_languageModel": [
          [
            {
              "node": "Hashtag generator /SEO",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Respond to Webhook1": {
        "main": [
          []
        ]
      },
      "Hashtag generator /SEO": {
        "main": [
          [
            {
              "node": "Respond to Webhook1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Content topic generator": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser": {
        "ai_outputParser": [
          [
            {
              "node": "Content topic generator",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser1": {
        "ai_outputParser": [
          [
            {
              "node": "Content creator",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser2": {
        "ai_outputParser": [
          [
            {
              "node": "Hashtag generator /SEO",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Generate post with hashtags": {
        "main": [
          [
            {
              "node": "Content creator",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    }
  },
  "workflowInfo": {
    "nodeCount": 23,
    "nodeTypes": {
      "n8n-nodes-base.webhook": {
        "count": 3
      },
      "n8n-nodes-base.stickyNote": {
        "count": 7
      },
      "n8n-nodes-base.httpRequest": {
        "count": 1
      },
      "@n8n/n8n-nodes-langchain.agent": {
        "count": 2
      },
      "n8n-nodes-base.respondToWebhook": {
        "count": 3
      },
      "@n8n/n8n-nodes-langchain.chainLlm": {
        "count": 1
      },
      "@n8n/n8n-nodes-langchain.lmChatOpenAi": {
        "count": 3
      },
      "@n8n/n8n-nodes-langchain.outputParserStructured": {
        "count": 3
      }
    }
  },
  "nodes": [
    "OpenAI Chat Model",
    "Structured Output Parser",
    "Content creator",
    "OpenAI Chat Model1",
    "Structured Output Parser1",
    "Hashtag generator /SEO",
    "OpenAI Chat Model2",
    "Structured Output Parser2",
    "Respond to Webhook",
    "Respond to Webhook1",
    "HTTP Request",
    "Respond to Webhook2",
    "Generate post with hashtags",
    "Generate 6 topics",
    "Generate image",
    "Sticky Note",
    "Content topic generator",
    "Sticky Note1",
    "Sticky Note2",
    "Sticky Note3",
    "Sticky Note4",
    "Sticky Note5",
    "Sticky Note6"
  ],
  "nodeTypes": [
    "@n8n/n8n-nodes-langchain.agent",
    "n8n-nodes-base.httpRequest",
    "@n8n/n8n-nodes-langchain.chainLlm",
    "n8n-nodes-base.webhook",
    "n8n-nodes-base.stickyNote",
    "@n8n/n8n-nodes-langchain.outputParserStructured",
    "n8n-nodes-base.respondToWebhook",
    "@n8n/n8n-nodes-langchain.lmChatOpenAi"
  ]
}