I’m trying to set up a Scenario that will:
- Take a random image URL and caption from a Google Sheet.
- Add hashtags to the end of the caption.
- Calculate the location of the hashtags in the string.
- Obtain the image dimensions for the aspect ratio.
- Authenticate with Bluesky.
- Upload the image to Bluesky to obtain the blob data.
- Create JSON that includes the post text with hashtags, the image attachment including the aspect ratio, and the facets to properly render the hashtags.
- Post this to Bluesky.
I think I have all of the pieces working correctly… except that I get an error when I post:
BundleValidationError
Validation failed for 1 parameter(s).
Value can’t be casted as buffer for parameter ‘data’.
I have made sure that I am uploading the image to Bluesky and receiving a blob string, and then I am passing the blob data to the final HTTP/POST module.
However, I believe the error is because of a mismatch between the data and what the Bluesky API is expecting.
Here is my JSON, in case that is helpful:
[
{
"repo": "HANDLE.bsky.social",
"record": {
"text": "CAPTION #HASHTAG1 #HASHTAG2 #HASHTAG3",
"embed": {
"$type": "app.bsky.embed.images",
"images": [
{
"alt": "CAPTION",
"image": {
"ref": {
"$link": "bafkreiatthlgqr…ETC…"
},
"size": 122872,
"$type": "blob",
"mimeType": "image/png",
"aspectRatio": {
"width": 1920,
"height": 1079
}
}
}
]
},
"facets": [
{
"index": {
"byteEnd": XX,
"byteStart": XX
},
"features": [
{
"tag": "HASHTAG1",
"$type": "app.bsky.richtext.facet#tag"
}
]
},
{
"index": {
"byteEnd": XX,
"byteStart": XX
},
"features": [
{
"tag": "HASHTAG2",
"$type": "app.bsky.richtext.facet#tag"
}
]
},
{
"index": {
"byteEnd": XX,
"byteStart": XX
},
"features": [
{
"tag": "HASHTAG3",
"$type": "app.bsky.richtext.facet#tag"
}
]
}
],
"createdAt": "{{now}}"
},
"collection": "app.bsky.feed.post"
}
]
Can anybody help?