Automate Social Media Engagement with Google Gemini & APIs

Streamline your social media strategy by automating content generation using Google Gemini and the Facebook Graph API. This workflow is perfect for social media managers looking to enhance engagement across platforms like Twitter and LinkedIn. Requires 1 account: Twitter API. Save hours of manual posting and generate tailored content that drives engagement and boosts your online presence.

Form Trigger
115,390 views26 nodesFeb 2025Sarah Chen

Categories

Social MediaMultimodal AI

APIs

Google GeminiFacebook Graph APITwitter API

AI Features

AI AgentGoogle GeminiAI Chat

Credentials

1 required

Quick Actions

Copy or download to import into your n8n instance

Workflow JSON
{
  "id": "LzDLmNc63zyqQBXz",
  "meta": {
    "instanceId": "942ff96108ceedc60ba777eabc4e8ea2ae87415579996cd64d20cc647c4d3523"
  },
  "name": "Social Media Tutorial",
  "tags": [],
  "nodes": [
    {
      "id": "8034d082-f50e-4f6b-8a79-ce7f86012d72",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        920,
        20
      ],
      "webhookId": "syncbricks-social-posting-ai-agent",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "e38a74d5-a733-4f5c-a97b-2c761b46919b",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1180,
        520
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "ca0a8aef-0251-45ed-bc9b-05ee977febf9",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        980,
        780
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "31e88059-94ca-4d4e-a673-e0f8cd1ac96e",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1300,
        780
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ffda1c79-faa4-4cc8-8655-6f7fc14b7e2d",
      "name": "Split Form Input",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        40
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "37e443e1-6925-44a1-a07e-9eb1120e55a9",
      "name": "Upload Image",
      "type": "n8n-nodes-base.form",
      "position": [
        320,
        1160
      ],
      "webhookId": "0dc811ef-b2e0-4213-a0c9-e9b5fb9fcbf1",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "265068ce-22fc-4c41-9ed2-93eadc0ce25f",
      "name": "Split Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1560,
        40
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "b8470879-413e-4901-bf39-23a19beaee5f",
      "name": "Data for AI",
      "type": "n8n-nodes-base.set",
      "position": [
        1880,
        40
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "eef02dcb-7c7f-4d6c-a1fd-039c8b30f10d",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1680,
        760
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "097e7724-4dc0-4cc9-b12c-2dbdae4e024f",
      "name": "Form",
      "type": "n8n-nodes-base.form",
      "position": [
        1820,
        1960
      ],
      "webhookId": "e84b9492-038c-4701-a367-c68237ddebf6",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7b1d64fc-02ad-4b8f-ad1e-be8894abd932",
      "name": "Nest Top Meta",
      "type": "n8n-nodes-base.set",
      "position": [
        940,
        1160
      ],
      "parameters": {},
      "typeVersion": 3.3
    },
    {
      "id": "11ddcfe8-1978-4f5a-8c29-67e72920431a",
      "name": "Rename Image Binary Top Image",
      "type": "n8n-nodes-base.code",
      "position": [
        -40,
        1960
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "19892590-5ddf-47ac-b544-7a72a68bd45e",
      "name": "Publish to Facebook",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        440,
        2080
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b3b0068b-c75a-427c-bb2d-77b21bc6ff16",
      "name": "Publish to LinkedIn",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        420,
        1840
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ed5fe0c2-a07a-45f1-90cb-65f21d416a1a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c4a2e59d-165a-49cc-8074-9868ee4e0d6c",
      "name": "X",
      "type": "n8n-nodes-base.twitter",
      "position": [
        440,
        1600
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "66ba98a9-24c0-4128-9ad9-792a0d400aae",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        340
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "02fafdc7-0272-4f34-9b66-dfbe8e16e70d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        960
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "21d945c3-446c-4bb9-8696-a70034801485",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        1480
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c9efdc38-94c6-494e-a932-45b75312bb54",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        1480
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "93632f4f-9182-4b76-bbe0-e6d5dd230452",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        1600
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "89f22cf8-9499-4b7f-872d-97099c5d1e50",
      "name": "Image for Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        2280
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "c415eeb9-f916-4c08-afb1-baed3f3280cc",
      "name": "Publish to Instagram",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1060,
        2280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1c8f6ba6-c28b-45a8-ba0d-3f2f21ccbfa0",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1380,
        1940
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "d9cfdcd1-18db-4d0d-9b6a-66897600e496",
      "name": "Upload Image to imgbb.com",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        2280
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "f7e5b1b1-aeaa-4851-be04-53e8255fa343",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4a55bf93-ae0c-4aa9-84a8-cd4d02375e51",
  "connections": {
    "X": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Upload Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Data": {
      "main": [
        [
          {
            "node": "Data for AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data for AI": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image": {
      "main": [
        [
          {
            "node": "Nest Top Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nest Top Meta": {
      "main": [
        [
          {
            "node": "Rename Image Binary Top Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Form Input": {
      "main": [
        [
          {
            "node": "Split Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Split Form Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image for Instagram": {
      "main": [
        [
          {
            "node": "Publish to Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Facebook": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Publish to LinkedIn": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Publish to Instagram": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to imgbb.com": {
      "main": [
        [
          {
            "node": "Image for Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename Image Binary Top Image": {
      "main": [
        [
          {
            "node": "X",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to LinkedIn",
            "type": "main",
            "index": 0
          },
          {
            "node": "Publish to Facebook",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload Image to imgbb.com",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Related Workflows

Automate Social Media Content with Google Gemini & OpenAI GPT

Streamline your social media content creation using Google Gemini and OpenAI GPT. This automation generates tailored posts for Facebook, Instagram, and LinkedIn, perfect for social media managers looking to enhance engagement. Requires 9 accounts, including Google Palm API and OpenAI API. Save over 10 hours each week by automating content generation and posting, ensuring a consistent online presence.

271,702 views
Social MediaMultimodal AI

Automate AI Video Creation & Upload with OpenAI GPT & Blotato

Generate engaging videos using OpenAI GPT and Blotato, then automatically upload them to TikTok, YouTube, and Instagram. This workflow is ideal for data management professionals looking to streamline video marketing efforts. Requires 3 accounts: Google Sheets OAuth, OpenAI API, and Blotato API. Save hours of manual video creation and reach your audience effortlessly with high-quality content.

220,160 views
Content CreationMultimodal AI

Create Videos with Google Veo3 & Upload to YouTube Using AI

Automate video creation with Google Veo3 and seamlessly upload to YouTube using the Google Drive API and Google Sheets API. This workflow is perfect for data management professionals looking to streamline content production. Requires 3 accounts: Google Sheets OAuth, Google Drive OAuth, and OpenAI API key. Save hours of manual video creation and enhance your productivity with AI-driven insights.

196,000 views
Content CreationMultimodal AI

Create Short-Form Videos with OpenAI, Flux, ElevenLabs & More

Automate short-form video generation using OpenAI GPT, Flux, and ElevenLabs, then seamlessly upload to social networks. Perfect for team collaboration, this workflow requires 4 accounts, including OpenAI API Key and Google Drive OAuth. Save hours on video editing and content distribution while boosting engagement across platforms.

160,626 views
Content CreationMultimodal AI

How to Use This Workflow

1Import to n8n

  1. Copy the JSON using the button above
  2. Open your n8n instance
  3. Click “Import workflow” or press Ctrl+V
  4. Paste the JSON and click “Import”

2Before Running

Configure credentials and update service-specific settings before executing the workflow. Review required credentials in the Technical Details section above.

115.4K