This documentation offers a step-by-step guide to integrating your BlueSky account with Pabbly Connect. By following these instructions, you can effortlessly establish a seamless connection between the two platforms.
ACTIONS:
BlueSky: Creating a Post with Image (Action Event)
Please follow the steps below to create a post with an image for the above-mentioned action event:
In the action step, select "Code(Pabbly)" as an action application and select "Run JavaScript" as an action event. This code will return the links inside the text, and it will also return the start and end index of the links present in the text.
Then use the below code to get the "Facet values" in the response.
Code:
// Input text
const text = "Enter your text here";
// Initialize result object
let result = {
"text": text,
"features_types": "",
"features_types_key": "",
"byte_start": "",
"byte_end": "",
"urls": ""
};
// Regex pattern for URLs
let urlPattern = /https?:\/\/[^\s]+/g;
let match;
let featureTypes = [];
let featureKeys = [];
let byteStarts = [];
let byteEnds = [];
let urlList = [];
// Match all links
while ((match = urlPattern.exec(text)) !== null) {
let link = match[0];
// Correct UTF-8 byte position calculation
let start = Buffer.from(text.slice(0, match.index)).length;
let end = start + Buffer.from(link).length;
featureTypes.push("app.bsky.richtext.facet#link");
featureKeys.push("uri");
byteStarts.push(start.toString());
byteEnds.push(end.toString());
urlList.push(link);
}
// Assign values in comma-separated format
result.features_types = featureTypes.join(",");
result.features_types_key = featureKeys.join(",");
result.byte_start = byteStarts.join(",");
result.byte_end = byteEnds.join(",");
result.urls = urlList.join(",");
// Print formatted JSON output
return result;
Follow the below steps:
In the action step, select "BlueSky" as an action application and select "Upload a Media" as an action event. Then use the below code to get the Upload Image values in the response.
To post an image with the text and links inside the text- for that follow the steps of Use Case-1 and Use Case-2 simultaneously and you will the response of the "Facets Values" and "Upload Images Values".
Successful Integration:
Upon completing the above steps, your BlueSky account will now be successfully integrated with Pabbly Connect. You can utilize different actions and triggers according to your purpose. With this integration, you can automate processes through Pabbly Connect, improving your workflow and productivity.
If you encounter any issues or require further assistance, feel free to contact our support team for help. ([email protected])
Happy integrating!
How to authorize BlueSky in Pabbly Connect?
- Within Pabbly Connect, navigate to the action step and choose "BlueSky" as the action you wish to perform. Select an action event, such as "Creating a Post with Image".
- To establish a connection, select "Add New Connection" and if you already have an existing connection, you can opt for "Select Existing Connection" instead.
- To establish a new connection, select the "Add New Connection" radio button, and enter the "Identifier" and "Password".
ACTIONS:
BlueSky: Creating a Post with Image (Action Event)
Please follow the steps below to create a post with an image for the above-mentioned action event:
- Use Case: To create a post with an image.
- Select "Creating a Post with Image" as an action event, connect your BlueSky account, choose the connection type (either new connection or existing connection), and click the "Save" button (For help with authorization, check out the "How to authorize BlueSky in Pabbly Connect?" section.)
- Use Case -1: If you want to post text with some links in it.
In the action step, select "Code(Pabbly)" as an action application and select "Run JavaScript" as an action event. This code will return the links inside the text, and it will also return the start and end index of the links present in the text.
Then use the below code to get the "Facet values" in the response.
Code:
// Input text
const text = "Enter your text here";
// Initialize result object
let result = {
"text": text,
"features_types": "",
"features_types_key": "",
"byte_start": "",
"byte_end": "",
"urls": ""
};
// Regex pattern for URLs
let urlPattern = /https?:\/\/[^\s]+/g;
let match;
let featureTypes = [];
let featureKeys = [];
let byteStarts = [];
let byteEnds = [];
let urlList = [];
// Match all links
while ((match = urlPattern.exec(text)) !== null) {
let link = match[0];
// Correct UTF-8 byte position calculation
let start = Buffer.from(text.slice(0, match.index)).length;
let end = start + Buffer.from(link).length;
featureTypes.push("app.bsky.richtext.facet#link");
featureKeys.push("uri");
byteStarts.push(start.toString());
byteEnds.push(end.toString());
urlList.push(link);
}
// Assign values in comma-separated format
result.features_types = featureTypes.join(",");
result.features_types_key = featureKeys.join(",");
result.byte_start = byteStarts.join(",");
result.byte_end = byteEnds.join(",");
result.urls = urlList.join(",");
// Print formatted JSON output
return result;
- Enter the text that you want to send here.
- Enter the text, choose "Facets Link" in the "Facets features Type" field, and enter the value of the "start" and "End" index.
- Click on the "Save & Send Request" button.
- Use Case -2: If you want to post an image.
Follow the below steps:
In the action step, select "BlueSky" as an action application and select "Upload a Media" as an action event. Then use the below code to get the Upload Image values in the response.
- In the "Creating a Post with Image" action event of the BlueSky application, enter the "Text", in the "Upload Embed Type" field select "Image", and "Upload Images Type" field select the "Blob" option.
- Map the response values of the "Upload a Media" action event to the "Line Item - Blob Ref Link", "Line Item - Blob Mime Type", and "Line Item - Blob Size" fields to the "Creating a Post With Image" action event.
- Click on the "Save & Send Request" button.
- Use Case -3: If you want to post an image with the text and links inside the text.
To post an image with the text and links inside the text- for that follow the steps of Use Case-1 and Use Case-2 simultaneously and you will the response of the "Facets Values" and "Upload Images Values".
Successful Integration:
Upon completing the above steps, your BlueSky account will now be successfully integrated with Pabbly Connect. You can utilize different actions and triggers according to your purpose. With this integration, you can automate processes through Pabbly Connect, improving your workflow and productivity.
If you encounter any issues or require further assistance, feel free to contact our support team for help. ([email protected])
Happy integrating!
Last edited: