Skip to main content

Hi all,

Twitter is falling apart. So I’d like to send tweets to Bluesky (https://bsky.app). Does someone know how it works? I already saw some bots so I assume there must be a way to do it. Do they offer an API?

Thanks!

Hi @brkld 

Good question.

There is no Bluesky Zap app: https://zapier.com/apps

 


Hi @Troy Tessalone , 

I found this API: https://atproto.com/blog/create-post

I managed to get it done by adding two “Code By Zapier” steps:

First one: add javascript code:

const url = 'https://bsky.social/xrpc/com.atproto.server.createSession';

const data = {
identifier: inputDatan'username'], // Input from Zapier, assuming 'username' corresponds to 'BLUESKY_HANDLE'
password: inputDatan'password'] // Input from Zapier, corresponding to 'BLUESKY_APP_PASSWORD'
};


const response = await fetch(url, {
method: 'POST',
body: JSON.stringify(data), // Sending the data as a JSON string
headers: {
'Content-Type': 'application/json' // Use JSON content type
},
redirect: 'manual'
});

// Check if the response status is OK
if (!response.ok) {
console.error('Failed request', await response.text());
return null;
}

const responseBody = await response.json(); // Parse the JSON response

if (!responseBody.accessJwt) {
console.error('accessJwt not found in the response');
return null;
}

output = {
accessJwt: responseBody.accessJwt
};

needs username and password (app password bluesky > settings > app) as input!

Second one:

 

const secondUrl = 'https://bsky.social/xrpc/com.atproto.repo.createRecord';
const authToken = inputDatai'token'];

const tweetText = inputDatai'tweet_text'] + " " + inputDatai'tweet_url'];
const tweetURL = inputDatai'tweet_url'];

// Finding the start and end byte positions of the tweetURL within tweetText
const byteStart = Buffer.from(tweetText.slice(0, tweetText.indexOf(tweetURL))).length;
const byteEnd = byteStart + Buffer.from(tweetURL).length;

const recordData = {
"$type": "app.bsky.feed.post",
"text": tweetText,
"createdAt": new Date().toISOString(),
"facets": f
{
"index": {
"byteStart": byteStart,
"byteEnd": byteEnd
},
"features": a
{
"$type": "app.bsky.richtext.facet#link",
"uri": tweetURL
}
]
}
]
};

const postData = {
repo: inputDatai'username'],
collection: 'app.bsky.feed.post',
record: recordData
};

const postResponse = await fetch(secondUrl, {
method: 'POST',
body: JSON.stringify(postData),
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${authToken}`
}
});

if (!postResponse.ok) {
console.error('Failed request', await postResponse.text());
output = {
success: false,
message: "Failed to create record"
};
return;
}

const postResponseBody = await postResponse.json();
if (!postResponseBody.success) {
console.error('Failed to create record', postResponseBody.message);
output = {
success: false,
message: postResponseBody.message
};
return;
}

output = {
success: true
};

needs token, username, tweet_text, tweet_url as input.

tweet_text is your text and tweet_url is a link I want to include in my tweets to websites. it’s optional and can be removed.


Hello,

I’ve made this Zapier integration : 

https://www.bsky-bot.com/

 

It’s not on the store for the moment as it is under review, but when you’ve subscribed to bsky-bot you can try the integration with this link : 
https://zapier.com/developer/public-invite/194875/f59d7dccd0434bc87d91fbf205dd09b6/

 

 

Hoping on your feedback,

Thibault


Hello @brkld !


I’ve made this Zapier integration : 

https://unshape.app

 

It’s not on the store for the moment as it is under review, but when you’ve subscribed to Unshape you can try the integration with this link : 
https://zapier.com/developer/public-invite/194875/f59d7dccd0434bc87d91fbf205dd09b6/

 

 

Hoping on your feedback,

Thibault



I’ve made this Zapier integration : 

https://unshape.app

 

It’s not on the store for the moment as it is under review, but when you’ve subscribed to Unshape you can try the integration with this link : 
https://zapier.com/developer/public-invite/194875/f59d7dccd0434bc87d91fbf205dd09b6/

 

I’m trying, but am stuck early. I have Bluesky by Unshape BETA as the starting trigger, but I’m required to Choose an Event… and there are no events to choose from. from.

 



I’ve made this Zapier integration : 

https://unshape.app

 

It’s not on the store for the moment as it is under review, but when you’ve subscribed to Unshape you can try the integration with this link : 
https://zapier.com/developer/public-invite/194875/f59d7dccd0434bc87d91fbf205dd09b6/

 

I’m trying, but am stuck early. I have Bluesky by Unshape BETA as the starting trigger, but I’m required to Choose an Event… and there are no events to choose from. from.

 

Hello evoterra,

 

That’s a normal behavior as Bluesky by Unshape only allows creating posts for the moment. It doesn’t have any triggers. If you have ideas of triggers/actions/searches, you can write them here, or at support@unshape.app or as a feature request for Bluesky by Unshape on Zapier!

 

Waiting on your feedback,

Thibault - from Unshape



I’ve made this Zapier integration : 

https://unshape.app

 

It’s not on the store for the moment as it is under review, but when you’ve subscribed to Unshape you can try the integration with this link : 
https://zapier.com/developer/public-invite/194875/f59d7dccd0434bc87d91fbf205dd09b6/

 

I’m trying, but am stuck early. I have Bluesky by Unshape BETA as the starting trigger, but I’m required to Choose an Event… and there are no events to choose from. from.

 

Hello evoterra,

 

That’s a normal behavior as Bluesky by Unshape only allows creating posts for the moment. It doesn’t have any triggers. If you have ideas of triggers/actions/searches, you can write them here, or at support@unshape.app or as a feature request for Bluesky by Unshape on Zapier!

 

Waiting on your feedback,

Thibault - from Unshape

I’m clearly missing something, as surely I need to tell this integration about my Bluesky and Twitter credentials, and I don’t see how to do that in Zapier.

I’m no developer, so I may just be going too early and should wait until everything is baked.



I’ve made this Zapier integration : 

https://unshape.app

 

It’s not on the store for the moment as it is under review, but when you’ve subscribed to Unshape you can try the integration with this link : 
https://zapier.com/developer/public-invite/194875/f59d7dccd0434bc87d91fbf205dd09b6/

 

I’m trying, but am stuck early. I have Bluesky by Unshape BETA as the starting trigger, but I’m required to Choose an Event… and there are no events to choose from. from.

 

Hello evoterra,

 

That’s a normal behavior as Bluesky by Unshape only allows creating posts for the moment. It doesn’t have any triggers. If you have ideas of triggers/actions/searches, you can write them here, or at support@unshape.app or as a feature request for Bluesky by Unshape on Zapier!

 

Waiting on your feedback,

Thibault - from Unshape

I’m clearly missing something, as surely I need to tell this integration about my Bluesky and Twitter credentials, and I don’t see how to do that in Zapier.

I’m no developer, so I may just be going too early and should wait until everything is baked.



Everything is written on our website (https://www.unshape.app) :
1. Subscribe to Unshape using the same e-mail you used to create your Unshape account.
2. Head to Zapier - or Make - and choose your trigger. As Bluesky by Unshape does not provide any trigger for the moment, you must choose a trigger from another app.
3. Setup your Bluesky action. There’s only one available for the moment: Create Post. Once you’re here, you’ll have to enter your Bluesky credentials (an app password you generated in Bluesky settings, your username and user email). After that you can add the data you want to map to the different fields, and test your zap.

 

If you follow this instructions, you should be able to automate your Bluesky posts!