Buttondown

Create and list subscribers in your Buttondown newsletter.

MarketingAPI key4 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (4)
  4. createSubscriber
  5. listSubscribers
  6. custom_api_call
  7. sendEmail
  8. 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("buttondown", action, input) resolves with the provider's answer and rejects when Buttondown 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: "buttondown"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Buttondown when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellButtondown = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Buttondown isn't connected.
  const output = await step.run("Buttondown", () =>
    step.ctx.integrations.invoke("buttondown", "createSubscriber", {
      "email": "<email address>"
    }),
  );
  step.ctx.log("Buttondown answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "buttondown",
    "piece_action": "createSubscriber",
    "input": {
      "email": "<email address>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/buttondown/createSubscriber" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"email":"<email address>"}}'

Actions

createSubscriber

Create Subscriber. Create a new subscriber in Buttondown.

Also accepted as create_subscriber.

InputTypeDescription
emailrequiredtextThe email address of the subscriber.
typeoptionalone of "regular" | "premium" | "unactivated" | "paused" | "trialed" | "upcoming" | "churning" | "churned" | "unsubscribed" | "undeliverable" | "blocked" | "complained"Set the subscriber status. Use "regular" to bypass double opt-in.
notesoptionallong textInternal Notes
tagsoptionalarrayAdd one or more tags to assign to the subscriber.
metadataoptionalJSONCustom metadata to store on the subscriber (JSON object).
referrerUrloptionaltextReferrer URL
utmSourceoptionaltextUTM Source
utmMediumoptionaltextUTM Medium
utmCampaignoptionaltextUTM Campaign
referringSubscriberIdoptionaltextID of the subscriber who referred this contact.
ipAddressoptionaltextThe original IP address of the subscriber. Helps Buttondown evaluate spam.
collisionBehavioroptionalone of "overwrite" | "add"Control how Buttondown handles duplicate email addresses. Leave empty to keep the existing subscriber.
bypassFirewalloptionalbooleanSet to true when the request originates from a trusted internal system without the subscriber's IP address.

listSubscribers

List Subscribers. Retrieve subscribers from Buttondown.

Also accepted as list_subscribers.

InputTypeDescription
limitoptionalnumberMaximum number of subscribers to return (1-1000).
cursoroptionaltextProvide the cursor value from a previous response to fetch the next page.
typeoptionalone of "regular" | "premium" | "unactivated" | "paused" | "trialed" | "upcoming" | "churning" | "churned" | "unsubscribed" | "undeliverable" | "blocked" | "complained"Subscriber Type
sourceoptionalone of "admin" | "api" | "carrd" | "comment" | "embedded_form" | "form" | "import" | "memberful" | "organic" | "patreon" | "stripe" | "user"Source
tagsoptionalarrayFilter by subscribers who have at least one of these tags.
emailAddressoptionaltextReturn subscribers whose email address contains this value.
referrerUrloptionaltextReferrer URL Contains
orderingoptionalone of "-creation_date" | "creation_date" | "email_address" | "-email_address" | "-last_open_date" | "last_open_date"Ordering

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

sendEmail

Send Email. Send an email to your Buttondown subscribers.

InputTypeDescription
subjectrequiredtextSubject
bodyrequiredlong textWrite your email content in Markdown or HTML. Buttondown will detect the format automatically.
statusoptionalone of "about_to_send" | "draft" | "scheduled"Choose how Buttondown should treat this email after creation.
publishDateoptionaldate-time (ISO)Required when scheduling an email. Use ISO 8601 format.
emailTypeoptionalone of "public" | "private" | "premium" | "free" | "churned" | "archival"Email Type
descriptionoptionallong textDescription
canonicalUrloptionaltextCanonical URL
imageoptionaltextPrimary Image URL
slugoptionaltextOverride the automatic slug used for the archive URL.
metadataoptionalJSONCustom metadata to attach to the email (JSON object).
attachmentsoptionalarrayIDs of attachments uploaded via the Buttondown API.
triggerBillingoptionalbooleanEnable when this email should count against pay-per-email billing for paid subscribers.

Details

Id
buttondown
Category
Marketing
Tags
email, newsletter, simple, indie
Package
@activepieces/piece-buttondown@0.0.2
Runs
Through the integration runner