Skip to main content

Pipedream

Pipedream builds workflows from a trigger — an HTTP webhook, an app, a schedule — and steps after it, including steps of code. A short Node.js step makes the workflow a bridge to flows: whatever starts it sends an event to the Flows address, and the customer gets the right message in Viber or SMS.

Pipedream is a tool for developers: the step is code. If nobody on your team writes code, use Make or Zapier instead. If your system can send webhooks by itself, connect it directly — see Connecting systems.

Written from Pipedream documentation

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

What you need​

  • A paid plan of Pipedream to run the workflow for real. On Free the usage is for development only, and the production environment is not included. Startup costs from $99 a month billed yearly, $150 billed monthly.
  • The pricing page speaks mostly of Pipedream Connect; whether the same limit applies to ordinary workflows is not confirmed by the documentation.
  • One address for all workflows: the event is named in the body of each request.

Step 1. Create a connection​

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

Step 2. Add a code step in Pipedream​

  1. Open the workflow. After the trigger press + and add a Node.js code step.
  2. Paste the code below. In url replace PASTE_THE_ADDRESS_HERE with the address from the cabinet, keeping the quotes.
  3. Press Test, then Deploy.
import { axios } from "@pipedream/platform"
export default defineComponent({
async run({ steps, $ }) {
const o = steps.trigger.event.body
return await axios($, {
method: "POST",
url: "PASTE_THE_ADDRESS_HERE",
data: {
event: "order_paid",
message_id: `pd:order_paid:${o.order_id}`,
contact: { phone: o.phone, email: o.email, external_id: o.customer_id },
traits: { first_name: o.first_name },
properties: { order_id: o.order_id, total: o.total },
context: { source: "pipedream" }
}
})
}
})
  • steps.trigger.event.body is the body of the request that started the workflow. o.order_id, o.phone, o.email, o.customer_id, o.first_name, o.total are its fields: replace them with the paths of your trigger.
  • event — fixed text, the name of the AlphaFlow event for this workflow (see Events).
  • message_id makes the event unique: a request with an id AlphaFlow already has is not recorded twice. For a workflow that runs on every status change, add the status to it.
  • contact needs at least one of the phone, the email or the customer id. context.source stays as it is: by it the connection shows Recognised: Pipedream.
  • The helper axios from @pipedream/platform and the path steps.trigger.event follow the documentation of Pipedream but are not confirmed for this page.

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​

Press Test on the step. The event appears in Flows → Connections → Event journal within seconds. The connection shows Recognised: Pipedream.

Events​

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

What starts the workflowAlphaFlow 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 workflow whose trigger means exactly that, or check the status in the code before the request and send only that status, for example "Paid". A workflow 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​

  • Whether Pipedream repeats a failed request has not been checked.
  • 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 workflow keeps running.

Pipedream documentation​