{
  "name": "Fetch Threads analytics for your latest posts and email an HTML report",
  "nodes": [
    {
      "id": "5a30db15-c360-4034-a14b-81e384388abb",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        4768,
        1760
      ]
    },
    {
      "id": "85c6ba79-41ef-4b4c-b7d8-7e5694c09abd",
      "name": "Fetch Threads Posts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4544,
        1760
      ]
    },
    {
      "id": "d48cd4f8-319c-4796-9ce5-0549bc41ceae",
      "name": "Fetch Post Insights",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4992,
        1760
      ]
    },
    {
      "id": "2f3e2e37-ef99-417f-9624-28a28202d9d1",
      "name": "Email Analytics Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        5664,
        1760
      ]
    },
    {
      "id": "8ae6c331-71a1-49d3-899f-e4bf19bc4338",
      "name": "Build HTML Report",
      "type": "n8n-nodes-base.code",
      "position": [
        5440,
        1760
      ]
    },
    {
      "id": "440e1a86-b7e6-4494-a6c1-b904def2f0e8",
      "name": "Merge Posts and Insights",
      "type": "n8n-nodes-base.code",
      "position": [
        5216,
        1760
      ]
    },
    {
      "id": "d2ef1dab-12ba-4143-9ad0-589579586c8f",
      "name": "Get Threads Token",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        4096,
        1760
      ]
    },
    {
      "id": "910115ef-8311-40ae-a7cc-96e8f36805bd",
      "name": "Set Token",
      "type": "n8n-nodes-base.set",
      "position": [
        4320,
        1760
      ]
    },
    {
      "id": "7435fc9d-0816-404c-87c2-43fca1141cc9",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        3872,
        1664
      ]
    },
    {
      "id": "15a85b84-fb71-43fa-82c7-447c4417ea81",
      "name": "Schedule Trigger (Every 2 Days)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        3872,
        1856
      ]
    },
    {
      "id": "8cc6eee6-b33f-4662-a17d-5ab44f2ba2de",
      "name": "Sticky Note - Main",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3600,
        1184
      ],
      "parameters": {
        "width": 680,
        "height": 512,
        "content": "## How it works\n\nThis workflow pulls up to 100 of your latest Threads posts along with their engagement metrics — views, likes, replies, reposts and quotes — directly from the Threads Graph API.\n\nFor "
      }
    },
    {
      "id": "6037d286-0bed-4636-ab2a-a01963c12d21",
      "name": "Sticky Note - Triggers",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3680,
        2016
      ],
      "parameters": {
        "width": 356,
        "height": 136,
        "content": "## Triggers\n\nRun manually on demand or on a schedule. Default: every 2 days at 11 pm. Adjust the interval in the Schedule Trigger node."
      }
    },
    {
      "id": "5b3e71b3-fdac-407e-8c04-64867971de35",
      "name": "Sticky Note - Token setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4064,
        1904
      ],
      "parameters": {
        "width": 188,
        "height": 264,
        "content": "## Token setup\n\nReads the Threads long-lived access token from an n8n Data Table and passes it to the downstream fetch nodes."
      }
    },
    {
      "id": "713c0945-958b-4f11-9b7b-96093fb2f70a",
      "name": "Sticky Note - Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4480,
        1920
      ],
      "parameters": {
        "width": 636,
        "height": 136,
        "content": "## Fetch posts & insights\n\nCalls the Threads API to retrieve up to 100 posts (id, text, timestamp, permalink), splits them into individual items, then fetches engagement metrics for each post."
      }
    },
    {
      "id": "386a6cb7-046f-4c72-9cec-00b2933918ff",
      "name": "Sticky Note - Build and send",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5200,
        1920
      ],
      "parameters": {
        "width": 622,
        "height": 168,
        "content": "## Build & send report\n\nMerges post data with insights, builds a styled HTML table, and sends it as an inline email to the address configured in the Email Analytics Report node."
      }
    },
    {
      "id": "c02321e2-cddb-4aeb-8e55-837b45126f7e",
      "name": "Sticky Note - More Templates",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5824,
        1440
      ],
      "parameters": {
        "width": 412,
        "height": 262,
        "content": "## More Threads automation\n\nWant to auto-publish Threads posts from a Notion CMS on a schedule?\n\nCheck out the **Content Automation Bundle** — includes Threads Publisher, LinkedIn Publisher, Facebook "
      }
    }
  ],
  "connections": {
    "Set Token": {
      "main": [
        [
          {
            "node": "Fetch Threads Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Fetch Post Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Threads Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build HTML Report": {
      "main": [
        [
          {
            "node": "Email Analytics Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Threads Token": {
      "main": [
        [
          {
            "node": "Set Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Post Insights": {
      "main": [
        [
          {
            "node": "Merge Posts and Insights",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Threads Posts": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Posts and Insights": {
      "main": [
        [
          {
            "node": "Build HTML Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger (Every 2 Days)": {
      "main": [
        [
          {
            "node": "Get Threads Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}