Any new guide on how to post to Bluesky?

I’ve been following the blog at Connect Bluesky and MAKE.com for new posts - Jans Weblog which is quite good, but I’m getting an error on the second HTTP post that seems authentication related (yet the first HTTP post request does go through and returns the DID data etc.

Only modification I made was to exclude the JSON parser between the two requests, as the first HTTP request can have its own in-built parser active, and I see that does in fact return the two required fields for the next step.

But despite requests by others from middle of last year, I still don’t see any Make integrations for Bluesky, and as I blog in my free time I can’t afford to pay over an above what I’m also paying monthly for Make.

Any news of a Make integration, or anyone got something right themselves with HTTP requests that they can share here as a guide?

Hello @Danie,

Based on the way Blue Sky’s API works, there doesn’t appear to be any way to pass credentials to Blue Sky securely, forcing you to put your handle and password in the request’s data.
I think that’s why this app was born:

With that said, it is still possible to post via Make.
Here’s what the scenario looks like:

You’re already creating your session so I’ll skip that part.
On that Create Session HTTP module, be sure Parse Response = Yes so your result looks like this:
image

Next, place a Create JSON module.
When you create the Data Structure, use the Generate option and place in this JSON:

{
	"repo": "BLUESKY_HANDLE",
	"record": {
		"text": "Just a test post via API",
		"createdAt": "2024-05-13T14:52:21.422Z"
	},
	"collection": "app.bsky.feed.post"
}

Your Create JSON module fields should now look like this:

You can pass in handle from your HTTP module,
Collection should probably be “app.bsky.feed.post” as shown here,
text is obviously the content of the post,
and createAt can be {{now}}.

Finally, the Create Post HTTP Module.

URL = https://bsky.social/xrpc/com.atproto.repo.createRecord
Method = POST
Headers as shown. There’s a space between “Bearer” and the “accessJwt” from Create Session module.
Body Type = Raw
Content Type = JSON (application/json)
Request Conent = output from Create JSON module

It’s easier to use Create JSON modules than it is to try and write all that JSON into the Request content field. JSON modules handle all the character escaping.

Good luck!

3 Likes

@Donald_Mitchell thanks so much. The issue was to do with that JSON creation. I still had odd issues with it reporting the access code as blank, but I re-edited, and also re-added the field again, and then suddenly it went through.

So my post is actually working now. Only thing that is a bit odd is I have no image or linked article (social card) showing for the link (as it does for LinkedIn, Twitter, etc) in the post. If I manually paste in my text with a link, then Bluesky is expanding the link to show the image of the link. I’m using the same code that I use to generate a Mastodon post which does show the link embed.

Any ideas maybe on this?

This is how it appears via Make now (post just below it is one done via Dlvr.it):

For links and mentions you need to use “facets”. This involves identifying the start and end position of the mention or link and suppling those locations in a “facets” array part of the payload. Just made it a little more complicated lol.

I think it would be easier to tackle this while creating the text of your post. Build it in bits, like a chunk of text followed by a link followed by another chunk of text. I don’t know, it’s starting to look a little tough.

2 Likes

OK thanks, yes I saw they mentioned something about that on the API page but it did seem pretty complicated - no idea why as the other social networks seem to handle it with the posting. But OK thanks again I at least have posting working so will chew over the next phase :wink:

3 Likes

Though I’m seeing it may not be as complicated as that if we want to embed a social card view of a link. Their API says for this:

A website card embed, often called a “social card,” is the rendered preview of a website link. A complete post record with an external embed, including image thumbnail blob, looks like:

# the required fields for every embed card

    card={
"uri": url,
"title": "",
"description": "",
}

And with Make we already have the title, URL, etc available as text fields so no parsing needed to extract that.