Hello everyone,
First off, thank you so much for taking the time to look at this. I’m hoping to get some help with a Bluesky API integration issue I’ve been struggling with.
I’ve been trying to automate posts to Bluesky from YouTube using their API, but I’ve run into several issues, especially with links not being embedded when posted through the API. The same links work perfectly when posted manually to Bluesky, so I’m wondering if anyone here has figured out a way to make URLs show up as embedded content when posting through the API?
In addition, I’ve been trying to include the video title, description, and thumbnail in the post. Initially, I attempted to concatenate the title and description into the text
field, but I kept running into syntax and JSON errors. I wasn’t able to resolve these errors, so I decided to remove the concatenation approach and simply include the title and thumbnail instead. Unfortunately, now I can’t get the thumbnail to display properly, even though I’m passing the correct URL.
My Workflow:
- Setup: Docker-based local install with n8n for automation.
- YouTube Data: Using the YouTube API to fetch video details, including title, description, and thumbnail.
- Bluesky Post JSON:
{
"collection": "app.bsky.feed.post",
"repo": "tfraley.me",
"record": {
"text": "{{ $node['Switch'].json['latest_video_title'] }}",
"thumbnail": "{{ JSON.parse($node['Switch'].json['latest_video_thumbnail']).url }}",
"createdAt": "{{ new Date().toISOString() }}"
}
}
I’ve been able to get the title and URL working, but the thumbnail isn’t showing up in Bluesky. Here’s the format I’m getting for the thumbnail data:
{
"url": "https://i4.ytimg.com/vi/oNA3EBcjT4s/hqdefault.jpg",
"width": "480",
"height": "360"
}
Despite having this, the thumbnail doesn’t appear when posting via the API.
Would love any insight into:
- Getting the link to display as an embed when posted via the API.
- Correctly posting the title and thumbnail without issues.
- Resolving the concatenation errors when adding title and description together in the
text
field.
Thanks again for any help you can provide!