Automated Bluesky Thread Creation - n8n Workflow

Use this sophisticated n8n workflow template to automate the creation of multi-post, complex threads on Bluesky Social. This n8n workflow leverages custom code and HTTP requests for precise sequencing.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content creators and marketers managing presence on Bluesky.
Users needing reliable automated posting sequences.
Developers looking for advanced examples of using the n8n node for HTTP requests and custom logic in an n8n workflow.
Anyone interested in social media automation using n8n templates.

Overview

Creating long, connected threads on social platforms like Bluesky requires precise management of parent and root post identifiers (URIs and CIDs). If these IDs are incorrect, the posts won't appear as a coherent thread. This n8n workflow solves this complex sequencing challenge by leveraging the power of custom n8n node logic and HTTP requests.

This specific n8n workflow is scheduled to run daily, handling authentication and then sequentially posting an initial root post, followed by several replies linked correctly as a seamless thread. It’s an excellent example of utilizing n8n to manage API interactions that demand statefulness, providing robust social media automation capabilities. By using this n8n template, users can reliably queue up complex content without manual intervention. The custom logic ensures that every n8n node in the posting sequence correctly references its predecessor.

How it Works

The entire process is initiated by an n8n trigger, specifically a Schedule node set to run daily at 9 AM.


  1. Initiation and Setup: The n8n workflow starts with the Run Daily at 9 AM n8n trigger. It immediately sets the Bluesky credentials (handle and app password).

  2. Authentication: The Create Bluesky Session n8n node performs an HTTP POST request to authenticate, retrieving the necessary bearer token (accessJwt) required for all subsequent posting actions in the n8n workflow.

  3. Root Post Creation: A Code n8n node crafts the JSON payload for the main, initial post. The Create Initial Post HTTP n8n node submits this content. This n8n node returns the crucial root uri and cid.

  4. First Reply: The workflow immediately posts the first reply. The payload generation n8n node (Create Reply Text) is configured to set both the root and the parent identifiers using the IDs from the Create Initial Post, correctly starting the thread structure.

  5. Second Post (Manual Sibling): The next post (Create Sibling) is handled separately to set up the looping mechanism. It uses the Initial Post IDs as the root and the First Reply IDs as the parent.

  6. Dynamic Looping: To manage the creation of multiple subsequent sibling posts efficiently, the n8n workflow uses the Split In Batches n8n node. A Code n8n node (Create Sibling Array) generates the list of posts to be created.

  7. Dynamic Parent ID Update: Inside the loop, the Create Sibling Text (Loop) n8n node implements sophisticated custom logic. It checks if it is the first iteration ($runIndex === 0). If true, it uses the IDs from the preceding Create Sibling n8n node as the parent. If false, it uses the IDs returned by the Create Post n8n node from the previous loop iteration. This careful sequencing ensures the thread remains contiguous.

  8. Wait Period: A Wait n8n node enforces a 2-second pause after each post creation within the loop, which helps mitigate potential API rate limiting issues and ensures proper sequencing before the n8n workflow iterates to create the next thread item. This demonstrates how robust n8n templates manage API limitations.

Installation Guide


  1. Import: Copy the provided JSON data and navigate to your n8n instance. Go to Workflows and click the "New" button, then select "Import from JSON."

  2. Credentials Setup: Locate the Set Bluesky Credentials n8n node. Replace [enter your bluesky handle here] and [enter your app password here] with your actual Bluesky handle and the corresponding App Password generated within Bluesky settings.

  3. Content Modification: Edit the custom Code n8n node content (Create Post Text, Create Reply Text, etc.) to insert your desired thread content. Remember to adapt the sibling array in the Create Sibling Array n8n node if you want more or fewer posts.

  4. Activation: Ensure the n8n workflow is active and save your changes. The Run Daily at 9 AM n8n trigger will initiate the automated posting.

Node Details

Run Daily at 9 AM (Schedule Trigger): This n8n trigger initiates the entire posting sequence daily at 9 AM. It ensures the n8n workflow runs reliably on a set schedule.
Set Bluesky Credentials (Set n8n node): Stores user handle and app password as variables for use throughout the n8n workflow.
Create Bluesky Session (HTTP Request n8n node): Handles the critical authentication step by exchanging credentials for a temporary accessJwt token, necessary for all subsequent API calls. The parameters reference the variables set in the previous n8n node.
Create Post Text / Create Reply Text (Code n8n node): These custom JavaScript n8n nodes dynamically build the complex JSON payload required by the Bluesky API. They manage the reply.root and reply.parent object structures by using expressions that reference the outputs of preceding HTTP n8n nodes.
Create Initial Post / Create Reply / Create Sibling (HTTP Request n8n node): These n8n nodes communicate directly with the com.atproto.repo.createRecord endpoint. They handle the submission of content and, most importantly, capture the returned uri and cid identifiers used for threading.
Loop Posts (Split In Batches n8n node): Essential for scalable thread creation. This n8n node processes the array of remaining sibling posts, enabling iterative actions within the n8n workflow.
Create Sibling Text (Loop) (Code n8n node): Contains the core dynamic logic: it decides which previous post's ID (CID/URI) to use as the parent based on whether it's the first loop iteration or a subsequent one, ensuring the thread links correctly.
Wait (Wait n8n node): Implements a two-second delay between posts inside the loop, acting as a flow control mechanism in this n8n template to prevent sequencing errors.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

API/AI/Automation Coach with 30 years experience helping teams build sustainable, efficient processes and systems. Join my Automate 30 for 30 live cohort and course to reclaim your time.

Featured*