{
  "name": "Create threads on Bluesky",
  "nodes": [
    {
      "id": "5fea442d-80e7-4e9c-9214-12fa8bc98a71",
      "name": "Create Bluesky Session",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2160,
        540
      ]
    },
    {
      "id": "8339e67d-87f8-48a5-a9c9-48d90d9baf49",
      "name": "Create Reply",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1200,
        540
      ]
    },
    {
      "id": "16fa4a6c-ab93-4ea1-9a9b-2f9e9804e25a",
      "name": "Run Daily at 9 AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2640,
        540
      ]
    },
    {
      "id": "7c06e67d-a524-457b-a6ce-955aab353352",
      "name": "Set Bluesky Credentials",
      "type": "n8n-nodes-base.set",
      "position": [
        -2380,
        540
      ]
    },
    {
      "id": "156da8f4-5cc7-4a58-9a6c-75b1bd6df4cd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2440,
        340
      ],
      "parameters": {
        "width": 440,
        "height": 360,
        "content": "## Bluesky Authentication\nSet your Bluesky social link and also your App Password."
      }
    },
    {
      "id": "2bd742a8-3955-4452-95c8-9c9a7b8071e2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1960,
        340
      ],
      "parameters": {
        "width": 440,
        "height": 360,
        "content": "## Initial Post [A]\nWhen the first post is created two identifiers are returned:\n- URI (an at:// link to the post)\n- CID (a content-hash of the post)"
      }
    },
    {
      "id": "e6e258e8-e4a7-4e33-bd7c-40dd4eb8842f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1480,
        340
      ],
      "parameters": {
        "width": 460,
        "height": 360,
        "content": "## First Reply Post [B]\nHere we set the 'ROOT' and the 'PARENT' values.\n\nWe use both URI and CID as ROOT and PARENT, as this is the first child of the root post (Initial Post [A]).\n\nWe receive a new U"
      }
    },
    {
      "id": "8e3808d3-ec7d-4f46-89b7-9b27350801de",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2440,
        740
      ],
      "parameters": {
        "width": 440,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Sibling Post [C]\nSet 'ROOT' using URI/CID from the root post (Initial Post [A]).\n\nFor the PARENT, we use the URI and CID returned by the preceeding post (First Reply Post [B])."
      }
    },
    {
      "id": "0b9d8329-2dde-4b3b-bd9e-42d5aa367225",
      "name": "Create Reply Text",
      "type": "n8n-nodes-base.code",
      "position": [
        -1420,
        540
      ]
    },
    {
      "id": "abfbef84-1b94-4ec4-ae96-345d0ea888ce",
      "name": "Create Sibling Text",
      "type": "n8n-nodes-base.code",
      "position": [
        -2380,
        780
      ]
    },
    {
      "id": "f554f5bc-bd81-4b09-887b-6c4167e8f5f1",
      "name": "Create Sibling",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2160,
        780
      ]
    },
    {
      "id": "7a7025fe-4b35-44db-8974-2bc81c59eead",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2700,
        340
      ],
      "parameters": {
        "width": 220,
        "height": 360,
        "content": "## Trigger"
      }
    },
    {
      "id": "097767bc-fbb2-4e71-af68-b87d354b796e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1960,
        740
      ],
      "parameters": {
        "width": 940,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Sibling Posts using Loop node [D]\nHere we set the 'ROOT' using both URI and CID from the root post (Initial Post [A]), and for all future siblings.\n\nFor the PARENT, we use the URI"
      }
    },
    {
      "id": "5f8e88ef-0f56-4d81-921f-17dbfea41eec",
      "name": "Loop Posts",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1720,
        780
      ]
    },
    {
      "id": "449a0269-61cb-477c-b315-943daada65ba",
      "name": "Create Initial Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1680,
        540
      ]
    },
    {
      "id": "e29aa109-2b11-44c7-9a85-b5199ef4923c",
      "name": "Create Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1360,
        780
      ]
    },
    {
      "id": "51c05a08-797b-448b-b291-753be14d7c78",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1200,
        780
      ]
    },
    {
      "id": "b9f1bd23-e8f2-472b-ab61-05e85ffece12",
      "name": "Create Post Text",
      "type": "n8n-nodes-base.code",
      "position": [
        -1900,
        540
      ]
    },
    {
      "id": "6c1e26df-564e-4b49-8aff-bc6e5bedcbb8",
      "name": "Create Sibling Array",
      "type": "n8n-nodes-base.code",
      "position": [
        -1900,
        780
      ]
    },
    {
      "id": "5a91aff4-1b9d-4c69-beed-fa906c2a133b",
      "name": "Create Sibling Text (Loop)",
      "type": "n8n-nodes-base.code",
      "position": [
        -1540,
        780
      ]
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Posts": {
      "main": [
        [],
        [
          {
            "node": "Create Sibling Text (Loop)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Post": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Reply": {
      "main": [
        [
          {
            "node": "Create Sibling Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Sibling": {
      "main": [
        [
          {
            "node": "Create Sibling Array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Post Text": {
      "main": [
        [
          {
            "node": "Create Initial Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Reply Text": {
      "main": [
        [
          {
            "node": "Create Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Daily at 9 AM": {
      "main": [
        [
          {
            "node": "Set Bluesky Credentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Initial Post": {
      "main": [
        [
          {
            "node": "Create Reply Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Sibling Text": {
      "main": [
        [
          {
            "node": "Create Sibling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Sibling Array": {
      "main": [
        [
          {
            "node": "Loop Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Bluesky Session": {
      "main": [
        [
          {
            "node": "Create Post Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Bluesky Credentials": {
      "main": [
        [
          {
            "node": "Create Bluesky Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Sibling Text (Loop)": {
      "main": [
        [
          {
            "node": "Create Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}