Skip to main content

Publish WordPress posts to social media X, Facebook, LinkedIn, Instagram with AI

Workflow preview

Workflow preview
100%
Publish WordPress posts to social media X, Facebook, LinkedIn, Instagram with AI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Workflow Description for n8n: Social Media Post from Ideas Copy This workflow automates the process of creating and publishing social media posts across multiple platforms (Twitter/X, Facebook, Lin...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.openai, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.stickynote, n8n-nodes-base.wordpress

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Publish WordPress posts to social media X, Facebook, LinkedIn, Instagram with AI
Workflow name
Publish WordPress posts to social media X, Facebook, LinkedIn, Instagram with AI

Workflow Description for n8n: Social Media Post from Ideas Copy

This 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.

Is a powerful tool for automating social media post creation and publishing, saving time and ensuring consistent, platform-optimized content across multiple channels.

Below is a breakdown of the workflow:


1. How It Works

The workflow is designed to streamline the creation and publishing of social media posts. Here's how it works:

  1. Trigger:

    • The workflow starts with a Manual Trigger node, which initiates the process when the user clicks "Test workflow."
  2. Fetch Data:

    • The Google Sheets node retrieves the WordPress Post ID from a predefined Google Sheet.
    • The Get Post node fetches the corresponding WordPress post content using the retrieved Post ID.
  3. Generate Social Media Content:

    • The Social Media Manager node uses an AI model (OpenRouter) to analyze the WordPress post and generate platform-specific captions for Twitter/X, Facebook, LinkedIn, and Instagram.
    • The AI ensures that each caption is tailored to the platform's audience, tone, and style, including hashtags and calls to action.
  4. Generate Images:

    • The Image Instagram and Image Facebook e Linkedin nodes use OpenAI to generate platform-specific images for Instagram, Facebook, and LinkedIn posts.
  5. Publish on Social Media:

    • The workflow publishes the generated content and images on the respective platforms:
      • Publish on X: Posts the caption on Twitter/X.
      • Publish on LinkedIn: Posts the caption and image on LinkedIn.
      • Publish on Facebook: Posts the caption and image on Facebook.
      • Publish on Instagram: Posts the caption and image on Instagram.
  6. Update Google Sheets:

    • The workflow updates the Google Sheet to mark the posts as published (e.g., "X OK," "Facebook OK," "LinkedIn OK," "Instagram OK").

2. Set Up Steps

To set up and use this workflow in n8n, follow these steps:

  1. Google Sheets Setup:

    • Create (or clone) a Google Sheet with columns for POST ID, TEXT, TWITTER, FACEBOOK, INSTAGRAM, and LINKEDIN.
    • Link the Google Sheet to the Google Sheets node by providing the Document ID and Sheet Name.
  2. WordPress Integration:

    • Set up WordPress credentials in n8n for the Get Post node.
    • Ensure the WordPress site is accessible via its REST API.
  3. AI Model Configuration:

    • Configure the OpenRouter credentials in n8n for the Social Media Manager node.
    • Ensure the AI model is set up to generate platform-specific captions.
  4. Image Generation:

    • Set up OpenAI credentials for the Image Instagram and Image Facebook e Linkedin nodes to generate images.
  5. Social Media API Integration:

    • Set up credentials for each social media platform:
      • Twitter/X: Configure the Publish on X node with Twitter OAuth2 credentials.
      • LinkedIn: Configure the Publish on LinkedIn node with LinkedIn OAuth2 credentials.
      • Facebook: Configure the Publish on Facebook and Publish on Instagram nodes with Facebook Graph API credentials.
  6. Test the Workflow:

    • Click the "Test workflow" button in n8n to trigger the workflow.
    • The workflow will:
      • Fetch the WordPress post content.
      • Generate platform-specific captions and images.
      • Publish the posts on Twitter/X, Facebook, LinkedIn, and Instagram.
      • Update the Google Sheet to mark the posts as published.
  7. Optional Customization:

    • Modify the workflow to include additional platforms or customize the AI-generated content further.

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 3 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 4 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 5 - Image Instagram

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 6 - Image Facebook e Linkedin

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 7 - Social Media Manager

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.5

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Linkedin OK

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 10 - Facebook Ok

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 11 - Instagram OK

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 12 - Get Post

Type / Role
n8n-nodes-base.wordpress - wordpress
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Publish on X

Type / Role
n8n-nodes-base.twitter - twitter
Config choices
Version 2

Block 15 - X OK

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 16 - Publish on LinkedIn

Type / Role
n8n-nodes-base.linkedIn - linkedIn
Config choices
Version 1

Block 17 - Publish on Facebook

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 18 - Publish on Instagram

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Publish WordPress posts to social media X, Facebook, LinkedIn, Instagram with AI
Complexity advanced
Nodes 20
Categories Social Media, Multimodal AI
Author Davide
Published 05 Mar 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3086/3086.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Publish WordPress posts to social media X, Facebook, LinkedIn, Instagram with AI do?

Workflow Description for n8n: Social Media Post from Ideas Copy This workflow automates the process of creating and publishing social media posts across multiple platforms (Twitter/X, Facebook, Lin...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, Multimodal AI use case.