AutomationFlowsContent & Video › Auto-generate Wordpress Articles From News with Claude AI and Linkedin Sharing

Auto-generate Wordpress Articles From News with Claude AI and Linkedin Sharing

ByMarco Venturi @mventuri on n8n.io

This workflow sources news from news websites. The information is then passed to an LLM, which processes the article's content. An editor approves or rejects the article. If accepted, the article is first published on the WordPress site and then on the LinkedIn page. Credentials…

Event trigger★★★★☆ complexityAI-powered23 nodesGmailChain LlmAnthropic ChatOutput Parser StructuredHTTP RequestGoogle SheetsLinkedIn
Content & Video Trigger: Event Nodes: 23 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Chainllm → Gmail 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
{
  "id": "mOYawNKTDlExaveN",
  "name": "blog_workflow_template_n8n",
  "tags": [],
  "nodes": [
    {
      "id": "1f2c0ac6-fddc-4335-97ab-2330cffc0889",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1488,
        1120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e58ac4d7-b874-482c-8bf7-7ba733f6bd18",
      "name": "Approval request",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2816,
        944
      ],
      "parameters": {
        "sendTo": "<mail>@gmail.com",
        "message": "={{ $json.output.content }}",
        "options": {},
        "subject": "=Article approval: {{ $json.output.title }}",
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "1dd1ac97-acfd-48eb-aff5-280f3a47fc97",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1488,
        832
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10,
              "triggerAtMinute": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b46e02aa-6ccf-4198-97b0-d1d480f247ce",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2688,
        1728
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "c2facf43-a1ff-47a3-ba73-a942a269e11e",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        3120,
        944
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8eabd36a-87f0-47d6-b240-5b7b5b3ef2bc",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": "true"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "b2a499ee-16fe-454b-9a19-2bb2b152c72b",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2320,
        944
      ],
      "parameters": {
        "text": "=[PROMPT GOES HERE]:  {{ $json.userNews }}",
        "batching": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "3acad4e1-76ad-4887-883d-1406f6c8f730",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        2320,
        1136
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "57695364-25ea-47f1-a809-5f6a55f8718d",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2464,
        1136
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"title\": \"Title of the article\",\n\t\"content\": \"content of the article\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "fd83b42b-ba7e-421a-8acb-f97bef2bbda5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2656,
        1344
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 528,
        "content": "## LOGGING\nRunning parallel to the approval process, this step keeps a record of all AI-generated content.\n\nWait: A Wait node ensures a brief pause.\n\nLog to Google Sheets: An Append row in sheet node takes the output from the AI (the Basic LLM Chain) and logs it, along with metadata, into a specified Google Sheet. This happens regardless of whether the article is approved or declined, creating a comprehensive log of all generated content."
      },
      "typeVersion": 1
    },
    {
      "id": "aa7aa325-eb00-4d25-bfc7-c23bc2e6c5ed",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        448
      ],
      "parameters": {
        "color": 5,
        "width": 784,
        "height": 848,
        "content": "## CONTENT GENERATION\n\nFetch News: An HTTP Request node connects to the API service you prefer to pull in the latest news articles.\n\nFormat Data: A Code node takes the raw news data and formats it into a clean text string that the AI can easily understand.\n\nDraft Article with AI: A Basic LLM Chain node orchestrates the content creation.\n\nPrompt: It uses a detailed prompt that instructs the AI to handle the information as requested.\n\nAI Model: It uses an Anthropic Chat Model node configured to use a specific model (claude-sonnet-4...).\n\nStructured Output: It uses a Structured Output Parser to ensure the AI's response is neatly formatted into a JSON object with a title and content."
      },
      "typeVersion": 1
    },
    {
      "id": "ced1b5ad-caa0-4010-9028-8680ac8da858",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2656,
        448
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 848,
        "content": "## HUMAN TOUCH\n\nSend for Approval: An Approval request node sends an email via Gmail containing the AI-generated title and content. This email includes \"Approve\" and \"Decline\" buttons, and the workflow pauses until one is clicked."
      },
      "typeVersion": 1
    },
    {
      "id": "672dc96a-dd9e-4697-bc34-26e0c78c3c8f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3088,
        448
      ],
      "parameters": {
        "color": 4,
        "width": 1344,
        "height": 848,
        "content": "## PUBLISHING CONTENT\n\n**If APPROVED**:\n\nSelect Image: A Code node named getImageId randomly picks an ID for a featured image from a predefined list.\n\nPublish to WordPress: An HTTP Request node sends the title, content, and selected featured image ID to your WordPress site via its API, creating a new blog post.\n\nGet Image for Sharing: Another HTTP Request node fetches the URL of the newly published post's thumbnail image.\n\nShare on LinkedIn: A LinkedIn node creates a new post on a specified organization page, sharing the article's title and its URL.\n\nSend Confirmation: A Gmail node sends a final notification email confirming that the article has been successfully published, including its short URL.\n\n**If DECLINED**:\n\nSend Notification: A separate Gmail node sends an email notifying the user that the article draft was declined."
      },
      "typeVersion": 1
    },
    {
      "id": "0bc9d9a3-5ebd-437a-8bbb-7a68b5a9780e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        448
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 848,
        "content": "## TRIGGER\n\nThe workflow can be initiated in two ways:\n\nOn a Schedule: A Schedule Trigger node is set to run automatically.\n\nManually: A Manual Trigger node allows you to start the workflow at any time by clicking \"Execute workflow.\""
      },
      "typeVersion": 1
    },
    {
      "id": "364d480e-9601-4568-b3cc-6e2450a17503",
      "name": "Success message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4160,
        944
      ],
      "parameters": {
        "sendTo": "<mail>@gmail.com",
        "message": "=Articolo pubblicato:  {{ $('Push article to WordPress').item.json.short_URL }}",
        "options": {},
        "subject": "WordPress Article"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c1bbbbb4-2a3c-46b1-89f6-4a8a0c046691",
      "name": "Failure message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3312,
        1136
      ],
      "parameters": {
        "sendTo": "<mail>@gmail.com",
        "message": "=You declined the article:  {{ $('HTTP Request to Claude 2 - Title Creation').item.json.content[0].text }}",
        "options": {},
        "subject": "Article DECLINED"
      },
      "typeVersion": 2.1
    },
    {
      "id": "67ec150b-3bfd-4567-8f85-04c6e979021b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        304
      ],
      "parameters": {
        "width": 1296,
        "height": 1536,
        "content": "## AI-Powered Blog Automation\n\n### What this workflow does\nThis workflow automates your entire content pipeline. It fetches the latest news from a source of your choice, uses an AI to draft a complete blog post, sends it to you for approval, and then automatically publishes the approved article to WordPress and shares it on LinkedIn. It also keeps a log of every article generated in a Google Sheet.\n\n\n---\n\n### Setup Instructions\n\n**1. Credentials**\nYou'll need to add credentials for the following services in your n8n instance:\n* **News API**: A Header Auth credential for your chosen news provider (e.g., [CurrentsAPI](https://currentsapi.services/)).\n* **Anthropic API**: Your API key for the Claude model. Get one at [Anthropic](https://www.anthropic.com/).\n* **Google OAuth**: For both Gmail and Google Sheets.\n* **WordPress OAuth2**: To publish articles via the API. See the [WordPress Developer Docs](https://developer.wordpress.com/docs/api/).\n* **LinkedIn OAuth2**: To share the post on a company page.\n\n**2. Node Configuration**\nYou must configure these specific nodes:\n* **Fetch News (HTTP Request)**: Set the query parameters (keywords, language, etc.) for your news source.\n* **Basic LLM Chain**: Review and **customize the prompt** to match your desired tone, language, and style.\n* **Approval request (Gmail)**: Set your email address in the `Send To` field.\n* **HTTP Request WP - Push article**: Replace `<site_Id>` in the URL with your WordPress Site ID.\n* **getImageId (Code Node)**: Update the array with your image IDs from the WordPress Media Library.\n* **Create a post (LinkedIn)**: Enter your LinkedIn `Organization ID`.\n* **Append row in sheet (Google Sheets)**: Select your Google Sheet file and the target sheet.\n* **All Email Nodes**: Make sure the `Send To` field is your email.\n\n## Demo\n\n@[youtube](AfcYxTdSr9g)"
      },
      "typeVersion": 1
    },
    {
      "id": "a3cc5fa3-a50b-43ea-a708-851639c4e31d",
      "name": "Fetching news",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1904,
        944
      ],
      "parameters": {
        "url": "https://api.currentsapi.services/v1/search",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 3000
    },
    {
      "id": "125d4d6c-dc06-4788-bf6f-d3a8d7edcdd9",
      "name": "JSON Parsing",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        944
      ],
      "parameters": {
        "jsCode": "const userString = JSON.stringify($input.first().json.news);\n\n// The CORRECT way to return data in a Code Node\nreturn [\n  {\n    json: {\n      userNews: userString\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "b3e4c350-57ed-4627-bfec-02041f2c17b6",
      "name": "Append log to sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2864,
        1728
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "role",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "role",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "model",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "model",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "content",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "stop_reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "stop_reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "stop_sequence",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "stop_sequence",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "usage",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "usage",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dowCNqxxlNt8LUJmqn5jEFQVCVcsECC3OuPMUwHlI44/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dowCNqxxlNt8LUJmqn5jEFQVCVcsECC3OuPMUwHlI44",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dowCNqxxlNt8LUJmqn5jEFQVCVcsECC3OuPMUwHlI44/edit?usp=drivesdk",
          "cachedResultName": "log_blog"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "71f6624e-dc6a-42ea-99ae-ec80c2b8221e",
      "name": "Choose image from array",
      "type": "n8n-nodes-base.code",
      "position": [
        3280,
        944
      ],
      "parameters": {
        "jsCode": "function getRandomItem(arr) {\n  // Calculate a random index and return the item at that index\n  return arr[Math.floor(Math.random() * arr.length)];\n}\n\nconst myChoices = [\"131\", \"130\", \"129\", \"70\"];\n\n// Call the function and store the returned value in a variable\nconst selected = getRandomItem(myChoices);\n\n// Return as an array of items, each with a { json } property\nreturn [\n  { json: { choice: selected } }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "040fa548-d626-4da1-a6ed-cb2a50b2165f",
      "name": "Push article to WordPress",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3456,
        944
      ],
      "parameters": {
        "url": "https://public-api.wordpress.com/rest/v1.1/sites/<site_Id>/posts/new",
        "method": "POST",
        "options": {
          "response": {
            "response": {}
          }
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "title",
              "value": "={{ $('Basic LLM Chain').item.json.output.title }}"
            },
            {
              "name": "content",
              "value": "={{ $('Basic LLM Chain').item.json.output.content }}"
            },
            {
              "name": "featured_image",
              "value": "={{ $json.choice }}"
            }
          ]
        },
        "genericAuthType": "oAuth2Api"
      },
      "credentials": {
        "oAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "4a69a961-9d51-4e87-b95c-77707c4b8fed",
      "name": "GET Image for Linkedin",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3664,
        944
      ],
      "parameters": {
        "url": "={{ $json.post_thumbnail.URL }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "159306a0-662f-4bb3-9de8-d2b58f39c8fa",
      "name": "Push to Linkedin Page",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        3888,
        944
      ],
      "parameters": {
        "text": "={{ $json.title }}",
        "postAs": "organization",
        "organization": "111111111",
        "additionalFields": {
          "originalUrl": "={{ $json.URL }}",
          "thumbnailBinaryPropertyName": "data"
        },
        "shareMediaCategory": "ARTICLE"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d1aac863-8bc5-42e1-8503-426b47ed32a4",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Choose image from array",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Failure message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Append log to sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON Parsing": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetching news": {
      "main": [
        [
          {
            "node": "JSON Parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Approval request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Approval request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetching news",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Push to Linkedin Page": {
      "main": [
        [
          {
            "node": "Success message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GET Image for Linkedin": {
      "main": [
        [
          {
            "node": "Push to Linkedin Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Choose image from array": {
      "main": [
        [
          {
            "node": "Push article to WordPress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Push article to WordPress": {
      "main": [
        [
          {
            "node": "GET Image for Linkedin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Fetching news",
            "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

This workflow sources news from news websites. The information is then passed to an LLM, which processes the article's content. An editor approves or rejects the article. If accepted, the article is first published on the WordPress site and then on the LinkedIn page. Credentials…

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

More Content & Video workflows → · Browse all categories →

Related workflows

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

Content & Video

100% autonomous workflow that transforms YouTube videos into unique, high-quality, SEO-optimized blog articles and automatically publishes them to WordPress. No human intervention required: it uses Yo

HTTP Request, Stop And Error, Google Sheets +8
Content & Video

This automation is perfect for bloggers, solopreneurs, business owners, and marketing teams who want to scale SEO content creation.

Anthropic Chat, Output Parser Structured, Chain Llm +3
Content & Video

The Ultimate Guide to Optimize WordPress Blog Posts with AI. Uses manualTrigger, googleSheets, openAi, wordpress. Event-driven trigger; 21 nodes.

Google Sheets, OpenAI, WordPress +4
Content & Video

This workflow automates the process of creating a complete SEO-optimized blog post, including generating content, titles, images, and meta tags, and publishing it on WordPress. It leverages AI models

Google Sheets, OpenAI, WordPress +4
Content & Video

The best content automation in the market! This advanced workflow not only creates and publishes SEO-optimized blog posts to your WordPress website but also backs up all content and images to a design

OpenAI, Output Parser Structured, Chain Llm +8