If you’ve been following the buzz in the social media world, you’ve probably heard about Bluesky.
Bluesky is the decentralized platform that looks and feels very much like Twitter (erm… I mean X). Posting on Bluesky is different though because you as a user have the ability to own your posts, and in this way Bluesky is the indie band of social media: cool, disruptive, and full of potential.
What if you could harness the power of Power Automate to interact with Bluesky? Imagine scheduling posts while sipping coffee and letting the magic of automation do the heavy lifting.
In this blog, we’ll dive into how you can integrate Power Automate with Bluesky’s API and build your very own social media automation powerhouse.
The Bluesky API
First things first, let’s delve a little further into how the Bluesky API works. Its AT Protocol (Authenticated Transfer Protocol) is decentralized by design, focusing on interoperability and user ownership. This means their API isn’t just a gateway to a single platform, it allows you to potentially port your content to another platform in the future.
The Bluesky API allows you to:
Create posts
Manage notifications
Fetch posts and user profiles
Today we’ll focus specifically on how to Create posts.
Power Automate is your secret weapon for building automation workflows and bots. Before we jump into specifics, here’s what you need:
A Bluesky identifier
Your password
A sprinkle of creativity. ✨
Step 1: Select Your Trigger and Add an HTTP Action
Pick your trigger of choice. Some of the accounts on Bluesky are bots. One particular bot post Beatles lyrics every hour on the hour. If you wanted to do something similar, you’d create a Scheduled flow with an hourly recurrence trigger.
Since Bluesky’s API is not natively integrated into Power Automate as a connector (yet), you’ll use the HTTP action. This lets you send HTTP requests to Bluesky’s API.
To post on Bluesky, you need an access token. A Bluesky token lasts for about a minute or so. The perfect solution is to request the token and use it to post within the same flow.
So go ahead and create that HTTP action. Set the method to Post.
Run the flow, which should conclude successfully. If it does and you get a response, congratulations—you’re officially connected to Bluesky! 🎉
From your successful flow run, copy the output from the HTTP connector because you’ll need it in the next step.
Step 2: Parse the Returned JSON to Extract the Token
Create a Parse JSON action and click ‘Generate from sample’ and paste in the output from the above HTTP action you’ve just copied.
When building flows containing JSON schemas, I recommend running them after you add each action, just to make sure everything runs as expected, so do that before continuing.
Step 3: Set Up the HTTP Connector for your Post
Now for the exciting bit. Create another HTTP action. Use the Post Method and the URI below:
Create the headers as I have, selecting the token from the Parse JSON action in the dynamic content in Power Automate. The token is called accessJwt.
Add the body below
{ "collection": "app.bsky.feed.post", "repo": "youridentifier.bsky.social", "record": { "$type": "app.bsky.feed.post", "text": "My first Power Automate post", "createdAt": "@{utcNow()}", } }
Run the flow and all being well you will now see your test post on Bluesky. Congratulations!
Connect to a Data Source
This is only the start. Hook up the flow to your preferred data source, SharePoint, Dataverse or whatever, and replace your hard-coded post content with a variable. Now you can create your own bot that automatically posts Oasis lyrics 24/7!
Just remember that Bluesky has a limit of 300 characters, so keep your post at or below this threshold. Maybe just post the Oasis first verse and chorus!
Here is the connected flow. Don’t forget you will need your preferred trigger.
The Bluesky’s the Limit
Bluesky’s decentralized design might feel like uncharted territory, but with Power Automate, you can chart your path through the cosmos of automation and see the output of your efforts on a cutting edge social media platform. The combination of Power Automate and Bluesky empowers you to amplify your impact without breaking a sweat.
Start your automation journey today and be a decentralized social media pioneer. 🚀
Got any questions or cool ideas for automating Bluesky? Drop them in the comments and let me know what you’re building!
I got a couple of plan of my own. More on that in the near future 🙂