8
n8n 中文网amn8n.com

使用 Facebook Graph API 安排和发布所有 Instagram 内容类型

高级

这是一个AI, Marketing领域的自动化工作流,包含 31 个节点。主要使用 If, Set, Wait, Switch, HttpRequest 等节点,结合人工智能技术实现智能自动化。 使用 Facebook Graph API 安排和发布所有 Instagram 内容类型

前置要求
  • 可能需要目标 API 的认证凭证
  • Facebook Graph API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "353ac65d120d2007b8a1503e85a96651a9b2cbb94b0334693ebac2129fa6a7ee",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b4438922-5dfd-44a7-838b-1d91be3dd032",
      "name": "容器 HTTP 图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4220,
        240
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "={{ $json.image_url }}"
            },
            {
              "name": "caption",
              "value": "={{ $json.caption }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9350ff43-ae98-4165-98cc-2781937ca2af",
      "name": "容器 HTTP Reels",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4220,
        1500
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "media_type",
              "value": "=REELS"
            },
            {
              "name": "video_url",
              "value": "={{ $json.video_url }}"
            },
            {
              "name": "caption",
              "value": "={{ $json.caption }}"
            },
            {
              "name": "cover_url",
              "value": "={{ $json.cover_image }}"
            },
            {
              "name": "audio_name",
              "value": "Monody (feat. Laura Brehm)"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4706d54a-b294-46af-b6af-ee4b751af246",
      "name": "容器 FB 图片",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -4220,
        440
      ],
      "parameters": {
        "edge": "media",
        "node": "={{ $json.node }}",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "caption",
                "value": "={{ $json.caption }}"
              },
              {
                "name": "image_url",
                "value": "={{ $json.image_url }}"
              }
            ]
          }
        },
        "graphApiVersion": "v22.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YeGWCZ0amouHAnaI",
          "name": "IG lakshitukani Login (n8n Integration 2)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bc067bab-2652-4667-a0bc-afe1bc009af0",
      "name": "容器 FB Story 图片",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -4220,
        840
      ],
      "parameters": {
        "edge": "media",
        "node": "={{ $json.node }}",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "caption",
                "value": "={{ $json.caption }}"
              },
              {
                "name": "image_url",
                "value": "={{ $json.image_url }}"
              },
              {
                "name": "media_type",
                "value": "STORIES"
              }
            ]
          }
        },
        "graphApiVersion": "v22.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YeGWCZ0amouHAnaI",
          "name": "IG lakshitukani Login (n8n Integration 2)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0781252a-0145-4659-9c53-7ad130842711",
      "name": "容器 HTTP Story 图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4220,
        680
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "media_type",
              "value": "=STORIES"
            },
            {
              "name": "image_url",
              "value": "={{ $json.image_url }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f47c2dcc-e0d1-457e-8741-c5952cf61606",
      "name": "容器 FB Reels",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -4220,
        1640
      ],
      "parameters": {
        "edge": "media",
        "node": "=17841456545908024",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "caption",
                "value": "={{ $json.caption }}"
              },
              {
                "name": "video_url",
                "value": "={{ $json.video_url }}"
              },
              {
                "name": "media_type",
                "value": "REELS"
              },
              {
                "name": "cover_url",
                "value": "={{ $json.cover_image }}"
              }
            ]
          }
        },
        "graphApiVersion": "v22.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YeGWCZ0amouHAnaI",
          "name": "IG lakshitukani Login (n8n Integration 2)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fa81d7f3-d5c0-402d-8741-70b09656a5fc",
      "name": "容器 HTTP Story 视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4220,
        1080
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "media_type",
              "value": "=STORIES"
            },
            {
              "name": "video_url",
              "value": "={{ $json.video_url }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f6a8ec74-68f2-4b9e-a5dc-b3f0d7ecf5d2",
      "name": "容器 FB Story 视频",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -4220,
        1240
      ],
      "parameters": {
        "edge": "media",
        "node": "={{ $json.node }}",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "video_url",
                "value": "={{ $json.video_url }}"
              },
              {
                "name": "media_type",
                "value": "STORIES"
              }
            ]
          }
        },
        "graphApiVersion": "v22.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YeGWCZ0amouHAnaI",
          "name": "IG lakshitukani Login (n8n Integration 2)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "43cc35cd-6f96-4db1-9b6d-11e1fa7d529b",
      "name": "容器轮播图片 1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4660,
        1880
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "={{ $json.image_url }}"
            },
            {
              "name": "caption",
              "value": "={{ $json.caption }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fa54a3d6-2e93-445f-9c6c-6643eb181d07",
      "name": "容器轮播图片 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4440,
        1880
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $('🔀 Smart Content Router').item.json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "=https://4.img-dpreview.com/files/p/TC190x190S190x190~sample_galleries/0890568360/4504013564.jpg"
            },
            {
              "name": "caption",
              "value": "={{ $('🔀 Smart Content Router').item.json.caption }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7f1a40cb-79b9-4af1-b41c-5eb26e19ebc7",
      "name": "容器 HTTP 轮播",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4220,
        1880
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $('🔀 Smart Content Router').item.json.node }}/media",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "children",
              "value": "={{ $('Container Carousel Image 1').item.json.id }}, {{ $json.id }}"
            },
            {
              "name": "caption",
              "value": "={{ $('🔀 Smart Content Router').item.json.caption }}"
            },
            {
              "name": "media_type",
              "value": "CAROUSEL"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0472b36a-76c6-4f1d-840b-1cc6d44aaeef",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4360,
        180
      ],
      "parameters": {
        "width": 400,
        "height": 420,
        "content": "## 📸 图片帖子创建"
      },
      "typeVersion": 1
    },
    {
      "id": "9bd43a33-0ce2-4b70-a6e8-82b770388bfd",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4360,
        620
      ],
      "parameters": {
        "width": 400,
        "height": 380,
        "content": "## 📱 Story 图片上传"
      },
      "typeVersion": 1
    },
    {
      "id": "1fe2c077-d86b-4ce9-b04e-b33c5f515d98",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4360,
        1020
      ],
      "parameters": {
        "width": 400,
        "height": 380,
        "content": "## 🎬 Story 视频上传"
      },
      "typeVersion": 1
    },
    {
      "id": "72c5e2d9-c8a1-45ed-9856-99cef03ee29c",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4360,
        1420
      ],
      "parameters": {
        "width": 400,
        "height": 380,
        "content": "## 🎵 Instagram Reels 上传"
      },
      "typeVersion": 1
    },
    {
      "id": "0fb7ead7-7eec-40af-9242-59e514c31e3d",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4820,
        1820
      ],
      "parameters": {
        "width": 860,
        "height": 220,
        "content": "## 🖼️ 轮播帖子(多张图片)"
      },
      "typeVersion": 1
    },
    {
      "id": "9284f2a3-f2a2-4f0d-bc3a-9affaf54b871",
      "name": "便利贴5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5380,
        760
      ],
      "parameters": {
        "color": 3,
        "width": 840,
        "height": 640,
        "content": "## 变量和路由设置"
      },
      "typeVersion": 1
    },
    {
      "id": "f6c099a8-bc27-4636-b857-c380d0f99766",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3700,
        840
      ],
      "parameters": {
        "color": 6,
        "width": 1140,
        "height": 540,
        "content": "## 🔄 容器处理流水线"
      },
      "typeVersion": 1
    },
    {
      "id": "db361414-e90c-4a71-b353-f837a76f4b6f",
      "name": "便签 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2520,
        840
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 540,
        "content": "## 📤 智能发布系统"
      },
      "typeVersion": 1
    },
    {
      "id": "a27e2ffc-b8e2-4501-a9ba-bc8f31efd92e",
      "name": "✅ 容器就绪了吗?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2960,
        960
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "682def4c-2cda-4417-9329-682a8a60feed",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status_code }}",
              "rightValue": "FINISHED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a42df401-c1e9-4194-9c76-a03c26b1c09c",
      "name": "🔀 HTTP 与 FB API 路由器",
      "type": "n8n-nodes-base.if",
      "position": [
        -2460,
        1040
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "da6bcb63-632a-443a-b5b3-a8b6e1c62871",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('🔀 Smart Content Router').item.json.post_type.split(\"_\")[0] }}",
              "rightValue": "http"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "10905c0b-ff3c-4aed-b741-652dd1847fac",
      "name": "📤 通过 HTTP API 发布",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2240,
        940
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $('🔀 Smart Content Router').item.json.node }}/media_publish",
        "method": "POST",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "creation_id",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "hWVD8Wl5GEMhDj4z",
          "name": "lakshitukani IG Account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "24948258-f1b0-4e47-92b1-4282b88dbf14",
      "name": "📤 通过 Facebook SDK 发布",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -2240,
        1140
      ],
      "parameters": {
        "edge": "media_publish",
        "node": "={{ $('🔀 Smart Content Router').item.json.node }}",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "creation_id",
                "value": "={{ $json.id }}"
              }
            ]
          }
        },
        "graphApiVersion": "v22.0",
        "httpRequestMethod": "POST"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "YeGWCZ0amouHAnaI",
          "name": "IG lakshitukani Login (n8n Integration 2)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "90e80bc1-81ab-43dc-b764-2850284ec9e9",
      "name": "⏰ 初始处理等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3440,
        1040
      ],
      "webhookId": "443f84eb-1e9d-4c77-9a9a-c70290333dca",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "9db2f610-29ba-46ad-858d-80f909b8ecf7",
      "name": "⏰ 重试等待循环",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2740,
        1140
      ],
      "webhookId": "e9ac0c1d-b415-4160-a6b1-908d2310cb23",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "6aa81fe8-430c-4a06-a9a7-863c568390f2",
      "name": "🔍 检查处理状态",
      "type": "n8n-nodes-base.set",
      "position": [
        -3660,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "37f96da8-a8b6-417b-b5cf-7a4df5b4610c",
              "name": "container_id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4327071b-4646-4044-8003-b16720a759be",
      "name": "🔀 智能内容路由器",
      "type": "n8n-nodes-base.switch",
      "position": [
        -4880,
        900
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "HTTP - Image",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ab388a77-1660-4a64-ba58-bc405444dbd5",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "http_image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "FB - Image",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "be8816f5-ae68-48c3-869e-bc67078298d8",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "fb_image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "HTTP - Story Img",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "663bacc8-ceeb-4f81-b058-c379eaf6e717",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "http_story_image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "FB - Story Image",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "99441a51-906e-469a-b98e-64aa43c996ba",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "fb_story_image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "HTTP = Story Video",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "29cfc5f8-e1ae-4c10-8961-2356d7c13195",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "http_story_video"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "FB - Story Video",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "578f5df3-23ef-4ef3-9a48-7528c826ea46",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "fb_story_video"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "HTTP - Reels",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "25e31619-4116-46e0-bfcb-a8d8a030fa68",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "http_reel"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "FB - Reels",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cf34e931-f798-4c70-af29-9aec7aab8f6c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "fb_reel"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "HTTP - Carousel",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "02944863-db4b-445f-9c03-382abd9525b9",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "http_carousel"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "FB - Carousel",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0a17aaa0-8520-442f-9c3f-b4112339a08c",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.post_type }}",
                    "rightValue": "fb_carousel"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "f27ef907-cdab-401d-b8ec-e244f63aada0",
      "name": "🚀 手动触发 - 启动工作流",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -5320,
        1040
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cb1562d5-2e46-4299-a93d-d9a283c720d3",
      "name": "⚙️ 配置帖子设置",
      "type": "n8n-nodes-base.set",
      "position": [
        -5100,
        1040
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "217b69e3-98ec-49a2-8fde-372dd1bc1848",
              "name": "node",
              "type": "string",
              "value": "17841456545908024"
            },
            {
              "id": "2caebe7c-a2d3-428e-b129-fcfbe66854e5",
              "name": "post_type",
              "type": "string",
              "value": "http_reel"
            },
            {
              "id": "a17a5c94-d9ae-44f8-9d56-fb55d17efe5a",
              "name": "image_url",
              "type": "string",
              "value": "https://media.licdn.com/dms/image/v2/D4D03AQHf-K7ergkUwQ/profile-displayphoto-shrink_800_800/B4DZbdtDouHQAg-/0/1747476298728?e=1753920000&v=beta&t=Js1KDjpDYOgzYW4YlhwT1_ZmbggoSIxjcq3IA0rRJs0"
            },
            {
              "id": "6e2c9c54-ce2c-4ea5-8bb2-ae2ae4712427",
              "name": "caption",
              "type": "string",
              "value": "Automated Post"
            },
            {
              "id": "32aa1561-458c-4f64-a854-eab65f9ad1dd",
              "name": "video_url",
              "type": "string",
              "value": "https://videos.pexels.com/video-files/4434242/4434242-sd_360_640_24fps.mp4"
            },
            {
              "id": "c6485101-488b-43db-8708-1a1136292956",
              "name": "cover_image",
              "type": "string",
              "value": "https://cdn.pixabay.com/photo/2023/11/07/22/59/building-8373618_1280.jpg"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "38e0d117-e4b0-429d-b263-41ee141c71a2",
      "name": "🔍 检查处理状态1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3180,
        1040
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v22.0/{{ $('🔍 Check Processing Status').item.json.container_id }}",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "fields",
              "value": "status_code"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "teNjcIVMpXV90H7T",
          "name": "IG lakshitukani (n8n integration)"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7cfc1f61-8318-479e-b763-6d218d04be6c",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5260,
        160
      ],
      "parameters": {
        "color": 2,
        "width": 460,
        "height": 380,
        "content": "## 👨‍💻 创建者信息"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Container FB Image": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container FB Reels": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Retry Wait Loop": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container HTTP Image": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container HTTP Reels": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container HTTP Carousel": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "✅ Is Container Ready?": {
      "main": [
        [
          {
            "node": "🔀 HTTP vs FB API Router",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "⏰ Retry Wait Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container FB Story Image": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container FB Story Video": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔀 Smart Content Router": {
      "main": [
        [
          {
            "node": "Container HTTP Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container FB Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container HTTP Story Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container FB Story Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container HTTP Story Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container FB Story Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container HTTP Reels",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container FB Reels",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Container Carousel Image 1",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Container Carousel Image 1": {
      "main": [
        [
          {
            "node": "Container Carousel Image 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container Carousel Image 2": {
      "main": [
        [
          {
            "node": "Container HTTP Carousel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container HTTP Story Image": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container HTTP Story Video": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔀 HTTP vs FB API Router": {
      "main": [
        [
          {
            "node": "📤 Publish via HTTP API",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📤 Publish via Facebook SDK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Initial Processing Wait": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Check Processing Status": {
      "main": [
        [
          {
            "node": "⏰ Initial Processing Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Check Processing Status1": {
      "main": [
        [
          {
            "node": "✅ Is Container Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⚙️ Configure Post Settings": {
      "main": [
        [
          {
            "node": "🔀 Smart Content Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🚀 Manual Trigger - Start Workflow": {
      "main": [
        [
          {
            "node": "⚙️ Configure Post Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 人工智能, 营销

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量31
分类2
节点类型8
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流