8
n8n 中文网amn8n.com

从WordPress使用Postiz的AI社交媒体发布器

高级

这是一个Social Media, Multimodal AI领域的自动化工作流,包含 23 个节点。主要使用 Postiz, Wordpress, HttpRequest, GoogleSheets, ManualTrigger 等节点。 使用Claude和Postiz从WordPress自动生成平台优化的社交媒体帖子

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
  • Anthropic API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "0h2Z4ZKTSldc3iUq",
  "meta": {
    "instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
    "templateCredsSetupCompleted": true
  },
  "name": "AI Social Media Publisher from WordPress with Postiz",
  "tags": [
    {
      "id": "2VG6RbmUdJ2VZbrj",
      "name": "Google Drive",
      "createdAt": "2024-12-04T16:50:56.177Z",
      "updatedAt": "2024-12-04T16:50:56.177Z"
    },
    {
      "id": "EtObDwELrdVvzOcI",
      "name": "OpenRouter",
      "createdAt": "2024-12-04T16:53:26.886Z",
      "updatedAt": "2024-12-04T16:53:26.886Z"
    },
    {
      "id": "OVXRgoTzbRrrYmBB",
      "name": "X",
      "createdAt": "2025-02-24T15:47:38.855Z",
      "updatedAt": "2025-02-24T15:47:38.855Z"
    },
    {
      "id": "PLbmcn8OyqnoHrYE",
      "name": "Instagram",
      "createdAt": "2025-02-24T15:47:48.325Z",
      "updatedAt": "2025-02-24T15:47:48.325Z"
    },
    {
      "id": "QsjuqQbwRJaxuGB4",
      "name": "Facebook",
      "createdAt": "2025-02-24T15:47:42.574Z",
      "updatedAt": "2025-02-24T15:47:42.574Z"
    },
    {
      "id": "oK8zaSe2Q5RG7qNe",
      "name": "Linkedin",
      "createdAt": "2025-02-24T15:47:45.129Z",
      "updatedAt": "2025-02-24T15:47:45.129Z"
    },
    {
      "id": "paTcf5QZDJsC2vKY",
      "name": "OpenAI",
      "createdAt": "2024-12-04T16:52:10.768Z",
      "updatedAt": "2024-12-04T16:52:10.768Z"
    }
  ],
  "nodes": [
    {
      "id": "c86367b5-26d0-4335-8102-55d20ff48b20",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -224,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4197894b-e9c1-4275-98a8-1bc5a9cb0f31",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        0,
        -80
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "TWITTER"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit?usp=drivesdk",
          "cachedResultName": "Social Media post"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "94e1ba3e-68a5-4479-ab38-a051317dfef3",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        624,
        144
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"twitter\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"facebook\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n        \"linkedin\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n        \"instagram\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "a8e491c2-a881-456c-a8af-0be68e660205",
      "name": "Image Instagram",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        944,
        288
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "={{ $json.output.instagram }}",
        "options": {
          "size": "1024x1024"
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "XJTqRiKFJpFs5MuX",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "b0f17c2b-fcd9-4b56-8a6e-5536fc8ab7df",
      "name": "Image Facebook e Linkedin",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        944,
        -144
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "={{ $json.output.facebook }}",
        "options": {
          "size": "1536x1024"
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "XJTqRiKFJpFs5MuX",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ecba243e-d002-44f5-b65c-fc8a07b53f13",
      "name": "Social Media Manager",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        -80
      ],
      "parameters": {
        "text": "=Generate social content from the following text with title \"{{ $json.title.rendered }}\" (in the same language):\n\n'''\n{{ $json.content.rendered }}\n'''",
        "messages": {
          "messageValues": [
            {
              "message": "=Your goal is to create engaging and informative content for LinkedIn, Instagram, Facebook, Twitter (X) while ensuring each post aligns with the platform’s audience, tone, and style. Content should reflect the company’s expertise, providing value-driven insights, tutorials, reviews, and discussions that resonate with tech professionals, enthusiasts, and businesses.\n\nEach post should be optimized for engagement, using platform-specific hashtags to improve reach and SEO. Maintain a professional yet approachable tone that promotes trust and authority in the tech space.\n\nContent Creation Best Practices:\nPost Optimization: Adapt content format, style, and hashtags based on each social media platform’s algorithm and audience engagement patterns.\nSEO & Hashtags: Use a balanced mix of general hashtags and platform-specific trending hashtags to maximize reach.\nEngagement-driven content: Focus on tech tutorials, IT industry updates, comparisons, reviews, and in-depth discussions that spark engagement.\nConsistency: Maintain a consistent tone and visual identity across all platforms, while tailoring content to each audience.\nData-driven trends: Regularly analyze post performance and adjust your hashtag strategy to reflect trending discussions within your topic. High-quality, relevant, and engaging copy that appeals to professionals, businesses, and enthusiasts of your topic must be provided.\n\n### Platform-specific requirements:\n1. **LinkedIn**:\n- Style: Professional and informative.\n- Tone: Focus on business results, employee gratitude, and community impact.\n- Content length: 3-4 sentences, detailed and insightful.\n- Hashtags: Create hashtags that are compatible with your topic.\n- Call to action: Engage businesses and professionals by encouraging comments or visits to Al Ansari's website.\n\n2. **Instagram**:\n- Style: Visual storytelling.\n- Tone: Inspiring and engaging.\n- Content length: 2-3 sentences, paired with creative captions and emojis.\n- Images: Highlight events, giveaways, and milestones (e.g., 50th anniversary keychains, eco-friendly tote bags).\n- Call to action: Use phrases like “Swipe to see more,” “Tag your coworkers,” or “Celebrate with us!”\n- Hashtags: Create hashtags that resonate with your topic\n\n3. **Facebook**:\n- Style: Friendly and relevant.\n- Tone: Community-focused, sharing employee stories, accomplishments, or event updates.\n- Content length: 2-3 sentences, slightly informal but still reflective of your company’s values.\n- Call to Action: Encourage likes, shares, and comments from connected families and communities\n\n4. **Twitter (X)**:\n- Style: Concise and impactful.\n- Tone: Crisp, engaging, and catchy.\n- Content Length: 150 characters or less, including hashtags.\n- Create hashtags that are compatible with the topic being discussed\n- Call to Action: Focus on rapid engagement through retweets, likes, and replies.\n\nWith this guide, generate posts for all platforms for the inputs below by inserting them into the specified json structure;"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.5
    },
    {
      "id": "59f6c9bd-ee49-41b2-bcda-e2dacd07e41e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -160
      ],
      "parameters": {
        "width": 420,
        "height": 260,
        "content": "Get the Post ID of the Wordpress article on which you want to generate the caption for social media"
      },
      "typeVersion": 1
    },
    {
      "id": "a6f484b0-a51c-4e5a-afbf-c72c7250bdc3",
      "name": "Linkedin OK",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        -256
      ],
      "parameters": {
        "columns": {
          "value": {
            "LINKEDIN": "x",
            "row_number": "={{ $('Google Sheets').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "POST ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "POST ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TESTO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TESTO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TWITTER",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TWITTER",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FACEBOOK",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FACEBOOK",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "INSTAGRAM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "INSTAGRAM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LINKEDIN",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LINKEDIN",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit?usp=drivesdk",
          "cachedResultName": "Social Media post"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f063fb28-d287-4ca9-98cb-abda7febce31",
      "name": "Facebook Ok",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {
            "FACEBOOK": "x",
            "row_number": "={{ $('Google Sheets').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "POST ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "POST ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TESTO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TESTO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TWITTER",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TWITTER",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FACEBOOK",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FACEBOOK",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "INSTAGRAM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "INSTAGRAM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LINKEDIN",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LINKEDIN",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit?usp=drivesdk",
          "cachedResultName": "Social Media post"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "ca898e97-5334-49bd-8e99-56f938e1aa22",
      "name": "Instagram OK",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        288
      ],
      "parameters": {
        "columns": {
          "value": {
            "INSTAGRAM": "x",
            "row_number": "={{ $('Google Sheets').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "POST ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "POST ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TESTO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TESTO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TWITTER",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TWITTER",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FACEBOOK",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FACEBOOK",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "INSTAGRAM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "INSTAGRAM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LINKEDIN",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LINKEDIN",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit?usp=drivesdk",
          "cachedResultName": "Social Media post"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "9e4d752b-eabb-4376-932c-c7b875d19f3e",
      "name": "Get Post",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        224,
        -80
      ],
      "parameters": {
        "postId": "={{ $json['POST ID'] }}",
        "options": {},
        "operation": "get"
      },
      "credentials": {
        "wordpressApi": {
          "id": "OE4AgquSkMWydRqn",
          "name": "Wordpress (wp.test.7hype.com)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2bff3e0d-2c6a-49d7-aa72-afb13a5930d3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -160
      ],
      "parameters": {
        "width": 360,
        "height": 260,
        "content": "The SMM Chain analyses the content of the post and creates the most suitable caption based on the destination social network.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "59238ff6-9122-4f38-8521-1c7387ed709d",
      "name": "X OK",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        -496
      ],
      "parameters": {
        "columns": {
          "value": {
            "TWITTER": "x",
            "row_number": "={{ $('Google Sheets').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "POST ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "POST ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TESTO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TESTO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TWITTER",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "TWITTER",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FACEBOOK",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FACEBOOK",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "INSTAGRAM",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "INSTAGRAM",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LINKEDIN",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LINKEDIN",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit?usp=drivesdk",
          "cachedResultName": "Social Media post"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "6821829e-df08-47c9-baaf-84d7e632f1ff",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -640
      ],
      "parameters": {
        "color": 3,
        "width": 960,
        "height": 288,
        "content": "## STEP 1\n\nThis workflow automates the process of creating and publishing social media posts across multiple platforms (Twitter/X, Facebook, LinkedIn, and Instagram) based on content from a WordPress post. It uses AI models to generate platform-specific captions and images, and integrates with Google Sheets, WordPress, and various social media APIs with Postiz.\n\n- Create an account on [Postiz](https://postiz.com/?ref=n3witalia) FREE 7 days-trial\n- Get your API Key and set it in Postiz node and Upload Image node\n- In Calendar tab on [Postiz](https://postiz.com/?ref=n3witalia) click on \"Add channel\" and connect your social networks (X, Facebook, Linkedin and Instagram)\n- Once connected, copy the \"ChannelId\" for each social network and insert the appropriate one into the Postiz nodes, replacing the \"XXX\" string."
      },
      "typeVersion": 1
    },
    {
      "id": "65627f9d-204b-4481-95d7-8d6627492157",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -320
      ],
      "parameters": {
        "color": 3,
        "width": 960,
        "height": 100,
        "content": "## STEP 2\nClone [this Sheet](https://docs.google.com/spreadsheets/d/1suPQNdgoAzrklleN4ok2mZnsq0GK1dt59oIHv8JWX5U/edit?usp=sharing) and set ONLY the WordPress Post ID id in the right column\n"
      },
      "typeVersion": 1
    },
    {
      "id": "202c8779-ca0d-4b76-9cfb-ecc74125c1ef",
      "name": "Facebook",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        1488,
        -16
      ],
      "parameters": {
        "date": "={{ $now.format('yyyy-LL-dd') }}T{{ $now.format('HH:ii:ss') }}",
        "posts": {
          "post": [
            {
              "value": {
                "contentItem": [
                  {
                    "content": "={{ $('Social Media Manager').item.json.output.facebook }}"
                  }
                ]
              },
              "integrationId": "XXX"
            }
          ]
        },
        "shortLink": true
      },
      "credentials": {
        "postizApi": {
          "id": "c8iQxqMcfCXPbUHc",
          "name": "Postiz account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "41ecd2cc-2809-4ce0-8872-0a02e8041e86",
      "name": "Linkedin",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        1488,
        -256
      ],
      "parameters": {
        "date": "={{ $now.format('yyyy-LL-dd') }}T{{ $now.format('HH:ii:ss') }}",
        "posts": {
          "post": [
            {
              "value": {
                "contentItem": [
                  {
                    "image": {
                      "imageItem": [
                        {
                          "id": "={{ $json.id }}",
                          "path": "={{ $json.path }}"
                        }
                      ]
                    },
                    "content": "={{ $('Social Media Manager').item.json.output.linkedin }}"
                  }
                ]
              },
              "integrationId": "XXX"
            }
          ]
        },
        "shortLink": true
      },
      "credentials": {
        "postizApi": {
          "id": "c8iQxqMcfCXPbUHc",
          "name": "Postiz account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "75bcfc84-c026-4c04-9ed9-940d1df1e5ba",
      "name": "Instagram",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        1504,
        288
      ],
      "parameters": {
        "date": "={{ $now.format('yyyy-LL-dd') }}T{{ $now.format('HH:ii:ss') }}",
        "posts": {
          "post": [
            {
              "value": {
                "contentItem": [
                  {
                    "content": "={{ $('Social Media Manager').item.json.output.instagram }}"
                  }
                ]
              },
              "integrationId": "XXX"
            }
          ]
        },
        "shortLink": true
      },
      "credentials": {
        "postizApi": {
          "id": "c8iQxqMcfCXPbUHc",
          "name": "Postiz account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0058d62d-70e7-4f44-b635-572324038f72",
      "name": "Upload image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1232,
        -144
      ],
      "parameters": {
        "url": "https://api.postiz.com/public/v1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "GIEq2Y2xhJSgjqyG",
          "name": "Postiz"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cae3b63a-4eee-48e2-ae22-60baf326fbe2",
      "name": "Upload IG Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        288
      ],
      "parameters": {
        "url": "https://api.postiz.com/public/v1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "GIEq2Y2xhJSgjqyG",
          "name": "Postiz"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2888b824-2066-440e-9631-1441a51d633d",
      "name": "X.com",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        944,
        -496
      ],
      "parameters": {
        "date": "={{ $now.format('yyyy-LL-dd') }}T{{ $now.format('HH:ii:ss') }}",
        "posts": {
          "post": [
            {
              "value": {
                "contentItem": [
                  {
                    "content": "={{ $json.output.twitter }}"
                  }
                ]
              },
              "integrationId": "XXX"
            }
          ]
        },
        "shortLink": true
      },
      "credentials": {
        "postizApi": {
          "id": "c8iQxqMcfCXPbUHc",
          "name": "Postiz account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "532fc1ec-b438-411c-b5f5-ed5bcee1a257",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -864
      ],
      "parameters": {
        "color": 5,
        "width": 960,
        "height": 192,
        "content": "## AI Social Media Publisher from WordPress with Postiz\n\nThis workflow automates the process of **generating and scheduling social media posts using content from a WordPress blog**. It leverages advanced AI (OpenAI & Anthropic Claude), Google Sheets, and the [Postiz](https://postiz.com/?ref=n3witalia) platform to create and publish platform-specific posts across **LinkedIn, Facebook, Instagram, and Twitter (X)**.\n\n\nNOTE: This workflow contains community nodes that are only compatible with the self-hosted version of n8n.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f503fa8e-8e29-4ebd-922f-f21a514f3368",
      "name": "Opus 4.1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        400,
        144
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-opus-4-1-20250805",
          "cachedResultName": "Claude Opus 4.1"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "id": "NNTZAD0Gmf7lcniq",
          "name": "Anthropic account"
        }
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3fb4b7ad-5b50-44b9-9086-823767d29981",
  "connections": {
    "X.com": {
      "main": [
        [
          {
            "node": "X OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook": {
      "main": [
        [
          {
            "node": "Facebook Ok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Post": {
      "main": [
        [
          {
            "node": "Social Media Manager",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Linkedin": {
      "main": [
        [
          {
            "node": "Linkedin OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Opus 4.1": {
      "ai_languageModel": [
        [
          {
            "node": "Social Media Manager",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Instagram": {
      "main": [
        [
          {
            "node": "Instagram OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload image": {
      "main": [
        [
          {
            "node": "Linkedin",
            "type": "main",
            "index": 0
          },
          {
            "node": "Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Get Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Instagram": {
      "main": [
        [
          {
            "node": "Upload IG Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload IG Image": {
      "main": [
        [
          {
            "node": "Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Social Media Manager": {
      "main": [
        [
          {
            "node": "Image Instagram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Image Facebook e Linkedin",
            "type": "main",
            "index": 0
          },
          {
            "node": "X.com",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Social Media Manager",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Image Facebook e Linkedin": {
      "main": [
        [
          {
            "node": "Upload image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 社交媒体, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量23
分类2
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza

外部链接
在 n8n.io 查看

分享此工作流