8
n8n 한국어amn8n.com

Meta Graph API 및 시스템 사용자 토큰으로 Instagram 및 Facebook 게시 자동화

고급

이것은Social Media분야의자동화 워크플로우로, 22개의 노드를 포함합니다.주로 Code, Wait, HttpRequest, ManualTrigger, ScheduleTrigger 등의 노드를 사용하며. Meta Graph API 및 시스템 사용자 토큰을 활용한 Instagram 및 Facebook 게시 자동화

사전 요구사항
  • 대상 API의 인증 정보가 필요할 수 있음

카테고리

워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {
    "instanceId": "805a1da4490c39f62729f8489b312a775cb04286f77152b4febdc1f1642e5967",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "4fccdc64-1eb2-43a6-82c5-5ebcea2b801b",
      "name": "워크플로우 '실행' 클릭 시",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -560,
        480
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "738fabc1-5282-442b-a275-a3943bff890e",
      "name": "Instagram에 게시",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -300,
        480
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/<YOUR PAGE ID HERE>/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "<YOUR IMAGE URL HERE>"
            },
            {
              "name": "caption",
              "value": "<YOUR CAPTION HERE>"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "szDaIQHhZqLlJHII",
          "name": "Facebook Graph account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "da899479-cfaa-4771-bc31-bdb0d4e4a3b7",
      "name": "Instagram 게시물 발행",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        100,
        480
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/17841404935066235/media_publish",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "creation_id",
              "value": "={{ $json.id }}"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "szDaIQHhZqLlJHII",
          "name": "Facebook Graph account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b6cd01bd-f98f-4092-81f2-1b8f6e6c4b27",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1320,
        -300
      ],
      "parameters": {
        "width": 540,
        "height": 1900,
        "content": "**How to Generate a Facebook Short-Lived Access Token for Instagram + Facebook Page Posting**\n\n### What You Need\n\n* A **Facebook account**\n* A **Facebook Page** (must be linked to an Instagram Business account if you plan to post to IG)\n* Access to [Meta for Developers](https://developers.facebook.com/)\n\n---\nStep-by-Step: How to Generate Your Short-Lived Token\n\n#### 1. Go to Meta for Developers\n\n* Visit: [https://developers.facebook.com/apps](https://developers.facebook.com/apps)\n* Log in with your Facebook credentials\n\n#### 2. Create a New App\n\n* Click the blue **Create App** button\n* Choose **Other** as the app type\n* On the next screen, select **Business**\n* Enter an app name and contact email, then click **Create App**\n\n#### 3. Open the App Dashboard\n\n* After creation, you’ll be redirected to the app’s dashboard\n* This is where you’ll manage products, permissions, and tokens\n\n#### 4. Add Products\n\n* In the left sidebar, scroll down to **Add Product**\n* Click **Set Up** on both:\n\n  * **Instagram Graph API**\n  * **Facebook Graph API** (If missing it is automatically setup when you create the app) \n\n>  If you do not see the \"Add Product\" section, your app may already be locked to a specific template or be in Live mode. You can still continue to the Graph API Explorer.\n\n#### 5. Go to the Graph API Explorer\n\n* Visit: [https://developers.facebook.com/tools/explorer/](https://developers.facebook.com/tools/explorer/)\n* In the top-right dropdown, select your app\n* Under \"User or Page\", keep **User Token** selected\n\n#### 6. Generate a User Access Token\n\n* Click **Get Token** > **Get User Access Token**\n* A permissions dialog will appear\n\n#### 7. Select the Required Permissions (Scopes)\n\nCheck the following boxes:\n\n* `pages_show_list`\n* `pages_read_engagement`\n* `pages_manage_posts`\n* `instagram_basic`\n* `instagram_content_publish`\n\n> These allow you to post to both Facebook Pages and Instagram accounts. Some may require approval for production use.\n\n#### 8. Authenticate and Authorize\n\n* A pop-up will prompt you to log into Facebook and approve the app\n* Be sure to authorize access to your Facebook Page and linked Instagram account\n\n#### 9. Copy the Short-Lived Token\n\n* After successful login, the Graph API Explorer will refresh\n* Your new **short-lived token** will appear in the top bar\n* **Copy it immediately** — this token is valid for 1–2 hours\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fe0a05a4-5e13-4109-86c1-1da8fc5e7a9a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -300
      ],
      "parameters": {
        "width": 1460,
        "height": 540,
        "content": "Facebook will only give you a \"Long Live Token\" if you are verified. If you are testing or not verified you can use the below method.\nThe initial token will only last a few hours, you can use the below to get the one that last for 2 months. Once you have the 2 month token you can put it in here and set the schedule to run every 30-60 days which will refresh and be saved in the static data.\n\n\n##Please note static Data does not run on a test, you can use a form submitted node to activate the flow.\n##Please note this is just a work around for testing and not practical for permanent use. "
      },
      "typeVersion": 1
    },
    {
      "id": "cce6d146-599e-439a-bff6-fc0870a8df02",
      "name": "토큰 갱신",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -300,
        -120
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/oauth/access_token",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "grant_type",
              "value": "fb_exchange_token"
            },
            {
              "name": "client_id",
              "value": "<Your Client ID>"
            },
            {
              "name": "client_secret",
              "value": "<Your Secret Here>"
            },
            {
              "name": "fb_exchange_token",
              "value": "<your short token>"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "szDaIQHhZqLlJHII",
          "name": "Facebook Graph account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e93d120b-ef7b-491c-bfcf-3d6a1ec62786",
      "name": "일정 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -680,
        -120
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "daysInterval": 30,
              "triggerAtHour": 1
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "097bde34-8787-4e0d-9dec-90f2de9c0aa1",
      "name": "현재 토큰 가져오기",
      "type": "n8n-nodes-base.code",
      "position": [
        -500,
        -120
      ],
      "parameters": {
        "jsCode": "const staticData = $getWorkflowStaticData('global');\nreturn [{\n  json: {\n    token: staticData.fb_token\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "75f115f5-eee8-4e85-bd35-8c70ac4c13c5",
      "name": "정적 데이터로 푸시",
      "type": "n8n-nodes-base.code",
      "position": [
        -80,
        -120
      ],
      "parameters": {
        "jsCode": "const staticData = $getWorkflowStaticData('global');\nstaticData.fb_token = $json.access_token;\n\nreturn [{\n  json: {\n    status: 'Token saved to static data',\n    token: staticData.fb_token\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "95439d8f-c568-497a-901f-69b2cfd7172f",
      "name": "정적 데이터에서 토큰 가져오기",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        60
      ],
      "parameters": {
        "jsCode": "const staticData = $getWorkflowStaticData('global');\nreturn [{\n  json: {\n    token: staticData.fb_token\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "b13db71d-0620-46d4-a9f9-17b693930af4",
      "name": "Instagram에 게시1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -420,
        60
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/<Instagram Page ID>/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image_url",
              "value": "<Your Image Url>"
            },
            {
              "name": "caption",
              "value": "<Your Caption>"
            },
            {
              "name": "access_token",
              "value": "={{ $json.token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "72bb812b-7ccf-4703-8d6d-35feb3576792",
      "name": "Instagram 게시물 발행1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -60,
        60
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/<your instagram page id>/media_publish",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "creation_id",
              "value": "={{ $json.id }}"
            },
            {
              "name": "access_token",
              "value": "={{ $('Get Token from static Data').item.json.token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5a279b05-d40f-47b6-a7f1-56daa21ff773",
      "name": "Facebook에 게시",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        780,
        480
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/266271423823110/photos",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://images.pexels.com/photos/5475816/pexels-photo-5475816.jpeg?auto=compress&cs=tinysrgb&fit=crop&h=627&w=1200"
            },
            {
              "name": "caption",
              "value": "This is the caption for the post"
            },
            {
              "name": "access_token",
              "value": "={{ $json.data[0].access_token }}"
            }
          ]
        },
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "szDaIQHhZqLlJHII",
          "name": "Facebook Graph account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "395e1149-cb03-45f3-97b1-1a5fe8e4ac06",
      "name": "시스템 토큰을 사용하여 페이지 토큰 가져오기",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        480
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/me/accounts",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "szDaIQHhZqLlJHII",
          "name": "Facebook Graph account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "926c9774-6e9b-427f-8916-3ccf4ce30012",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        340
      ],
      "parameters": {
        "color": 5,
        "width": 1760,
        "height": 360,
        "content": "Using the permanant never expire token"
      },
      "typeVersion": 1
    },
    {
      "id": "1ef57c3d-fc04-4107-82e3-3faf0dcfe2ce",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -80
      ],
      "parameters": {
        "width": 680,
        "height": 1220,
        "content": " How to Create a Permanent System User Token (Recommended)\n\nThis token doesn’t expire and is best for automation use cases\n\n1. Verify Your Business\n\nGo to https://business.facebook.com/settings/info\n\nComplete business verification under Business Info tab\n\nSubmit your business documents and wait for approval (Sometimes you just have to submit an EIN/Tax-ID.\n\nApproval can take 1-5 Business days\n\nOnce Approved do the following.\n\n2. Create a System User\n\nIn Business Settings\n\nGo to System Users > Click Add\n\nAssign a name (e.g. n8n-bot) and select Admin access\n\n3. Assign Assets to System User\n\nIn the same System User view, assign:\n\nYour Facebook Page (with Full Control)\n\nYour Instagram Account (linked via Page)\n\nYour App\n\n4. Generate a Token\n\nClick Generate Token\n\nSelect your App\n\nSet expiration to Never\n\nGrant these permissions:\n\npages_show_list\n\npages_read_engagement\n\npages_manage_posts\n\ninstagram_basic\n\ninstagram_content_publish\n\n-If instagram_content_publish is not visible, you may need to request it via App Review under the App dashboard.\n\n5. Use This Token\n\nStore it in the Facebook Graph API\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4eaa4823-7601-49d1-9cec-da232ac7ee62",
      "name": "올바른 페이지 토큰 가져오기",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        480
      ],
      "parameters": {
        "jsCode": "const page = $json.data.find(p => p.id === '266271423823110');\nreturn [{ json: { access_token: page.access_token } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "abb870c7-9241-4503-9fb1-348dcbf29dad",
      "name": "2초 대기",
      "type": "n8n-nodes-base.wait",
      "position": [
        -120,
        480
      ],
      "webhookId": "c40b180e-016c-4648-898a-5942b8a9b00d",
      "parameters": {
        "amount": 2
      },
      "typeVersion": 1.1
    },
    {
      "id": "70120c0d-d21a-4fa2-b8d5-81931c198c65",
      "name": "2초 대기1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -240,
        60
      ],
      "webhookId": "c40b180e-016c-4648-898a-5942b8a9b00d",
      "parameters": {
        "amount": 2
      },
      "typeVersion": 1.1
    },
    {
      "id": "4cde11f4-c12f-4827-94ce-9ee9d11d821d",
      "name": "시스템 토큰을 사용하여 페이지 토큰 가져오기1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        60
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/me/accounts",
        "options": {},
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "access_token",
              "value": "={{ $('Get Token from static Data').item.json.token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f7581a1c-d095-4fe9-951c-cc6b6108156a",
      "name": "올바른 페이지 토큰 가져오기1",
      "type": "n8n-nodes-base.code",
      "position": [
        380,
        60
      ],
      "parameters": {
        "jsCode": "const page = $json.data.find(p => p.id === '<YOUR PAGE ID HERE>');\nreturn [{ json: { access_token: page.access_token } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "306bb9bb-5ba0-4ecd-96a8-33e3ec292526",
      "name": "Facebook에 게시1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        60
      ],
      "parameters": {
        "url": "https://graph.facebook.com/v19.0/<YOUR PAGE ID HERE>/photos",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "form-urlencoded",
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "<YOUR IMAGE URL HERE>"
            },
            {
              "name": "caption",
              "value": "<YOUR CAPTION  HERE>"
            },
            {
              "name": "access_token",
              "value": "={{ $json.data[0].access_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    }
  ],
  "pinData": {},
  "connections": {
    "cce6d146-599e-439a-bff6-fc0870a8df02": {
      "main": [
        [
          {
            "node": "75f115f5-eee8-4e85-bd35-8c70ac4c13c5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "abb870c7-9241-4503-9fb1-348dcbf29dad": {
      "main": [
        [
          {
            "node": "da899479-cfaa-4771-bc31-bdb0d4e4a3b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "70120c0d-d21a-4fa2-b8d5-81931c198c65": {
      "main": [
        [
          {
            "node": "72bb812b-7ccf-4703-8d6d-35feb3576792",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e93d120b-ef7b-491c-bfcf-3d6a1ec62786": {
      "main": [
        [
          {
            "node": "097bde34-8787-4e0d-9dec-90f2de9c0aa1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "097bde34-8787-4e0d-9dec-90f2de9c0aa1": {
      "main": [
        [
          {
            "node": "cce6d146-599e-439a-bff6-fc0870a8df02",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "738fabc1-5282-442b-a275-a3943bff890e": {
      "main": [
        [
          {
            "node": "abb870c7-9241-4503-9fb1-348dcbf29dad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b13db71d-0620-46d4-a9f9-17b693930af4": {
      "main": [
        [
          {
            "node": "70120c0d-d21a-4fa2-b8d5-81931c198c65",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4eaa4823-7601-49d1-9cec-da232ac7ee62": {
      "main": [
        [
          {
            "node": "5a279b05-d40f-47b6-a7f1-56daa21ff773",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "da899479-cfaa-4771-bc31-bdb0d4e4a3b7": {
      "main": [
        [
          {
            "node": "395e1149-cb03-45f3-97b1-1a5fe8e4ac06",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f7581a1c-d095-4fe9-951c-cc6b6108156a": {
      "main": [
        [
          {
            "node": "306bb9bb-5ba0-4ecd-96a8-33e3ec292526",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "72bb812b-7ccf-4703-8d6d-35feb3576792": {
      "main": [
        [
          {
            "node": "4cde11f4-c12f-4827-94ce-9ee9d11d821d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "95439d8f-c568-497a-901f-69b2cfd7172f": {
      "main": [
        [
          {
            "node": "b13db71d-0620-46d4-a9f9-17b693930af4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "395e1149-cb03-45f3-97b1-1a5fe8e4ac06": {
      "main": [
        [
          {
            "node": "4eaa4823-7601-49d1-9cec-da232ac7ee62",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4cde11f4-c12f-4827-94ce-9ee9d11d821d": {
      "main": [
        [
          {
            "node": "f7581a1c-d095-4fe9-951c-cc6b6108156a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4fccdc64-1eb2-43a6-82c5-5ebcea2b801b": {
      "main": [
        [
          {
            "node": "738fabc1-5282-442b-a275-a3943bff890e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 소셜 미디어

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수22
카테고리1
노드 유형6
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자

specializing in automation, AI integrations, and workflow optimization. I build high-impact n8n workflows that connect Salesforce, Outlook, RingCentral, and more. Reach out if you need help making your systems talk to each other.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34