Bitly
Create and manage shortened links with Bitly.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("bitly", action, input) resolves with the provider's answer and rejects when Bitly isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "bitly"} says whether yours can call it.
// workflows/notify.ts: call Bitly when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellBitly = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Bitly isn't connected.
const output = await step.run("Bitly", () =>
step.ctx.integrations.invoke("bitly", "archive_bitlink", {
"group_guid": "<group_guid>",
"bitlink": "<bitlink>"
}),
);
step.ctx.log("Bitly answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "bitly",
"piece_action": "archive_bitlink",
"input": {
"group_guid": "<group_guid>",
"bitlink": "<bitlink>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/bitly/archive_bitlink" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"group_guid":"<group_guid>","bitlink":"<bitlink>"}}'Actions
archive_bitlink
Archive Bitlink. Archive a Bitlink to stop redirects.
| Input | Type | Description |
|---|---|---|
group_guidrequired | id (picked from your account) | The group where the item will be managed. |
bitlinkrequired | id (picked from your account) | Select the Bitlink to modify. |
create_bitlink
Create Bitlink. Shorten a long URL with optional customization.
| Input | Type | Description |
|---|---|---|
long_urlrequired | text | The URL to shorten (must include http:// or https://). |
group_guidrequired | id (picked from your account) | The group where the item will be managed. |
domainoptional | id (picked from your account) | Domain to use for the Bitlink. |
titleoptional | text | Custom title for the Bitlink. |
tagsoptional | array | Tags to apply to the Bitlink. |
force_new_linkoptional | boolean | Create new link even if one exists for this URL. |
app_idoptional | text | Mobile app identifier (e.g., com.yourapp.name). |
app_uri_pathoptional | text | Path within the mobile app (e.g., /product/123). |
install_urloptional | long text | URL where users can install the mobile app. |
install_typeoptional | one of "no_install" | "auto_install" | "promote_install" | How to handle app installation. |
create_qr_code
Create QR Code. Generate a customized QR code for a Bitlink.
| Input | Type | Description |
|---|---|---|
group_guidrequired | id (picked from your account) | The group where the item will be managed. |
destination_typerequired | one of "long_url" | "bitlink_id" | Destination Type |
destinationrequired | object (depends on other props) | Destination |
titleoptional | text | Internal title for the QR Code. |
archivedoptional | boolean | Archive the QR code upon creation. |
background_coloroptional | text | Hex code (e.g., #FFFFFF) |
dot_pattern_coloroptional | text | Hex code (e.g., #000000) |
dot_pattern_typeoptional | one of "standard" | "circle" | "block" | "blob" | "rounded" | "vertical" | "horizontal" | "triangle" | "heart" | "star" | "diamond" | Style: Dot Pattern Type |
corner_1_shapeoptional | one of "standard" | "slightly_round" | "rounded" | "extra_round" | "leaf" | "leaf_inner" | "leaf_outer" | "target" | "concave" | Corner 1 (Top-Left): Shape |
corner_1_inner_coloroptional | text | Corner 1 (Top-Left): Inner Color |
corner_1_outer_coloroptional | text | Corner 1 (Top-Left): Outer Color |
corner_2_shapeoptional | one of "standard" | "slightly_round" | "rounded" | "extra_round" | "leaf" | "leaf_inner" | "leaf_outer" | "target" | "concave" | Corner 2 (Top-Right): Shape |
corner_2_inner_coloroptional | text | Corner 2 (Top-Right): Inner Color |
corner_2_outer_coloroptional | text | Corner 2 (Top-Right): Outer Color |
corner_3_shapeoptional | one of "standard" | "slightly_round" | "rounded" | "extra_round" | "leaf" | "leaf_inner" | "leaf_outer" | "target" | "concave" | Corner 3 (Bottom-Right): Shape |
corner_3_inner_coloroptional | text | Corner 3 (Bottom-Right): Inner Color |
corner_3_outer_coloroptional | text | Corner 3 (Bottom-Right): Outer Color |
gradient_styleoptional | one of "no_gradient" | "linear" | "radial" | Gradient: Style |
gradient_color_1optional | text | First gradient color (hex code) |
gradient_color_2optional | text | Second gradient color (hex code) |
get_bitlink_details
Get Bitlink Details. Retrieve metadata for a Bitlink.
| Input | Type | Description |
|---|---|---|
group_guidrequired | id (picked from your account) | The group where the item will be managed. |
bitlinkrequired | id (picked from your account) | Select the Bitlink to modify. |
update_bitlink
Update Bitlink. Modify properties of an existing Bitlink.
| Input | Type | Description |
|---|---|---|
group_guidrequired | id (picked from your account) | The group where the item will be managed. |
bitlinkrequired | id (picked from your account) | Select the Bitlink to modify. |
titleoptional | text | New title for the Bitlink. |
archivedoptional | boolean | Archive or unarchive the Bitlink. |
tagsoptional | array | Tags to apply (overwrites existing tags). |
app_uri_pathoptional | text | Path within the mobile app (e.g., /product/123). |
install_urloptional | long text | URL where users can install the mobile app. |
osoptional | one of "ios" | "android" | Target mobile operating system. |
install_typeoptional | one of "no_install" | "auto_install" | "promote_install" | How to handle app installation. |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
Details
- Id
bitly- Category
- Developer tools
- Tags
- links, url-shortener, analytics
- Package
@activepieces/piece-bitly@0.1.4- Runs
- Through the integration runner