Skip to main content

Zapier

Zapier links apps into Zaps: a trigger in one app and actions after it. Add a Webhooks by Zapier action, and the Zap becomes a bridge to flows: whatever starts it — a new order in a shop, a lead in a CRM, a form entry, a new table row — sends an event to the Flows address, and the customer gets the right message in Viber or SMS.

The platform's own app in Zapier sends an SMS directly and sends no AlphaFlow events — for flows, use Webhooks by Zapier. If your system can send webhooks by itself, connect it directly, without Zapier — see Connecting systems.

Written from Zapier documentation

This page is written from the public documentation of Zapier and has not been checked on a live account yet.

What you need​

  • A Professional, Team or Enterprise plan of Zapier: Webhooks by Zapier is not available on Free.
  • One address for all Zaps: the event is named in the body of each request, so one connection takes them all.

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Zapier.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Add a webhook action in Zapier​

  1. Open the Zap and set up its trigger — the shop, CRM, form or table whose event should start a flow.
  2. Press +, choose Webhooks by Zapier and in Event choose POST.
  3. URL — the address from the cabinet.
  4. Payload Type — json.
  5. Data — the pairs below. Type the key on the left. On the right, type a fixed value, or insert a field of the trigger from the data list of the previous step. A double underscore makes a nested key: contact__phone is sent as "contact": { "phone": … }.
  6. Leave Headers and Basic Auth empty: the token is already in the address.
  7. Press Test step, then Publish.
KeyValue
eventorder_paid — fixed text, the name of the AlphaFlow event (see Events)
message_idzap:order_paid: followed by the order id from the trigger
contact__phonethe phone
contact__emailthe email
contact__external_idthe customer id
traits__first_namethe first name
properties__order_idthe order id
properties__totalthe total
context__sourcezapier — fixed text: by it the connection shows Recognised: Zapier

Fill Data in any case: with an empty Data Zapier sends all the fields of the previous step. In this mode Zapier builds the JSON itself and sends every value as text — "total": "1250.5".

Instead of POST you can choose Event: Custom Request — Method POST, and in Data the raw JSON with the fields of the trigger:

{
"event": "order_paid",
"message_id": "zap:order_paid:<order id>",
"contact": { "phone": "<phone>", "email": "<email>", "external_id": "<customer id>" },
"traits": { "first_name": "<first name>" },
"properties": { "order_id": "<order id>", "total": <total> },
"context": { "source": "zapier" }
}

Replace each value in angle brackets with a field of the trigger; <total> stays without quotes — it is a number. Here the values are inserted as they are, and a quote inside a name breaks the body. That is why POST is the main way.

  • message_id makes the event unique: a request with an id AlphaFlow already has is not recorded twice. For a Zap that fires on every status change, add the status to it: zap:order_status_changed:<order id>:<status>.
  • contact needs at least one of the phone, the email or the customer id. The phone may come in any notation.
  • The body is already in the AlphaFlow format, so nothing has to be mapped in the cabinet — see Event format.

Step 3. Send a test​

Test step in the Webhooks action sends a request with the data of the trigger's sample. The event appears in Flows → Connections → Event journal within seconds. The connection shows Recognised: Zapier.

Events​

One Zap sends one event. Put into event the name that matches the trigger:

What starts the ZapAlphaFlow eventProperties
A new orderorder_createdorder_id, total
An order is paidorder_paidorder_id, total
The status of an order changesorder_status_changedorder_id, status
A new form entryform_submittedform
A new leadlead_submitted—
An appointment is madeappointment_scheduledvisit_at

Put a name like order_paid or order_shipped only into a Zap whose trigger means exactly that, or add a Filter by Zapier step before the webhook that lets through only that status, for example "Paid". A Zap on any change of an order sends order_status_changed with the status property: otherwise a partly paid or returned order reaches the customer as "paid".

The contact is found by contact.phone, contact.email and contact.external_id; traits.first_name is the name the texts greet with. The names of the events are the ones the ready-made templates expect — see Recommended events.

Good to know​

  • Zapier's help does not say whether Webhooks by Zapier repeats a failed request.
  • A request with no phone, no email and no customer id cannot reach a person: the event is refused with no_contact, and the journal shows it.
  • The address always answers 200. Above the daily event limit the event is refused in AlphaFlow with quota_exceeded and shown in the journal; the Zap keeps running.

Zapier documentation​