AutomationFlowsMarketing & Ads › 上傳圖文發布到 Fb/ig/threads

上傳圖文發布到 Fb/ig/threads

上傳圖文發布到 FB/IG/Threads. Uses httpRequest. Event-driven trigger; 6 nodes.

Event trigger★★★★☆ complexity6 nodesHTTP Request
Marketing & Ads Trigger: Event Nodes: 6 Complexity: ★★★★☆ Added:

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": "GenP02",
  "name": "\u4e0a\u50b3\u5716\u6587\u767c\u5e03\u5230 FB/IG/Threads",
  "nodes": [
    {
      "parameters": {
        "content": "\u26a0\ufe0f \u67b6\u69cb\u7bc4\u672c\uff08\u672a\u63a5 key\uff09\n\n\u586b Page/\u5e33\u865f ID + Access Token\uff08\u767c\u6587\u6b0a\u9650\uff09\u3002\nIG/Threads \u540c\u67b6\u69cb\u63db Graph API endpoint\u3002\n\u7522\u6587(Ollama)\u514d\u8cbb\uff1b\u767c\u5e03\u6bb5\u8981 token\u3002",
        "height": 320,
        "width": 380,
        "color": 4
      },
      "id": "n-note",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        180,
        100
      ]
    },
    {
      "parameters": {},
      "id": "n-manual",
      "name": "When clicking Execute",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        460
      ]
    },
    {
      "parameters": {
        "jsCode": "const topic='\uff08\u63db\u6210\u4f60\u7684\u4e3b\u984c\u6216\u7d20\u6750\uff09';\nconst prompt='\u4f60\u662f\u793e\u7fa4\u5c0f\u7de8\u3002\u6839\u64da\u4e3b\u984c\u5beb\u4e00\u5247\u8cbc\u6587\uff08\u7e41\u4e2d\u3001\u53e3\u8a9e\u3001\u4e0d\u91e3\u4e92\u52d5\uff09\uff1a\\n\\n\u4e3b\u984c\uff1a'+topic;\nreturn [{json:{topic,prompt}}];"
      },
      "id": "n-input",
      "name": "Input (edit me)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        460
      ]
    },
    {
      "parameters": {
        "options": {
          "timeout": 180000
        },
        "method": "POST",
        "url": "http://host.docker.internal:11434/api/chat",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: 'qwen2.5:latest', messages: [ { role: 'system', content: '\u4f60\u662f\u53f0\u7063\u4eba\uff0c\u4e00\u5f8b\u4f7f\u7528\u53f0\u7063\u7e41\u9ad4\u4e2d\u6587\u8207\u53f0\u7063\u6163\u7528\u8a9e\u56de\u8986\uff0c\u7d55\u5c0d\u4e0d\u8981\u51fa\u73fe\u4efb\u4f55\u7c21\u9ad4\u5b57\u6216\u4e2d\u570b\u7528\u8a9e\u3002' }, { role: 'user', content: $json.prompt } ], stream: false }) }}"
      },
      "id": "n-ollama",
      "name": "Generate with Ollama",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        460
      ]
    },
    {
      "parameters": {
        "jsCode": "const data=$input.first().json;let postText='';try{postText=(data.message&&data.message.content)||'';}catch(e){}\nif(!postText)postText=JSON.stringify(data);return [{json:{postText}}];"
      },
      "id": "n-extract",
      "name": "Extract Text",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        460
      ]
    },
    {
      "parameters": {
        "options": {},
        "method": "POST",
        "url": "https://graph.facebook.com/v21.0/YOUR_PAGE_ID/feed",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "YOUR_PAGE_ACCESS_TOKEN"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ message: $json.postText }) }}"
      },
      "id": "n-pub",
      "name": "Post to Facebook",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        460
      ]
    }
  ],
  "connections": {
    "When clicking Execute": {
      "main": [
        [
          {
            "node": "Input (edit me)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input (edit me)": {
      "main": [
        [
          {
            "node": "Generate with Ollama",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate with Ollama": {
      "main": [
        [
          {
            "node": "Extract Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text": {
      "main": [
        [
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

上傳圖文發布到 FB/IG/Threads. Uses httpRequest. Event-driven trigger; 6 nodes.

Source: https://github.com/YuriCrystal/n8n-marketing-flows/blob/46c8e2535430ebe1e9bb4d8b6b335465c4702ffb/templates/p02-publish-multi.skeleton.json — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

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

Marketing & Ads

⚡AI-Powered YouTube Playlist & Video Summarization and Analysis v2. Uses httpRequest, n8n-nodes-youtube-transcription-dmr, redis. Event-driven trigger; 73 nodes.

HTTP Request, N8N Nodes Youtube Transcription Dmr, Redis
Marketing & Ads

Lead Cleanup - SMS Errors & DNC. Uses httpRequest, slack. Event-driven trigger; 49 nodes.

HTTP Request, Slack
Marketing & Ads

LAB 10 - Trade Fair Lead Processing - Inspectable. Uses httpRequest. Event-driven trigger; 46 nodes.

HTTP Request
Marketing & Ads

Maximize your conversion rates with this end-to-end automated outreach and lead nurturing system. This workflow manages the entire sales lifecycle—from instant contact enrollment via WhatsApp to AI-pe

N8N Nodes Wati, Airtable, HTTP Request
Marketing & Ads

This workflow is designed to take user inputs in order to generate an image using the Riverflow 2.0 model through the Replicate API. It can handle both image generation as well as image editing. Addit

Form Trigger, Data Table, HTTP Request +1