BlueSky - Send a welcome message to new followers

I’ve created a new workflow to automate something that is nearly impossible on other social networks due API limitation or paid plans requirements.

Send a welcome message to new followers

  1. You need to create a BlueSky app password with private messages access.
  2. Fill the credentials and the message on the corresponding nodes (see sticky notes).
  3. Manually run once the “Save followers to file” node to generate your initial followers list.
  4. Enable the workflow

(Use with caution, test it first)

It will check for new followers every 60 minutes (to avoid hitting the 100 createSession rate limit per day) and send a private message to the new ones.

It took me a while to figure out the PM API because you need:

  • To use a special PDS URL from your create session response as the GET/POST URL
  • To define a header defining the chat proxy
  • And also request a conversation ID for each given user “did”.

(You can check the “Get conversation ID” and “Send message” nodes for more details)

I no longer can edit the first post, but I made some improvements to disable pagination on the “List followers” HTTPS request, you only really need the last 100 to check if there are new ones (unless you get more than 100 new followers in one hour)

Thanks for posting this; it worked perfect!

1 Like

@nukeador Awesome!

Some feedback:

  1. I was thinking this is the perfect use case for the new and improved “remove duplicates” node which can now identify dupes across executions. Checkout Max’s video on it here - https://www.youtube.com/watch?v=zXhuQj_YJ5I. It would allow n8n cloud users to use your template as well!
  2. The loop node is not required if you use:
  • {{ $("Create Session").first().json.didDoc.service[0].serviceEndpoint }}
  • {{ $("Create Session").first().json.accessJwt }}

Also definitely recommend joining the creators hub and adding to the template gallery - we need more bluesky templates and this one is :fire:!