Braze Messaging

Sends messages, campaigns, and Canvases through the Braze API.

Configuration

- braze_messaging:
    name: notify_customer
    operation: trigger_campaign
    credentials_path: /etc/braze/credentials.json
    base_url: "{{env.BRAZE_REST_ENDPOINT}}"
    payload:
      campaign_id: "{{env.BRAZE_CAMPAIGN_ID}}"
      recipients:
        - external_user_id: "{{event.data.user_id}}"
          trigger_properties:
            order_id: "{{event.data.order_id}}"

Fields

FieldTypeDefaultDescription
namestringrequiredTask name.
operationstringrequiredSee the table below.
credentials_pathstringrequiredPath to the credentials file.
base_urlstringrequiredREST endpoint of the Braze instance, e.g. https://rest.iad-01.braze.com.
campaign_idstringTransactional email campaign ID for send_transactional.
payloadobjectrequiredThe request body, or from_event: true. See Payload.
depends_onlistUpstream task names.
retryobjectRetry configuration.

Operations

OperationEndpointPayload
send_messagesPOST /messages/sendmessages per channel, and who to send to: external_user_ids, user_aliases, segment_id, audience, or broadcast.
trigger_campaignPOST /campaigns/trigger/sendcampaign_id, and recipients with optional trigger_properties, or audience or broadcast.
trigger_canvasPOST /canvas/trigger/sendcanvas_id, and recipients with optional context, or audience or broadcast.
create_send_idsPOST /sends/id/createcampaign_id, and optionally the send_id to create.
send_transactionalPOST /transactional/v1/campaigns/{campaign_id}/sendrecipient, and optionally trigger_properties and external_send_id.

Every operation except create_send_ids delivers real messages and is never retried.

Output

The Braze response as JSON, such as the dispatch_id of a send. Sends and triggers list problems that didn’t stop the send in errors.