{
  "name": "Automatically import your Meta Threads posts into Notion",
  "nodes": [
    {
      "id": "200098a9-1a49-49c1-8703-eea0c496a020",
      "name": "Refresh Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1300,
        100
      ]
    },
    {
      "id": "58373d28-8f22-4224-8ef1-aca9c24d5777",
      "name": "Get Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -960,
        100
      ]
    },
    {
      "id": "7d9923b5-2fdc-46d4-8734-fe044a5a8951",
      "name": "Get Post ID",
      "type": "n8n-nodes-base.function",
      "position": [
        -640,
        100
      ]
    },
    {
      "id": "95ed0a59-7a6d-4358-aded-7ce49ef04916",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -300,
        100
      ]
    },
    {
      "id": "77720564-acf5-4a55-afa9-ae559965a5b9",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2820,
        200
      ]
    },
    {
      "id": "3b4e5eda-f354-4ef4-a260-378c06708cb5",
      "name": "Threads / Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        180
      ]
    },
    {
      "id": "6331c1f6-e1a4-4749-a17a-c129ab7ab0e0",
      "name": "Threads / Root",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "76c518b6-3c21-4879-8f0a-080fab60895a",
      "name": "Comment's Filter",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        180
      ]
    },
    {
      "id": "c0cae676-acff-493e-b957-26df0366cf98",
      "name": "Root's Filter",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        0
      ]
    },
    {
      "id": "367c2475-4dff-4858-9756-ad8f8383521c",
      "name": "Threads ID",
      "type": "n8n-nodes-base.notion",
      "position": [
        1060,
        100
      ]
    },
    {
      "id": "2aaa224f-598b-4f8a-a247-03a873ac19a3",
      "name": "Extract IDs",
      "type": "n8n-nodes-base.function",
      "position": [
        1260,
        100
      ]
    },
    {
      "id": "83fdaf18-47e7-4b1c-8f1b-523f87a439f3",
      "name": "Compare IDs",
      "type": "n8n-nodes-base.function",
      "position": [
        1500,
        100
      ]
    },
    {
      "id": "f1a831b1-fc5f-4569-9b9b-7de0bce9b9cd",
      "name": "Create Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        2080,
        20
      ]
    },
    {
      "id": "8a5e4752-a8fa-480f-8271-c15a66679e00",
      "name": "Upload Medias",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2560,
        20
      ]
    },
    {
      "id": "f3f3a8f7-1137-4013-83dd-b5efc18ab095",
      "name": "If Post Exist",
      "type": "n8n-nodes-base.switch",
      "position": [
        1740,
        100
      ]
    },
    {
      "id": "a378c107-d3f5-43cd-bc8c-ad9a39a9ec60",
      "name": "Threads Post",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        100
      ]
    },
    {
      "id": "d2e6c8dd-5751-48f9-a158-c3b39f279f60",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        540,
        100
      ]
    },
    {
      "id": "a79e46eb-bb45-4d80-9f99-adae1e51f94d",
      "name": "Run This First to Get Long Live Access Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -940,
        -340
      ]
    },
    {
      "id": "6b7a17d2-c58c-45f6-9ab1-1e39fbc7e18c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1260,
        -380
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "## Get Threads API Access Token\n\nGet Threads Access Token Tutorial and ID/教學 [Link](https://nijialin.com/2024/08/17/python-threads-sdk-introduction/)\n\nPlease get your access token and Threads ID first"
      }
    },
    {
      "id": "a8b5b6f0-b2ec-4aa3-bd9d-375acffd6655",
      "name": "Get Posts Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1660,
        100
      ]
    },
    {
      "id": "a86f7373-3a98-4ec2-bf66-88dd835ad17f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        260
      ],
      "parameters": {
        "width": null,
        "height": 180,
        "content": "## Refresh Token\n\nUpdate your long live token here / 在此放上剛剛拿到的長期 Token\n\n[Check Facebook Docs Refresh Token](https://developers.facebook.com/docs/threads/get-started/long-lived-tokens/)"
      }
    },
    {
      "id": "1b9b7fe0-78d3-4a70-8df7-a06b0c0f6fda",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        260
      ],
      "parameters": {
        "width": null,
        "height": 600,
        "content": "## Set your Theads ID & Post Time\n\nChage the your with your Threads ID to get your posts / 請先透過上方教學獲取 Threads ID\n\nSet the time of the Post you wanna get / 設置抓取的貼文時間\n\n[Check Facebook Docs Post API](htt"
      }
    },
    {
      "id": "eed94a4e-7fc4-4a23-8581-d5903e7a2ec4",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -60
      ],
      "parameters": {
        "width": null,
        "height": 140,
        "content": "## Set Notion Acc\n\nSet your notion account and database you wanna save the post"
      }
    },
    {
      "id": "51bada43-0a37-48fa-b5f6-18731f605afb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        -140
      ],
      "parameters": {
        "width": null,
        "height": 140,
        "content": "## Create Page\n\nBefore create page, please the properties of your post by your demands"
      }
    },
    {
      "id": "144b494d-515a-44e1-9720-35cc50d457da",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2500,
        -200
      ],
      "parameters": {
        "width": null,
        "height": 200,
        "content": "## Support Medias\n\nIt also can scrape the Threads Media like Images and Videos\n\nUpdate your Notion token here:\n\nbearer <your notion token>"
      }
    },
    {
      "id": "44657b1e-6537-4344-9f78-3e9ef440e27b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2360,
        80
      ],
      "parameters": {
        "width": 600,
        "height": 180,
        "content": "## Get your Threads Post automatically\n\nCreator: [Geekaz](https://www.threads.net/@geekaz?hl=zh-tw)\n\nIf your have any problems or question, please send message to my instagram!\n有任何問題都歡迎透過 Instagram 私訊"
      }
    },
    {
      "id": "6eeb4af1-7c4f-4f63-8386-384fd3549459",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        400
      ],
      "parameters": {
        "width": null,
        "height": 140,
        "content": "## Comment's Filter\n\nSet your Threads Username"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Threads Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Post": {
      "main": [
        [
          {
            "node": "Get Post ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads ID": {
      "main": [
        [
          {
            "node": "Extract IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare IDs": {
      "main": [
        [
          {
            "node": "If Post Exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Page": {
      "main": [
        [
          {
            "node": "Upload Medias",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract IDs": {
      "main": [
        [
          {
            "node": "Compare IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Post ID": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads Post": {
      "main": [
        [
          {
            "node": "Threads ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Post Exist": {
      "main": [
        [
          {
            "node": "Create Page",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Refresh Token": {
      "main": [
        [
          {
            "node": "Get Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Root's Filter": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Medias": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads / Root": {
      "main": [
        [
          {
            "node": "Root's Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Threads / Root",
            "type": "main",
            "index": 0
          },
          {
            "node": "Threads / Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Comment's Filter": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Posts Schedule": {
      "main": [
        [
          {
            "node": "Refresh Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Threads / Comments": {
      "main": [
        [
          {
            "node": "Comment's Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}