Zapier: Sending Coffee To Advocates via CoffeeSender

In this article, we will create an "integration" with AdvocateHub and  CoffeeSenderThe Goal? When an advocate completes a challenge, she will be sent an email containing a $5 coffee card.

Prerequisites

Part I: Creating the challenge 

In this section, we will create a generic challenge. You can configure it however you want. The only requirement is that the advocate must complete a stage of the challenge to receive the coffee. In this example, we'll use the Advocate Workflow stage to trigger the coffee card email. If you use a different stage, your webhook configuration will have to indicate the type of stage used in place of Advocate Workflow.

1. Go to the Challenges page and click  Add a Challenge.

2. Click on the  Blank Challenge button 

3. Click on  + Add Stage and add an "Advocate Workflow" stage

4. Configure your stage and the rest of your challenge, then save and publish. 

Suggestions:

- If you want to indicate to the advocate which email the coffee will be sent to, use the merge field  {{contact.email}}.

- For testing, target the challenge to a single test advocate. 

Part II: Configuring the webhook and creating the Zap

1.  Start a new Zap in Zapier.

2. For the  Trigger, choose "Webhooks by Zapier > Catch Hook"

3. In the next step you will receive a URL. Copy this URL and open your AdvocateHub in a new tab.

4. Go to  Settings > System > Webhooks and click Add a Webhook

5. Configure your Webhook:

  • Webhook Name: Choose a memorable name, such as "CoffeeSender integration"
  • Webhook Provider URLUse the URL you copied from Zapier
  • Format: Form Post
  • Run webhook on these events: Advocate Workflow
6. Save your webhook and return to your Zapier tab
7. Continue to the testing step (ignoring the "Pick off a Child Key" option
8. Click on "Okay I did this" button and you will be presented with this view:

At this point, return to your Hub and switch to  Advocate View, then complete the Advocate Workflow stage once. Return to your Zapier tab and you should see that the test was successful after about 30 seconds.

9. Click on the  + icon and add a Filter. Configure it like so:

Challenge[name] | (Text) Exactly matches | your challenge's headline

e.g.

10. For your Action step, choose  Webhooks by Zapier and choose Custom Request. Configure as below:

Method: POST

URL: https://coffeesender.com/api/v2/coffees/send
Data Pass-Through?blank
Data:  Insert the following code and customize the template_id to be  your CoffeeSender template ID and enter a customer message in custom_message:
{ "channel": "AdvocateHub", "template_id": ###, "custom_message": "Enter your custom message for the advocate", "save_as_default": true} 
Unflatten: yes
Basic Authblank
Headers: You will need the following headers. Click  + to add more.
  • user_key: your user key
  • Content-Type: application/json
  • Lead_Email: Click on the field selection icon (pictured below) and choose Contact[Email]
  • partner_key: your partner key
Here's what it will look like:

11. Click the  Continue button to test your Zap and then save and turn it on it if all is well.

Testing

To test this integration, go to Advocate View in your Hub and complete the challenge one more time. You should receive an email from CoffeeSender within a minute or two.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us