Bitly

Create and manage shortened links with Bitly.

Developer toolsAPI key6 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (6)
  4. archive_bitlink
  5. create_bitlink
  6. create_qr_code
  7. get_bitlink_details
  8. update_bitlink
  9. custom_api_call
  10. Details

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.

Workflow
// 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);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "bitly",
    "piece_action": "archive_bitlink",
    "input": {
      "group_guid": "<group_guid>",
      "bitlink": "<bitlink>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
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 a Bitlink to stop redirects.

InputTypeDescription
group_guidrequiredid (picked from your account)The group where the item will be managed.
bitlinkrequiredid (picked from your account)Select the Bitlink to modify.

Create Bitlink. Shorten a long URL with optional customization.

InputTypeDescription
long_urlrequiredtextThe URL to shorten (must include http:// or https://).
group_guidrequiredid (picked from your account)The group where the item will be managed.
domainoptionalid (picked from your account)Domain to use for the Bitlink.
titleoptionaltextCustom title for the Bitlink.
tagsoptionalarrayTags to apply to the Bitlink.
force_new_linkoptionalbooleanCreate new link even if one exists for this URL.
app_idoptionaltextMobile app identifier (e.g., com.yourapp.name).
app_uri_pathoptionaltextPath within the mobile app (e.g., /product/123).
install_urloptionallong textURL where users can install the mobile app.
install_typeoptionalone 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.

InputTypeDescription
group_guidrequiredid (picked from your account)The group where the item will be managed.
destination_typerequiredone of "long_url" | "bitlink_id"Destination Type
destinationrequiredobject (depends on other props)Destination
titleoptionaltextInternal title for the QR Code.
archivedoptionalbooleanArchive the QR code upon creation.
background_coloroptionaltextHex code (e.g., #FFFFFF)
dot_pattern_coloroptionaltextHex code (e.g., #000000)
dot_pattern_typeoptionalone of "standard" | "circle" | "block" | "blob" | "rounded" | "vertical" | "horizontal" | "triangle" | "heart" | "star" | "diamond"Style: Dot Pattern Type
corner_1_shapeoptionalone of "standard" | "slightly_round" | "rounded" | "extra_round" | "leaf" | "leaf_inner" | "leaf_outer" | "target" | "concave"Corner 1 (Top-Left): Shape
corner_1_inner_coloroptionaltextCorner 1 (Top-Left): Inner Color
corner_1_outer_coloroptionaltextCorner 1 (Top-Left): Outer Color
corner_2_shapeoptionalone of "standard" | "slightly_round" | "rounded" | "extra_round" | "leaf" | "leaf_inner" | "leaf_outer" | "target" | "concave"Corner 2 (Top-Right): Shape
corner_2_inner_coloroptionaltextCorner 2 (Top-Right): Inner Color
corner_2_outer_coloroptionaltextCorner 2 (Top-Right): Outer Color
corner_3_shapeoptionalone of "standard" | "slightly_round" | "rounded" | "extra_round" | "leaf" | "leaf_inner" | "leaf_outer" | "target" | "concave"Corner 3 (Bottom-Right): Shape
corner_3_inner_coloroptionaltextCorner 3 (Bottom-Right): Inner Color
corner_3_outer_coloroptionaltextCorner 3 (Bottom-Right): Outer Color
gradient_styleoptionalone of "no_gradient" | "linear" | "radial"Gradient: Style
gradient_color_1optionaltextFirst gradient color (hex code)
gradient_color_2optionaltextSecond gradient color (hex code)

Get Bitlink Details. Retrieve metadata for a Bitlink.

InputTypeDescription
group_guidrequiredid (picked from your account)The group where the item will be managed.
bitlinkrequiredid (picked from your account)Select the Bitlink to modify.

Update Bitlink. Modify properties of an existing Bitlink.

InputTypeDescription
group_guidrequiredid (picked from your account)The group where the item will be managed.
bitlinkrequiredid (picked from your account)Select the Bitlink to modify.
titleoptionaltextNew title for the Bitlink.
archivedoptionalbooleanArchive or unarchive the Bitlink.
tagsoptionalarrayTags to apply (overwrites existing tags).
app_uri_pathoptionaltextPath within the mobile app (e.g., /product/123).
install_urloptionallong textURL where users can install the mobile app.
osoptionalone of "ios" | "android"Target mobile operating system.
install_typeoptionalone 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

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

Details

Id
bitly
Category
Developer tools
Tags
links, url-shortener, analytics
Package
@activepieces/piece-bitly@0.1.4
Runs
Through the integration runner