Post to Bluesky

I created a small action that allows you to post the content of the current draft to Bluesky.

It works for bsky.social server (also if you configured your own domain as username).
Please read through the documentation to create your app password that you need to authenticate :blush:

3 Likes

thank you for creating the action!

I use my own domain as bluesky username, I followed instruction to create app password and tried the action this morning, but failed to post.

Did you signup on bsky.social server and then change your user handle to your own domain name?

Had a conversation here and this worked out without any issues: @4nd3rs.dk on Bluesky

I think people might think they have to edit the script. You don’t need to touch the script.

  1. Install the action
  2. Run it
  3. Fill out the username (ex: username.bsky.social and the app password in the popup box
1 Like

Just updated the action to better handle posted URLs and hashtags. The api is a bit weird about that - have to explicitly tell bluesky the positions of links an hashtags in the post…

Works great, thanks for putting that together! I was playing around trying to figure out if I can get link previews to work. I know it’s possible, so when I have more time will see what happens!

1 Like

I didn’t look into it and thought the previews should load automatically if available :melting_face: let me know if you find something and I’ll be happy to include it

1 Like

Amy thoughts on being able to create a thread of posts? Can the API even do that?

I think that should be possible but I didn’t look too deep into it when I created that action. The API is not that easy to use compared to mastodon (personal opinion). You need to fetch the URI and CID of the previous post.

Personally I’d try an LLM to help me get to something that works and refine it from there

I’m going to poke around.

I added a check to your authenticateAndPost function that prevents empty Bluesky posts:

if (!content.trim()) {
        app.displayErrorMessage("Error: Cannot post empty content.");
        context.fail("Error: Cannot post empty content.");
        return false;
    }
1 Like