AutomationFlowsAI & RAG › Auto-post Wordpress Articles to Social Media with Gemini AI & Blotato

Auto-post Wordpress Articles to Social Media with Gemini AI & Blotato

ByDavid Olusola @dae221 on n8n.io

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Cron / scheduled trigger★★★★☆ complexityAI-powered11 nodesWordPressAgentGoogle Gemini Chat@Blotato/N8N Nodes Blotato
AI & RAG Trigger: Cron / scheduled Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Google Gemini Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "38f0d320-171c-4acb-aa3c-67d604d946a5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -128
      ],
      "parameters": {
        "width": 400,
        "height": 804,
        "content": "## WordPress to Blotato Social Publisher\n\n**Author: David Olusola**\n\n**What it does:**\n- Monitors for new WordPress posts every 30 minutes\n- AI creates platform-specific social media content\n- Posts to Twitter, LinkedIn, and Facebook automatically\n- Tracks posted content to avoid duplicates\n\n**Setup Required:**\n1. Configure WordPress credentials\n2. Set up social media API credentials (Twitter, LinkedIn, Facebook)\n3. Set up Google Gemini API credentials for AI\n4. Adjust posting schedule if needed\n\n**Features:**\n- Platform-optimized content (hashtags, length, tone)\n- Automatic link shortening\n- Image attachment support\n- Duplicate prevention\n- Custom posting schedules per platform with Blotato API\n\n**Customization:**\n- Change monitoring frequency\n- Adjust AI prompts for different tones\n- Add/remove social platforms\n- Customize hashtag strategies\n\n**Need Help?**\nFor [n8n coaching or one-on-one consultation](mailto:david@daexai.com)"
      },
      "typeVersion": 1
    },
    {
      "id": "af350bce-1317-456c-95c1-5a8556bc1e27",
      "name": "Every 30 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        224,
        128
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5f5c3758-f17e-4218-a9a7-41c1ba68c5c9",
      "name": "Check New Posts",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        448,
        128
      ],
      "parameters": {
        "options": {},
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "411cf856-72ff-474f-a928-f8ceb1b998ab",
      "name": "Filter New Posts",
      "type": "n8n-nodes-base.if",
      "position": [
        672,
        128
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "new-post-check",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{$json.length}}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7715a9a5-5f1c-44dd-834e-b225e72852b3",
      "name": "AI Social Content Creator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1120,
        128
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a social media manager. Based on the provided blog post, create platform-specific social media posts. Return ONLY valid JSON in this format: {\"twitter\": \"Tweet content with hashtags (280 chars max)\", \"linkedin\": \"Professional LinkedIn post with insights\", \"facebook\": \"Engaging Facebook post with call-to-action\"}. Make each post engaging and platform-appropriate."
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "119c13cf-458f-479e-9537-bb6631f8d6e0",
      "name": "Parse Social Content",
      "type": "n8n-nodes-base.code",
      "position": [
        1472,
        128
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nreturn items.map(item => {\n  // Parse AI output for social media content\n  let aiOutput = item.json.output;\n  \n  // Remove markdown code blocks if present\n  aiOutput = aiOutput.replace(/```json\\s*/, '').replace(/```\\s*$/, '');\n  \n  let socialContent;\n  try {\n    socialContent = JSON.parse(aiOutput.trim());\n  } catch (e) {\n    // Fallback if parsing fails\n    socialContent = {\n      twitter: `New post: ${item.json.title.rendered} ${item.json.link}`,\n      linkedin: `Check out our latest post: ${item.json.title.rendered} ${item.json.link}`,\n      facebook: `We just published: ${item.json.title.rendered} ${item.json.link}`\n    };\n  }\n  \n  return {\n    json: {\n      postTitle: item.json.title.rendered,\n      postUrl: item.json.link,\n      postId: item.json.id,\n      twitter: socialContent.twitter,\n      linkedin: socialContent.linkedin,\n      facebook: socialContent.facebook,\n      featuredImage: item.json.featured_media || null\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "78c4e8d5-d5f3-4a84-b815-215b0a3872ef",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1192,
        352
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "204300e5-0706-4da8-8aa3-02592993ae8b",
      "name": "Create post Facebook",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1696,
        304
      ],
      "parameters": {
        "options": {},
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "postContentText": "={{$json.facebook}}"
      },
      "typeVersion": 2
    },
    {
      "id": "7269a022-6da1-419d-b578-2ebd86ab3c38",
      "name": "Create post LinkedIn",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1728,
        112
      ],
      "parameters": {
        "options": {},
        "platform": "linkedin",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "postContentText": "={{$json.linkedin}}"
      },
      "typeVersion": 2
    },
    {
      "id": "1c7a8945-942f-44e2-b8e0-e724a666a6e8",
      "name": "Create post twitter",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1696,
        -80
      ],
      "parameters": {
        "options": {},
        "platform": "linkedin",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "postContentText": "={{$json.twitter}}"
      },
      "typeVersion": 2
    },
    {
      "id": "fdac53ac-9cb4-42f2-a94e-830c4bd1b7d9",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        896,
        96
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "AI Social Content Creator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check New Posts": {
      "main": [
        [
          {
            "node": "Filter New Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every 30 Minutes": {
      "main": [
        [
          {
            "node": "Check New Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter New Posts": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Social Content": {
      "main": [
        [
          {
            "node": "Create post Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create post LinkedIn",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create post twitter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Social Content Creator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Social Content Creator": {
      "main": [
        [
          {
            "node": "Parse Social Content",
            "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 contains community nodes that are only compatible with the self-hosted version of n8n.

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

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

This workflow is for beauty salons who want consistent, high‑quality social media content without writing every post manually. It also suits agencies and automation builders who manage multiple beauty

Telegram, Google Sheets Trigger, Agent +26
AI & RAG

This workflow automatically creates short-form AI videos using Sora 2 Cameos, powered by n8n and AI agents.

@Apify/N8N Nodes Apify, Google Sheets, Google Gemini +6
AI & RAG

Automatically generate viral short-form health videos using AI and publish them to social platforms with n8n and Veo 3. This workflow collects viral ideas, analyzes engagement patterns, generates AI v

@Apify/N8N Nodes Apify, Google Sheets, Google Gemini +6
AI & RAG

Overview

Google Gemini Chat, Tool Think, Output Parser Structured +6
AI & RAG

Automatically generate AI avatar short videos and publish them to social platforms using n8n and HeyGen. This workflow turns viral ideas or prepared scripts into fully rendered AI avatar videos and ha

Google Gemini Chat, Google Sheets, @Apify/N8N Nodes Apify +5