Send Data to Zapier

Website: https://zapier.com/ API Docs: https://zapier.com/developer/documentation/v2/

Zapier connects all of the business apps you use together. Over 500 Apps can send or receive data from Zapier. In our example, we’re going to send everything we know about a specific user to Zapier.

Show me how!

The finished product:

Send data to Zapier

If you don’t have a Zapier account, start by creating one over at Zapier.com.

Zapier is one of the most flexible integrations we and you might want to use it to do things like:

  • Add data to a google sheet
  • Follow a person on twitter when they enter the segment “Has twitter name”
  • Add a ticket in Jira when a user does the event “bug_reported”
  • Send new paid accounts an invitation to review your service on Trustpilot
Get started: create your webhook in Zapier

In your Zapier account, create a new Zap. Choose the “Webhooks” Trigger App and then select “Catch Hook."

We don’t need to set any options, so click continue if you see that screen. Then copy and paste the Webhook URL.

Create your campaign in Customer.io

If you're starting a new campaign, you can create one now.

Inside your Customer.io account, create your campaign— it can be event triggered or segment triggered.

Add and name your webhook

In Customer.io, add a new webhook action in the campaign’s workflow and give it a name.

You then need to customize it. To do so, click Add Request to enter the composer.

Customize your webhook

Next to POST, add in the API endpoint we want to send our request to. Paste in the URL you copied from Zapier. It should look something like:

https://hooks.zapier.com/hooks/catch/xxxxx/xxxxx

If you’re doing a segment triggered campaign, the easiest way to send a webhook to zapier is to just send the entire Customer object:

{ "customer": {{ customer | replace: "=>", ":" }} }

With an event triggered campaign, you can send over both the event object and customer object:

{ "event": {{ event | replace: "=>", ":" }}, "customer": {{ customer | replace: "=>", ":" }} }
Send Request

When you’re ready to test, you can click Send Request. Customer.io will show you the response from the Zapier API.

If you’re successful, you’ll see a 200 OK. Then, in Zapier, you’ll also see a Test Successful response.

Then, create your action in Zapier!

Now that your data is flowing in to Zapier, you can complete the rest of their process and hook Customer.io data up to any one of their integrations.

We’re excited to hear how you end up using Zapier with Customer.io’s Webhook Action.