AutomationFlowsMarketing & Ads › 匯出 Fb/ig/threads 數據至 Sheets

匯出 Fb/ig/threads 數據至 Sheets

匯出 FB/IG/Threads 數據至 Sheets. Uses httpRequest. Scheduled trigger; 7 nodes.

Cron / scheduled trigger★★★★☆ complexity7 nodesHTTP Request
Marketing & Ads Trigger: Cron / scheduled Nodes: 7 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": "GenA13",
  "name": "\u532f\u51fa FB/IG/Threads \u6578\u64da\u81f3 Sheets",
  "nodes": [
    {
      "parameters": {
        "content": "\u26a0\ufe0f \u67b6\u69cb\u7bc4\u672c\uff08\u672a\u63a5 key\uff09\n\n\u586b Page/\u5e33\u865f ID + Access Token\uff08read_insights\uff09\u3002\n\u751f\u7522\u5efa\u8b70\u7528 n8n \u5167\u5efa Facebook Graph API / YouTube \u7bc0\u9ede + OAuth\u3002\n\u5206\u6790(Ollama)+\u63a8 Discord \u514d\u8cbb\uff1bwebhook \u8981\u8cbc\u3002",
        "height": 320,
        "width": 380,
        "color": 4
      },
      "id": "n-note",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        180,
        100
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1"
            }
          ]
        }
      },
      "id": "n-sched",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        460
      ]
    },
    {
      "parameters": {
        "options": {},
        "method": "GET",
        "url": "https://graph.facebook.com/v21.0/YOUR_PAGE_ID/insights?metric=post_impressions,post_engaged_users&period=week",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "YOUR_ACCESS_TOKEN"
            }
          ]
        }
      },
      "id": "n-fetch",
      "name": "Fetch (API)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        460,
        460
      ]
    },
    {
      "parameters": {
        "jsCode": "const d=JSON.stringify($input.first().json).slice(0,3000);\nconst prompt='\u4ee5\u4e0b\u662f\u793e\u7fa4/\u5ee3\u544a\u6210\u6548\u6578\u64da\uff08JSON\uff09\u3002\u8acb\u7528\u7e41\u4e2d\u5206\u6790\uff1a1)\u91cd\u9ede 2)\u8da8\u52e2 3)\u5efa\u8b70\u3002\\n\\n'+d;\nreturn [{json:{prompt}}];"
      },
      "id": "n-prep",
      "name": "Build Prompt",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        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": "Summarize with Ollama",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        460
      ]
    },
    {
      "parameters": {
        "jsCode": "const data = $input.first().json;\nlet v = '';\ntry { v = (data.message && data.message.content) || (data.content && data.content[0] && data.content[0].text) || data.response || ''; } catch (e) {}\nif (!v) v = JSON.stringify(data);\nreturn [{ json: { summary: v } }];"
      },
      "id": "n-extract",
      "name": "Extract Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1120,
        460
      ]
    },
    {
      "parameters": {
        "options": {},
        "method": "POST",
        "url": "https://discord.com/api/webhooks/REPLACE_WITH_YOUR_WEBHOOK_URL",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ content: ('\ud83d\udcca \u532f\u51fa FB/IG/Threads \u6578\u64da\u81f3 Sheets\\n\\n' + ($json.summary || '')).slice(0, 1900) }) }}"
      },
      "id": "n-discord",
      "name": "Send to Discord",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1340,
        460
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch (API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch (API)": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Summarize with Ollama",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize with Ollama": {
      "main": [
        [
          {
            "node": "Extract Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Result": {
      "main": [
        [
          {
            "node": "Send to Discord",
            "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 數據至 Sheets. Uses httpRequest. Scheduled trigger; 7 nodes.

Source: https://github.com/YuriCrystal/n8n-marketing-flows/blob/main/templates/a13-social-to-sheets.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

Workflow A — WhatsApp Lead Intake & Qualification. Uses postgres, httpRequest, errorTrigger. Scheduled trigger; 67 nodes.

Postgres, HTTP Request, Error Trigger
Marketing & Ads

Build authentic Reddit presence and generate qualified leads through AI-powered community engagement that provides genuine value without spam or promotion.

HTTP Request, Reddit
Marketing & Ads

Ghost Rider CRM Import (Lead Processor). Uses httpRequest. Scheduled trigger; 40 nodes.

HTTP Request
Marketing & Ads

This workflow runs on scheduled weekly and monthly triggers to generate unified marketing performance reports. It processes multiple websites by collecting analytics data, paid ads performance, and CR

Gmail, Google Sheets, Google Analytics +3
Marketing & Ads

Fetch Multiple Google Analytics GA4 metrics daily, post to Discord, update previous day’s entry as GA data finalizes over seven days. Automates daily traffic reporting Maintains single message per day

Google Analytics, Discord, HTTP Request