{
  "name": "Automate Instagram & Facebook posting with Meta Graph API & System User Tokens",
  "nodes": [
    {
      "id": "4fccdc64-1eb2-43a6-82c5-5ebcea2b801b",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -560,
        480
      ]
    },
    {
      "id": "738fabc1-5282-442b-a275-a3943bff890e",
      "name": "Post to Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -300,
        480
      ]
    },
    {
      "id": "da899479-cfaa-4771-bc31-bdb0d4e4a3b7",
      "name": "Publish instagram post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        100,
        480
      ]
    },
    {
      "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 Busines"
      }
    },
    {
      "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 belo"
      }
    },
    {
      "id": "cce6d146-599e-439a-bff6-fc0870a8df02",
      "name": "Refresh token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -300,
        -120
      ]
    },
    {
      "id": "e93d120b-ef7b-491c-bfcf-3d6a1ec62786",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -680,
        -120
      ]
    },
    {
      "id": "097bde34-8787-4e0d-9dec-90f2de9c0aa1",
      "name": "Get Current Token",
      "type": "n8n-nodes-base.code",
      "position": [
        -500,
        -120
      ]
    },
    {
      "id": "75f115f5-eee8-4e85-bd35-8c70ac4c13c5",
      "name": "Push to Static Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -80,
        -120
      ]
    },
    {
      "id": "95439d8f-c568-497a-901f-69b2cfd7172f",
      "name": "Get Token from static Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        60
      ]
    },
    {
      "id": "b13db71d-0620-46d4-a9f9-17b693930af4",
      "name": "Post to Instagram1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -420,
        60
      ]
    },
    {
      "id": "72bb812b-7ccf-4703-8d6d-35feb3576792",
      "name": "Publish instagram post1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -60,
        60
      ]
    },
    {
      "id": "5a279b05-d40f-47b6-a7f1-56daa21ff773",
      "name": "Post to Facebook",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        780,
        480
      ]
    },
    {
      "id": "395e1149-cb03-45f3-97b1-1a5fe8e4ac06",
      "name": "Use System token to get page token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        480
      ]
    },
    {
      "id": "926c9774-6e9b-427f-8916-3ccf4ce30012",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        340
      ],
      "parameters": {
        "width": 1760,
        "height": 360,
        "content": "Using the permanant never expire token"
      }
    },
    {
      "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\n"
      }
    },
    {
      "id": "4eaa4823-7601-49d1-9cec-da232ac7ee62",
      "name": "Get Correct Page Token",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        480
      ]
    },
    {
      "id": "abb870c7-9241-4503-9fb1-348dcbf29dad",
      "name": "Wait 2 Second",
      "type": "n8n-nodes-base.wait",
      "position": [
        -120,
        480
      ]
    },
    {
      "id": "70120c0d-d21a-4fa2-b8d5-81931c198c65",
      "name": "Wait 2 Second1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -240,
        60
      ]
    },
    {
      "id": "4cde11f4-c12f-4827-94ce-9ee9d11d821d",
      "name": "Use System token to get page token1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        60
      ]
    },
    {
      "id": "f7581a1c-d095-4fe9-951c-cc6b6108156a",
      "name": "Get Correct Page Token1",
      "type": "n8n-nodes-base.code",
      "position": [
        380,
        60
      ]
    },
    {
      "id": "306bb9bb-5ba0-4ecd-96a8-33e3ec292526",
      "name": "Post to Facebook1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        60
      ]
    }
  ],
  "connections": {
    "Refresh token": {
      "main": [
        [
          {
            "node": "Push to Static Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2 Second": {
      "main": [
        [
          {
            "node": "Publish instagram post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2 Second1": {
      "main": [
        [
          {
            "node": "Publish instagram post1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Current Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Current Token": {
      "main": [
        [
          {
            "node": "Refresh token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Instagram": {
      "main": [
        [
          {
            "node": "Wait 2 Second",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Instagram1": {
      "main": [
        [
          {
            "node": "Wait 2 Second1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Correct Page Token": {
      "main": [
        [
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish instagram post": {
      "main": [
        [
          {
            "node": "Use System token to get page token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Correct Page Token1": {
      "main": [
        [
          {
            "node": "Post to Facebook1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish instagram post1": {
      "main": [
        [
          {
            "node": "Use System token to get page token1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Token from static Data": {
      "main": [
        [
          {
            "node": "Post to Instagram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Use System token to get page token": {
      "main": [
        [
          {
            "node": "Get Correct Page Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Use System token to get page token1": {
      "main": [
        [
          {
            "node": "Get Correct Page Token1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Post to Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}