AutomationFlowsWeb Scraping › Auto-post Trending X Tweets with Gemini AI Images, Flux and Buffer

Auto-post Trending X Tweets with Gemini AI Images, Flux and Buffer

ByAfigo Sam @sampidia on n8n.io

Perfect for social media managers, content creators, and personal brands who want to stay relevant on X without manually tracking trends or writing posts every day. The workflow runs 3 times daily by default (8:30am, 12:30pm, 4:30pm). You can adjust the schedule in the Schedule…

Cron / scheduled trigger★★★★★ complexityAI-powered42 nodesData Table@Apify/N8N Nodes ApifyHTTP RequestDropboxGoogle GeminiMcp Client
Web Scraping Trigger: Cron / scheduled Nodes: 42 Complexity: ★★★★★ AI nodes: yes Added:
Auto-post Trending X Tweets with Gemini AI Images, Flux and Buffer — n8n workflow card showing Data Table, @Apify/N8N Nodes Apify, HTTP Request integration

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

This workflow follows the Datatable → HTTP Request 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": "0cuzFC47AFJslSZu",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Auto-Post Trending Tweets with AI Images using Gemini, FLUX & Buffer",
  "tags": [
    {
      "id": "8SQ9sFZ86SUKssJ9",
      "name": "Tweets",
      "createdAt": "2026-04-04T18:41:46.655Z",
      "updatedAt": "2026-04-04T18:41:46.655Z"
    }
  ],
  "nodes": [
    {
      "id": "19f03cb9-bc96-4fdc-823e-feb006352e13",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1056,
        -240
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "=30 8,12,16 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "cdb01e02-c630-49db-bc2c-d444c6999fc4",
      "name": "Create a data table",
      "type": "n8n-nodes-base.dataTable",
      "onError": "continueRegularOutput",
      "disabled": true,
      "position": [
        4032,
        -272
      ],
      "parameters": {
        "columns": {
          "column": [
            {
              "name": "trend"
            },
            {
              "name": "date"
            }
          ]
        },
        "options": {},
        "resource": "table",
        "operation": "create",
        "tableName": "table_name"
      },
      "executeOnce": false,
      "typeVersion": 1.1
    },
    {
      "id": "dfb23ad8-9889-4a7a-ac40-c7dc12bcedd6",
      "name": "Filter Last 24h",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        4528,
        -272
      ],
      "parameters": {
        "jsCode": "const allTrends = $input.all();\n\n// Get used trends from Get Used Trends (deduplicate by id)\nlet usedTrendsItems = [];\ntry {\n  const raw = $node[\"Get Used Trends\"].all();\n  // Deduplicate by id - keeps only first occurrence of each id\n  const seen = new Set();\n  usedTrendsItems = raw.filter(item => {\n    const id = item.json.id;\n    if (seen.has(id)) return false;\n    seen.add(id);\n    return true;\n  });\n} catch (e) {\n  usedTrendsItems = [];\n}\n\nconst oneDay = 24 * 60 * 60 * 1000;\nconst now = new Date();\n\nconst recentUsed = usedTrendsItems\n  .filter(item => {\n    if (!item.json.date) return false;\n    const d = new Date(item.json.date);\n    if (isNaN(d.getTime())) return false;\n    return (now - d) < oneDay;\n  })\n  .map(item => (item.json.trend || \"\").trim().toLowerCase());\n\nconst availableTrends = allTrends.filter(item => {\n  const trend = (item.json.trend || \"\").trim().toLowerCase();\n  return !recentUsed.includes(trend);\n});\n\nreturn availableTrends.map(item => ({ json: { trend: item.json.trend } }));"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "e8a3e24e-713c-4be5-8f0f-d1be0c897eba",
      "name": "Pick Trend",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        5136,
        -272
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Pick the first 2 trends from the list\nconst picked = items.slice(0, 2);\n\nreturn picked.map(item => ({\n  json: {\n    trend: item.json?.trend?.json?.trend || item.json?.trend\n  }\n}));"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "07796504-f538-4a63-a4a7-24223c705b21",
      "name": "Get Used Trends",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        4288,
        -272
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "yJnzJvRdKazvvCuY",
          "cachedResultUrl": "/projects/vXqhDNlXbSeCxe2L/datatables/yJnzJvRdKazvvCuY",
          "cachedResultName": "trend_table"
        }
      },
      "typeVersion": 1.1,
      "alwaysOutputData": true
    },
    {
      "id": "52c97b11-4258-4d79-9832-60e0166fe005",
      "name": "Prepare Trend Record",
      "type": "n8n-nodes-base.code",
      "position": [
        8096,
        -320
      ],
      "parameters": {
        "jsCode": "// Get the current trend from the loop (passed through Loop Over Items)\nconst currentTrend = $('Loop Over Items').item.json.trend;\n\nreturn [{\n  json: {\n    trend: currentTrend,\n    tweet: $input.first().json.content[0].text.text,\n    usedAt: new Date().toISOString()\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "ff76741f-7368-4087-bd4b-406fbb8d4cee",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        5840,
        -320
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "c48ef204-8293-4d77-812c-e0ee07fd9d4f",
      "name": "Run an Actor and get dataset",
      "type": "@apify/n8n-nodes-apify.apify",
      "onError": "continueRegularOutput",
      "position": [
        1264,
        -240
      ],
      "parameters": {
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "VPeCKacMZL2Lgem5t",
          "cachedResultUrl": "https://console.apify.com/actors/VPeCKacMZL2Lgem5t/input",
          "cachedResultName": "Twitter Trending Topics Scraper \ud83c\udf0e (easyapi/twitter-trending-topics-scraper)"
        },
        "timeout": {},
        "operation": "Run actor and get dataset",
        "customBody": "{\n    \"country\": \"nigeria\",\n    \"proxyConfiguration\": {\n        \"useApifyProxy\": false\n    }\n}"
      },
      "credentials": {
        "apifyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "98073d77-f2f4-42dc-8e8c-9d471ae1f52c",
      "name": "Extract Trends1",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        1488,
        -240
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst firstItem = items[0]?.json;\nif (!firstItem || firstItem.error) {\n  return [{ json: { success: false, error: firstItem?.error || \"No data received\" } }];\n}\n\nconst seen = new Set();\nconst trends = items.flatMap(item => {\n  const data = item.json;\n  const records = Array.isArray(data) ? data : [data];\n  return records\n    .map(record => record.title?.trim())\n    .filter(title => {\n      if (!title || seen.has(title)) return false;\n      seen.add(title);\n      return true;\n    })\n    .map(title => ({ json: { trend: title } }));\n});\n\nif (trends.length === 0) {\n  return [{ json: { success: false, error: \"No valid trend data found\" } }];\n}\n\nreturn [{ json: { success: true, trends } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "d5ca20d9-e77e-4813-9785-edf162d754b6",
      "name": "Split Trend1",
      "type": "n8n-nodes-base.code",
      "position": [
        2800,
        -720
      ],
      "parameters": {
        "jsCode": "const trends = $json.trends;\n\nreturn trends.map(trend => ({\n  json: { trend }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "53e97a37-ee7e-43b8-88db-1d6d03ce950f",
      "name": "Apify Success? (Primary)",
      "type": "n8n-nodes-base.if",
      "position": [
        1696,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "163328ab-270c-4abe-a261-1c5acce7acb8",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.success }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "437a2170-75f8-484c-93c3-f17926d107fc",
      "name": "Generate Image with FLUX",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7008,
        -288
      ],
      "parameters": {
        "url": "https://router.huggingface.co/hf-inference/models/black-forest-labs/FLUX.1-schnell",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        },
        "jsonBody": "={\n  \"inputs\": \"photorealistic image of {{ $('Extract Tweet Text').item.json.tweet }} ultra realistic, cinematic lighting, 8k, highly detailed, professional photography, few or no text\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "image/png"
            }
          ]
        },
        "nodeCredentialType": "huggingFaceApi"
      },
      "credentials": {
        "huggingFaceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "862c4102-341f-4933-aa92-0a82b92795b7",
      "name": "Upload a file",
      "type": "n8n-nodes-base.dropbox",
      "position": [
        7168,
        -288
      ],
      "parameters": {
        "path": "=/n8n/{{ $('Loop Over Items').item.json.trend }}_{{ $itemIndex + 1 }}.png",
        "binaryData": true,
        "authentication": "oAuth2"
      },
      "credentials": {
        "dropboxOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "00547540-3e8f-40ae-accd-6090eafc59c5",
      "name": "Generate Tweet with Gemini",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "onError": "continueErrorOutput",
      "position": [
        6096,
        -288
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-flash",
          "cachedResultName": "models/gemini-2.5-flash"
        },
        "options": {
          "includeMergedResponse": false
        },
        "messages": {
          "values": [
            {
              "content": "= generate a short tweet base on this x.com trend: {{ $json.trend }} . The generated tweet must be base on live events, react to the contextuse pidgin + casual tone. only one otion, no **\\n, maximum of 275 characters."
            }
          ]
        },
        "builtInTools": {
          "googleSearch": true
        }
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1,
      "alwaysOutputData": false
    },
    {
      "id": "91076085-e23c-4598-9b79-c1198abbe6f2",
      "name": "Post to X via Buffer",
      "type": "@n8n/n8n-nodes-langchain.mcpClient",
      "notes": "Twiiter Auto post",
      "position": [
        7840,
        -96
      ],
      "parameters": {
        "tool": {
          "__rl": true,
          "mode": "list",
          "value": "create_post",
          "cachedResultName": "create_post"
        },
        "options": {},
        "parameters": {
          "value": {
            "text": "={{ $('Extract Tweet Text').item.json.tweet }}",
            "assets": "={\n    \"images\": [\n    {\n      \"url\": \"{{ $json.file_url }}\",\n      \"thumbnailUrl\": \"{{ $json.file_url }}\",\n      \"metadata\": {\n        \"altText\": \"{{ $('Extract Tweet Text').item.json.tweet }}\",\n        \"animatedThumbnail\": \"string\",\n        \"userTags\": [\n          {\n            \"handle\": \"string\",\n            \"x\": 0,\n            \"y\": 0\n          }\n        ],\n        \"dimensions\": {\n          \"width\": 0,\n          \"height\": 0\n        }\n      }\n    }\n  ]\n\n} ",
            "channelId": "69ce9bddaf47dacb6980757d",
            "schedulingType": "automatic"
          },
          "schema": [
            {
              "id": "channelId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "channelId",
              "defaultMatch": false
            },
            {
              "id": "schedulingType",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "notification",
                  "value": "notification"
                },
                {
                  "name": "automatic",
                  "value": "automatic"
                }
              ],
              "removed": false,
              "required": true,
              "displayName": "schedulingType",
              "defaultMatch": false
            },
            {
              "id": "mode",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "addToQueue",
                  "value": "addToQueue"
                },
                {
                  "name": "shareNow",
                  "value": "shareNow"
                },
                {
                  "name": "shareNext",
                  "value": "shareNext"
                },
                {
                  "name": "customScheduled",
                  "value": "customScheduled"
                },
                {
                  "name": "recommendedTime",
                  "value": "recommendedTime"
                }
              ],
              "removed": true,
              "required": false,
              "displayName": "mode",
              "defaultMatch": false
            },
            {
              "id": "text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "text",
              "defaultMatch": false
            },
            {
              "id": "dueAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "dueAt",
              "defaultMatch": false
            },
            {
              "id": "tagIds",
              "type": "array",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "tagIds",
              "defaultMatch": false,
              "defaultValue": "[\n  \"string\"\n]"
            },
            {
              "id": "assets",
              "type": "object",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "assets",
              "defaultMatch": false,
              "defaultValue": "{\n  \"images\": [\n    {\n      \"url\": \"string\",\n      \"thumbnailUrl\": \"string\",\n      \"metadata\": {\n        \"altText\": \"string\",\n        \"animatedThumbnail\": \"string\",\n        \"userTags\": [\n          {\n            \"handle\": \"string\",\n            \"x\": 0,\n            \"y\": 0\n          }\n        ],\n        \"dimensions\": {\n          \"width\": 0,\n          \"height\": 0\n        }\n      }\n    }\n  ],\n  \"videos\": [\n    {\n      \"url\": \"string\",\n      \"thumbnailUrl\": \"string\",\n      \"metadata\": {\n        \"thumbnailOffset\": 0,\n        \"title\": \"string\"\n      }\n    }\n  ],\n  \"documents\": [\n    {\n      \"url\": \"string\",\n      \"title\": \"string\",\n      \"thumbnailUrl\": \"string\"\n    }\n  ],\n  \"link\": {\n    \"url\": \"string\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"thumbnailUrl\": \"string\"\n  }\n}"
            },
            {
              "id": "metadata",
              "type": "object",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "metadata",
              "defaultMatch": false,
              "defaultValue": "{\n  \"instagram\": {\n    \"type\": \"story\",\n    \"link\": \"string\",\n    \"geolocation\": {\n      \"id\": \"string\",\n      \"text\": \"string\"\n    },\n    \"shouldShareToFeed\": false,\n    \"stickerFields\": {\n      \"text\": \"string\"\n    }\n  },\n  \"facebook\": {\n    \"type\": \"post\",\n    \"annotations\": [\n      {\n        \"content\": \"string\",\n        \"indices\": [\n          0\n        ],\n        \"text\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"linkedin\": {\n    \"annotations\": [\n      {\n        \"id\": \"string\",\n        \"link\": \"string\",\n        \"entity\": \"string\",\n        \"vanityName\": \"string\",\n        \"localizedName\": \"string\",\n        \"start\": 0,\n        \"length\": 0\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"twitter\": {\n    \"retweet\": {\n      \"id\": \"string\"\n    },\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ]\n  },\n  \"pinterest\": {\n    \"title\": \"string\",\n    \"url\": \"string\",\n    \"boardServiceId\": \"string\"\n  },\n  \"google\": {\n    \"type\": \"event\",\n    \"title\": \"string\",\n    \"detailsOffer\": {\n      \"title\": \"string\",\n      \"startDate\": \"string\",\n      \"endDate\": \"string\",\n      \"code\": \"string\",\n      \"link\": \"string\",\n      \"terms\": \"string\"\n    },\n    \"detailsEvent\": {\n      \"title\": \"string\",\n      \"startDate\": \"string\",\n      \"endDate\": \"string\",\n      \"isFullDayEvent\": false,\n      \"button\": \"none\",\n      \"link\": \"string\"\n    },\n    \"detailsWhatsNew\": {\n      \"button\": \"none\",\n      \"link\": \"string\"\n    }\n  },\n  \"youtube\": {\n    \"title\": \"string\",\n    \"categoryId\": \"string\",\n    \"privacy\": \"public\",\n    \"license\": \"youtube\",\n    \"notifySubscribers\": false,\n    \"embeddable\": false,\n    \"madeForKids\": false\n  },\n  \"mastodon\": {\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ],\n    \"spoilerText\": \"string\"\n  },\n  \"startPage\": {\n    \"link\": \"string\"\n  },\n  \"threads\": {\n    \"type\": \"post\",\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    },\n    \"topic\": \"string\",\n    \"locationId\": \"string\",\n    \"locationName\": \"string\"\n  },\n  \"bluesky\": {\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"tiktok\": {\n    \"title\": \"string\"\n  }\n}"
            },
            {
              "id": "saveToDraft",
              "type": "boolean",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "saveToDraft",
              "defaultMatch": false
            },
            {
              "id": "ideaId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ideaId",
              "defaultMatch": false
            },
            {
              "id": "draftId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "draftId",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "endpointUrl": "https://mcp.buffer.com/mcp",
        "authentication": "bearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8f10fcdc-0a3e-4cd0-86a1-7ffef0f91399",
      "name": "Generate Download link",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7376,
        -288
      ],
      "parameters": {
        "url": "https://api.dropboxapi.com/2/files/get_temporary_link",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"path\": \"{{ $json.path_lower }}\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "dropboxOAuth2Api"
      },
      "credentials": {
        "dropboxOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "eace3a98-7889-4184-a568-011b73447440",
      "name": "Extract Download Link",
      "type": "n8n-nodes-base.set",
      "position": [
        7584,
        -288
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a13822d5-0089-4a9d-8417-5076c6262420",
              "name": "file_url",
              "type": "string",
              "value": "={{ $json.link }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0fd2b927-249b-42cf-804e-3331b0a5ebc8",
      "name": "Extract Trends2",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        2400,
        -480
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst firstItem = items[0]?.json;\nif (!firstItem || firstItem.error) {\n  return [{ json: { success: false, error: firstItem?.error || \"No data received\" } }];\n}\n\nconst seen = new Set();\nconst trends = items.flatMap(item => {\n  const data = item.json;\n  const records = Array.isArray(data) ? data : [data];\n  return records\n    .map(record => record.title?.trim())\n    .filter(title => {\n      if (!title || seen.has(title)) return false;\n      seen.add(title);\n      return true;\n    })\n    .map(title => ({ json: { trend: title } }));\n});\n\nif (trends.length === 0) {\n  return [{ json: { success: false, error: \"No valid trend data found\" } }];\n}\n\nreturn [{ json: { success: true, trends } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "e2b9299a-8984-4f9a-b62e-43fc9b5d0598",
      "name": "Run an Actor and get dataset1",
      "type": "@apify/n8n-nodes-apify.apify",
      "onError": "continueRegularOutput",
      "position": [
        2080,
        -112
      ],
      "parameters": {
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "VPeCKacMZL2Lgem5t",
          "cachedResultUrl": "https://console.apify.com/actors/VPeCKacMZL2Lgem5t/input",
          "cachedResultName": "Twitter Trending Topics Scraper \ud83c\udf0e (easyapi/twitter-trending-topics-scraper)"
        },
        "timeout": {},
        "operation": "Run actor and get dataset",
        "customBody": "{\n    \"country\": \"nigeria\",\n    \"proxyConfiguration\": {\n        \"useApifyProxy\": false\n    }\n}"
      },
      "credentials": {
        "apifyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "08782332-47b3-4103-8b5e-4d6b650485bf",
      "name": "Apify Success? (Fallback)",
      "type": "n8n-nodes-base.if",
      "position": [
        2560,
        -576
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "163328ab-270c-4abe-a261-1c5acce7acb8",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.success }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "241bff52-c866-4e3a-bc3d-51e56425e6dc",
      "name": "Save Used Trend",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        8272,
        -320
      ],
      "parameters": {
        "columns": {
          "value": {
            "date": "={{ $json.usedAt }}",
            "trend": "={{ $json.trend }}"
          },
          "schema": [
            {
              "id": "trend",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "trend",
              "defaultMatch": false
            },
            {
              "id": "date",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "date",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "yJnzJvRdKazvvCuY",
          "cachedResultUrl": "/projects/vXqhDNlXbSeCxe2L/datatables/yJnzJvRdKazvvCuY",
          "cachedResultName": "trend_table"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "cf192f93-729d-437c-8987-04206aa011a9",
      "name": "\ud83d\udccb Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        -784
      ],
      "parameters": {
        "color": 4,
        "width": 780,
        "height": 1000,
        "content": "## \ud83d\udc26Generate & Post AI Tweets with Images from X Trending Topics (Gemini + FLUX + Buffer)\n\n**What this workflow does:**\nEvery day at 8:30am, 12:30pm, and 4:30pm it:\n1. Scrapes Nigeria's trending X topics via Apify\n2. Falls back to Gemini AI search if Apify fails\n3. Filters out trends used in the last 24h (deduplication)\n4. Picks 2 random unused trends\n5. Generates a pidgin-language tweet per trend using Gemini 2.5 Flash\n6. Generates a matching image using FLUX.1-schnell on HuggingFace\n7. Uploads image to Dropbox \u2192 gets a public link\n8. Posts tweet + image to X via Buffer MCP\n\n---\n### \ud83d\udd27 Setup Required\n- **Apify** \u2013 Connect your Apify API credential\n- **Google Gemini** \u2013 Connect your Google AI (Gemini) credential\n- **HuggingFace** \u2013 Create an HTTP Bearer Token credential with your HF token\n- **Dropbox** \u2013 Connect your Dropbox OAuth2 credential\n- **Buffer** \u2013 Connect your Buffer Bearer Token credential and set your Channel ID in the `Post to X via Buffer` node\n- **Data Table** \u2013 The `trend_table` Data Table must exist in your n8n project (run `Create a data table` once manually, then disable it)\n\n---\n### \u2699\ufe0f Customization\n- Change the `country` in the Apify nodes to scrape trends for a different country\n- Edit the tweet prompt in `Generate Tweet with Gemini` to change tone/language/style\n- Edit the FLUX prompt in `Generate Image with FLUX` to change image style\n- Adjust the schedule in `Schedule Trigger` (currently 3x/day)"
      },
      "typeVersion": 1
    },
    {
      "id": "23589edd-bffa-45b3-9128-c7036d082e4a",
      "name": "Section: Trend Fetching",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 2868,
        "height": 988,
        "content": "### 1\ufe0f\u20e3 Fetch Nigeria Trends\nApify scrapes X trending topics for Nigeria.\nIf Apify fails or returns no data, falls back to Gemini AI search.\nBoth paths merge at `Has Apify or Fallback Trends?`"
      },
      "typeVersion": 1
    },
    {
      "id": "c90b9a3d-9f32-48ee-bd6b-36a940a0c4f1",
      "name": "Section: Deduplication",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3888,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 1580,
        "height": 996,
        "content": "### 2\ufe0f\u20e3 Deduplication\nReads already-used trends from the `trend_table` Data Table.\nFilters out any trend used in the **last 24 hours**.\nThen picks 2 random trends from what's left."
      },
      "typeVersion": 1
    },
    {
      "id": "3c243578-7f28-4989-8a20-c07211d8f98f",
      "name": "Section: Generation & Posting",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5648,
        -800
      ],
      "parameters": {
        "color": 7,
        "width": 2804,
        "height": 1012,
        "content": "### 3\ufe0f\u20e3 Generate Tweet & Image (loops per trend)\nFor each picked trend:\n- Gemini generates a pidgin-English tweet (\u2264275 chars)\n- FLUX.1-schnell generates a matching photorealistic image\n- Image uploaded to Dropbox \u2192 temporary public URL extracted\n- Tweet + image posted to X via Buffer MCP\n- Trend saved to `trend_table` to prevent reuse"
      },
      "typeVersion": 1
    },
    {
      "id": "13fc2c27-dced-418b-bf4d-1c818cf3f0f0",
      "name": "\u26a0\ufe0f HuggingFace Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6752,
        -768
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "content": "\u26a0\ufe0f **HuggingFace Credential Required**\nCreate a new **HTTP Bearer Token** credential in n8n with your HuggingFace API token and select it in Generate Image with FLUX node.\n\nDo NOT paste the token directly in node parameters."
      },
      "typeVersion": 1
    },
    {
      "id": "d7266799-ebf6-474e-a391-3b80cb86f5b8",
      "name": "\u26a0\ufe0f Buffer Channel ID",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7232,
        -768
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "content": "\ud83d\udccc **Buffer Setup**\nReplace `YOUR_BUFFER_CHANNEL_ID` in this node with your actual Buffer channel ID for your X (Twitter) account.\n\nFind it in your Buffer dashboard \u2192 Channel Settings."
      },
      "typeVersion": 1
    },
    {
      "id": "7747e20d-38d9-43c7-9928-08a9a795e040",
      "name": "Data Table Setup Tip",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4432,
        -768
      ],
      "parameters": {
        "color": 5,
        "width": 380,
        "height": 140,
        "content": "\ud83d\udee0\ufe0f **One-time setup:**\nRun `Create a data table` manually once to create the `trend_table`.\nThen **disable** that node \u2014 it only needs to run once."
      },
      "typeVersion": 1
    },
    {
      "id": "8c2f19e8-02a1-44e9-9610-7118ec5773c2",
      "name": "Post to facebook via Buffer1",
      "type": "@n8n/n8n-nodes-langchain.mcpClient",
      "notes": "Twiiter Auto post",
      "position": [
        7824,
        -464
      ],
      "parameters": {
        "tool": {
          "__rl": true,
          "mode": "list",
          "value": "create_post",
          "cachedResultName": "create_post"
        },
        "options": {},
        "parameters": {
          "value": {
            "text": "={{ $('Extract Tweet Text').item.json.tweet }}",
            "assets": "={\n    \"images\": [\n    {\n      \"url\": \"{{ $json.file_url }}\",\n      \"thumbnailUrl\": \"{{ $json.file_url }}\",\n      \"metadata\": {\n        \"altText\": \"{{ $('Extract Tweet Text').item.json.tweet }}\",\n        \"animatedThumbnail\": \"string\",\n        \"userTags\": [\n          {\n            \"handle\": \"string\",\n            \"x\": 0,\n            \"y\": 0\n          }\n        ],\n        \"dimensions\": {\n          \"width\": 0,\n          \"height\": 0\n        }\n      }\n    }\n  ]\n\n} ",
            "metadata": "{\n  \"facebook\": {\n    \"type\": \"post\"\n  }\n}",
            "channelId": "690c55cb5bd637c1835edc4d",
            "schedulingType": "automatic"
          },
          "schema": [
            {
              "id": "channelId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "channelId",
              "defaultMatch": false
            },
            {
              "id": "schedulingType",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "notification",
                  "value": "notification"
                },
                {
                  "name": "automatic",
                  "value": "automatic"
                }
              ],
              "removed": false,
              "required": true,
              "displayName": "schedulingType",
              "defaultMatch": false
            },
            {
              "id": "mode",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "addToQueue",
                  "value": "addToQueue"
                },
                {
                  "name": "shareNow",
                  "value": "shareNow"
                },
                {
                  "name": "shareNext",
                  "value": "shareNext"
                },
                {
                  "name": "customScheduled",
                  "value": "customScheduled"
                },
                {
                  "name": "recommendedTime",
                  "value": "recommendedTime"
                }
              ],
              "removed": true,
              "required": false,
              "displayName": "mode",
              "defaultMatch": false
            },
            {
              "id": "text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "text",
              "defaultMatch": false
            },
            {
              "id": "dueAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "dueAt",
              "defaultMatch": false
            },
            {
              "id": "tagIds",
              "type": "array",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "tagIds",
              "defaultMatch": false,
              "defaultValue": "[\n  \"string\"\n]"
            },
            {
              "id": "assets",
              "type": "object",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "assets",
              "defaultMatch": false,
              "defaultValue": "{\n  \"images\": [\n    {\n      \"url\": \"string\",\n      \"thumbnailUrl\": \"string\",\n      \"metadata\": {\n        \"altText\": \"string\",\n        \"animatedThumbnail\": \"string\",\n        \"userTags\": [\n          {\n            \"handle\": \"string\",\n            \"x\": 0,\n            \"y\": 0\n          }\n        ],\n        \"dimensions\": {\n          \"width\": 0,\n          \"height\": 0\n        }\n      }\n    }\n  ],\n  \"videos\": [\n    {\n      \"url\": \"string\",\n      \"thumbnailUrl\": \"string\",\n      \"metadata\": {\n        \"thumbnailOffset\": 0,\n        \"title\": \"string\"\n      }\n    }\n  ],\n  \"documents\": [\n    {\n      \"url\": \"string\",\n      \"title\": \"string\",\n      \"thumbnailUrl\": \"string\"\n    }\n  ],\n  \"link\": {\n    \"url\": \"string\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"thumbnailUrl\": \"string\"\n  }\n}"
            },
            {
              "id": "metadata",
              "type": "object",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "metadata",
              "defaultMatch": false,
              "defaultValue": "{\n  \"instagram\": {\n    \"type\": \"story\",\n    \"link\": \"string\",\n    \"geolocation\": {\n      \"id\": \"string\",\n      \"text\": \"string\"\n    },\n    \"shouldShareToFeed\": false,\n    \"stickerFields\": {\n      \"text\": \"string\"\n    }\n  },\n  \"facebook\": {\n    \"type\": \"post\",\n    \"annotations\": [\n      {\n        \"content\": \"string\",\n        \"indices\": [\n          0\n        ],\n        \"text\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"linkedin\": {\n    \"annotations\": [\n      {\n        \"id\": \"string\",\n        \"link\": \"string\",\n        \"entity\": \"string\",\n        \"vanityName\": \"string\",\n        \"localizedName\": \"string\",\n        \"start\": 0,\n        \"length\": 0\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"twitter\": {\n    \"retweet\": {\n      \"id\": \"string\"\n    },\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ]\n  },\n  \"pinterest\": {\n    \"title\": \"string\",\n    \"url\": \"string\",\n    \"boardServiceId\": \"string\"\n  },\n  \"google\": {\n    \"type\": \"event\",\n    \"title\": \"string\",\n    \"detailsOffer\": {\n      \"title\": \"string\",\n      \"startDate\": \"string\",\n      \"endDate\": \"string\",\n      \"code\": \"string\",\n      \"link\": \"string\",\n      \"terms\": \"string\"\n    },\n    \"detailsEvent\": {\n      \"title\": \"string\",\n      \"startDate\": \"string\",\n      \"endDate\": \"string\",\n      \"isFullDayEvent\": false,\n      \"button\": \"none\",\n      \"link\": \"string\"\n    },\n    \"detailsWhatsNew\": {\n      \"button\": \"none\",\n      \"link\": \"string\"\n    }\n  },\n  \"youtube\": {\n    \"title\": \"string\",\n    \"categoryId\": \"string\",\n    \"privacy\": \"public\",\n    \"license\": \"youtube\",\n    \"notifySubscribers\": false,\n    \"embeddable\": false,\n    \"madeForKids\": false\n  },\n  \"mastodon\": {\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ],\n    \"spoilerText\": \"string\"\n  },\n  \"startPage\": {\n    \"link\": \"string\"\n  },\n  \"threads\": {\n    \"type\": \"post\",\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    },\n    \"topic\": \"string\",\n    \"locationId\": \"string\",\n    \"locationName\": \"string\"\n  },\n  \"bluesky\": {\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"tiktok\": {\n    \"title\": \"string\"\n  }\n}"
            },
            {
              "id": "saveToDraft",
              "type": "boolean",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "saveToDraft",
              "defaultMatch": false
            },
            {
              "id": "ideaId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ideaId",
              "defaultMatch": false
            },
            {
              "id": "draftId",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "draftId",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "endpointUrl": "https://mcp.buffer.com/mcp",
        "authentication": "bearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c292733a-a7bb-40da-a9fd-dc5b006ffaeb",
      "name": "Post to thread via Buffer1",
      "type": "@n8n/n8n-nodes-langchain.mcpClient",
      "notes": "Twiiter Auto post",
      "position": [
        7840,
        -304
      ],
      "parameters": {
        "tool": {
          "__rl": true,
          "mode": "list",
          "value": "create_post",
          "cachedResultName": "create_post"
        },
        "options": {},
        "parameters": {
          "value": {
            "text": "={{ $('Extract Tweet Text').item.json.tweet }}",
            "assets": "={\n    \"images\": [\n    {\n      \"url\": \"{{ $json.file_url }}\",\n      \"thumbnailUrl\": \"{{ $json.file_url }}\",\n      \"metadata\": {\n        \"altText\": \"{{ $('Extract Tweet Text').item.json.tweet }}\",\n        \"animatedThumbnail\": \"string\",\n        \"userTags\": [\n          {\n            \"handle\": \"string\",\n            \"x\": 0,\n            \"y\": 0\n          }\n        ],\n        \"dimensions\": {\n          \"width\": 0,\n          \"height\": 0\n        }\n      }\n    }\n  ]\n\n} ",
            "channelId": "69d3b3f4031bfa423cd55a9f",
            "schedulingType": "automatic"
          },
          "schema": [
            {
              "id": "channelId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "channelId",
              "defaultMatch": false
            },
            {
              "id": "schedulingType",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "notification",
                  "value": "notification"
                },
                {
                  "name": "automatic",
                  "value": "automatic"
                }
              ],
              "removed": false,
              "required": true,
              "displayName": "schedulingType",
              "defaultMatch": false
            },
            {
              "id": "mode",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "addToQueue",
                  "value": "addToQueue"
                },
                {
                  "name": "shareNow",
                  "value": "shareNow"
                },
                {
                  "name": "shareNext",
                  "value": "shareNext"
                },
                {
                  "name": "customScheduled",
                  "value": "customScheduled"
                },
                {
                  "name": "recommendedTime",
                  "value": "recommendedTime"
                }
              ],
              "removed": true,
              "required": false,
              "displayName": "mode",
              "defaultMatch": false
            },
            {
              "id": "text",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "text",
              "defaultMatch": false
            },
            {
              "id": "dueAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "dueAt",
              "defaultMatch": false
            },
            {
              "id": "tagIds",
              "type": "array",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "tagIds",
              "defaultMatch": false,
              "defaultValue": "[\n  \"string\"\n]"
            },
            {
              "id": "assets",
              "type": "object",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "assets",
              "defaultMatch": false,
              "defaultValue": "{\n  \"images\": [\n    {\n      \"url\": \"string\",\n      \"thumbnailUrl\": \"string\",\n      \"metadata\": {\n        \"altText\": \"string\",\n        \"animatedThumbnail\": \"string\",\n        \"userTags\": [\n          {\n            \"handle\": \"string\",\n            \"x\": 0,\n            \"y\": 0\n          }\n        ],\n        \"dimensions\": {\n          \"width\": 0,\n          \"height\": 0\n        }\n      }\n    }\n  ],\n  \"videos\": [\n    {\n      \"url\": \"string\",\n      \"thumbnailUrl\": \"string\",\n      \"metadata\": {\n        \"thumbnailOffset\": 0,\n        \"title\": \"string\"\n      }\n    }\n  ],\n  \"documents\": [\n    {\n      \"url\": \"string\",\n      \"title\": \"string\",\n      \"thumbnailUrl\": \"string\"\n    }\n  ],\n  \"link\": {\n    \"url\": \"string\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"thumbnailUrl\": \"string\"\n  }\n}"
            },
            {
              "id": "metadata",
              "type": "object",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "metadata",
              "defaultMatch": false,
              "defaultValue": "{\n  \"instagram\": {\n    \"type\": \"story\",\n    \"link\": \"string\",\n    \"geolocation\": {\n      \"id\": \"string\",\n      \"text\": \"string\"\n    },\n    \"shouldShareToFeed\": false,\n    \"stickerFields\": {\n      \"text\": \"string\"\n    }\n  },\n  \"facebook\": {\n    \"type\": \"post\",\n    \"annotations\": [\n      {\n        \"content\": \"string\",\n        \"indices\": [\n          0\n        ],\n        \"text\": \"string\",\n        \"url\": \"string\"\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"linkedin\": {\n    \"annotations\": [\n      {\n        \"id\": \"string\",\n        \"link\": \"string\",\n        \"entity\": \"string\",\n        \"vanityName\": \"string\",\n        \"localizedName\": \"string\",\n        \"start\": 0,\n        \"length\": 0\n      }\n    ],\n    \"linkAttachment\": {\n      \"url\": \"string\"\n    }\n  },\n  \"twitter\": {\n    \"retweet\": {\n      \"id\": \"string\"\n    },\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensions\": {\n                  \"width\": 0,\n                  \"height\": 0\n                }\n              }\n            }\n          ],\n          \"videos\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"thumbnailOffset\": 0,\n                \"title\": \"string\"\n              }\n            }\n          ],\n          \"documents\": [\n            {\n              \"url\": \"string\",\n              \"title\": \"string\",\n              \"thumbnailUrl\": \"string\"\n            }\n          ],\n          \"link\": {\n            \"url\": \"string\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"thumbnailUrl\": \"string\"\n          }\n        }\n      }\n    ]\n  },\n  \"pinterest\": {\n    \"title\": \"string\",\n    \"url\": \"string\",\n    \"boardServiceId\": \"string\"\n  },\n  \"google\": {\n    \"type\": \"event\",\n    \"title\": \"string\",\n    \"detailsOffer\": {\n      \"title\": \"string\",\n      \"startDate\": \"string\",\n      \"endDate\": \"string\",\n      \"code\": \"string\",\n      \"link\": \"string\",\n      \"terms\": \"string\"\n    },\n    \"detailsEvent\": {\n      \"title\": \"string\",\n      \"startDate\": \"string\",\n      \"endDate\": \"string\",\n      \"isFullDayEvent\": false,\n      \"button\": \"none\",\n      \"link\": \"string\"\n    },\n    \"detailsWhatsNew\": {\n      \"button\": \"none\",\n      \"link\": \"string\"\n    }\n  },\n  \"youtube\": {\n    \"title\": \"string\",\n    \"categoryId\": \"string\",\n    \"privacy\": \"public\",\n    \"license\": \"youtube\",\n    \"notifySubscribers\": false,\n    \"embeddable\": false,\n    \"madeForKids\": false\n  },\n  \"mastodon\": {\n    \"thread\": [\n      {\n        \"text\": \"string\",\n        \"assets\": {\n          \"images\": [\n            {\n              \"url\": \"string\",\n              \"thumbnailUrl\": \"string\",\n              \"metadata\": {\n                \"altText\": \"string\",\n                \"animatedThumbnail\": \"string\",\n                \"userTags\": [\n                  {\n                    \"handle\": \"string\",\n                    \"x\": 0,\n                    \"y\": 0\n                  }\n                ],\n                \"dimensi

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

Perfect for social media managers, content creators, and personal brands who want to stay relevant on X without manually tracking trends or writing posts every day. The workflow runs 3 times daily by default (8:30am, 12:30pm, 4:30pm). You can adjust the schedule in the Schedule…

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

More Web Scraping workflows → · Browse all categories →

Related workflows

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

Web Scraping

Turn your n8n workflow into an automated competitive intelligence unit. This template monitors competitor activities across blog feeds and YouTube channels to detect strategic shifts. Instead of simpl

YouTube, @Apify/N8N Nodes Apify, RSS Feed Read +4
Web Scraping

Turn any Amazon India product URL into a fully-edited 10-second lifestyle video and auto-publish it to Instagram, Facebook, X (Twitter), LinkedIn, YouTube, and Threads — with platform-optimized captio

HTTP Request, @Apify/N8N Nodes Apify, OpenRouter Chat +3
Web Scraping

&gt; Watch the full Youtube Video Tutorial [](https://youtu.be/Y-wUr2-UYZk)

Data Table, HTTP Request, Google Sheets +1
Web Scraping

This workflow automatically searches YouTube Data API for videos related to specific keywords, extracts channel data, filters channels based on performance metrics, and saves the results into Google S

Google Sheets, @Apify/N8N Nodes Apify, HTTP Request
Web Scraping

This workflow is for social media managers, content strategists, and marketing teams who need to track TikTok engagement trends across multiple hashtags on a recurring basis — without manually checkin

Gmail, HTTP Request, Data Table