Home - usman-ahmad/test-zapiar GitHub Wiki

Donorbox - Zapier Integration

Donorbox - Zapier Integration involve three steps:

  • Creating API key on Donorbox (for Authentication of Zaps of Organizations)
  • Creating a Zapier App for Donorbox (This app will expose Donorbox API to zapier)
  • Creating a Zap (A Zap will utilize Donorbox Zapier app and do some action on an external application, like slack or gmail, etc.)

Create your API key on Donorbox

An API key will be used to authenticate an Organization’s Zap with Donorbox Zapier App. In order to generate an API key, click Account in main navigation, then click API Key in the left navigation and click Set new api key. Copy the generated API key to some place safe as this key will only be shown once for security reasons.

images/zapier/dbox_zap_01_api_key.png images/zapier/dbox_zap_02_api_key.png

Create a Zapier App for Donorbox

  1. Create new Zapier App

    1. Login / Sign Up for Zapier.
    2. Go to zapier.com/developer/builder/ and click Create a Web Builder App.

    images/zapier/dbox_zap_03_zapier_app.png

    1. Set Title and Description and click create. These Title and Description will appear when people will explore the app in Zapier platform.

    images/zapier/dbox_zap_04_zapier_app.png

  2. Setup Authentication for the Zapier App

    1. In Authentication section click Get Started. images/zapier/dbox_zap_05_zapier_auth.png
    2. Choose Basic Auth in Choose Authentication Scheme Step.
    3. In Create Auth Fields just click Next.
    4. In Map Fields to Request Parameters click Save to finish Authentication setup.
    5. Result will be as shown below images/zapier/dbox_zap_06_zapier_auth.png
  3. Add Ping Trigger (for Health Check)

    Ping is the trigger Zapier will use to verify the authentication credentials of Organization’s Zap when they first attempt to access the API through Zapier.

    1. In Triggers section click Add Your First Trigger.
    2. In Name and Description step, fill Name and Key with ping and make Important to be unchecked and Hide to be checked and click Next.

    images/zapier/dbox_zap_07_zapier_ping.png

    1. In Trigger Fields step just click Next.
    2. In Where Data Comes From step set Data Source as Polling and Polling: URL as HOSTNAME/api/v1/ping (e.g. https://stag1.dboxm.com/api/v1/ping) and click Save & Next.
    3. In Sample Result step just click Save and your Ping Trigger is set up.
  4. Setup Hooks Subscription in Trigger Settings

    1. In Triggers section click Manage Trigger Settings.

    images/zapier/dbox_zap_08_zapier_manage.png

    1. Set both REST Hook Subscribe URL and REST Hook Unsubscribe URL as HOSTNAME/api/v1/hooks (e.g. https://stag1.dboxm.com/api/v1/hooks) and Ping as the Test trigger and click Save.

    images/zapier/dbox_zap_09_zapier_manage.png

  5. Add Donations Trigger

    1. In Triggers section click Add New Trigger.
    2. In Name and Description step, fill Name with donations, Key with donation, fill description text and mark Important checkbox to be checked and Hide to be unchecked and click Next.

    images/zapier/dbox_zap_10_zapier_donation.png

    1. In Trigger Fields step just click Next.
    2. In Where Data Comes From step set Data Source as REST Hooks, Polling: URL as HOSTNAME/api/v1/donations (e.g. https://stag1.dboxm.com/api/v1/donations), Webhook: Event Name as donation and click Save & Next.

    images/zapier/dbox_zap_11_zapier_donation.png

    1. In Sample Result step just click Save and your Donations Trigger is set up.

Create a Donorbox to Slack Zap

A Zap consist of two parts, a Trigger App which will be our Zapier App (Donorbox app exposing triggers from Donorbox API) that we just created and an Action App (like Slack, Salesforce, Mailchimp, etc) which will perform some action on their platform while utilizing the data from the Trigger App. To create a Zap click Make a Zap on the top.

images/zapier/dbox_zap_12_zap_app.png

  1. Configure the Trigger App - Donorbox

    1. In Choose App step, search and select the app you just created, i.e. Donorbox.

    images/zapier/dbox_zap_13_zap_trigger.png

    1. In Choose Trigger step, select the Donations Trigger and click Save + Continue.
    2. In Choose Account step, click Connect an Account to open authentication popup asking, Allow Zapier to access your Donorbox Account?

    images/zapier/dbox_zap_14_zap_trigger.png

    1. In this Connect an Account popup, authenticate with Organization’s Login Email as Username and API Key as Password and click Yes, Continue.

    2. Once connected in Choose Account step, click Test to verify the connected account, select the Donations Trigger and when done click Save + Continue.

    3. In Test this Step step, click Fetch & Continue to fetch data from API.

    4. Click view your donation to view the data fetched from API.

    images/zapier/dbox_zap_15_zap_trigger.png

    1. Click Re-test Donorbox to get another donation to fetch another donation from API and when done click Continue to finish configuring the Trigger App.
  2. Configure the Action App - Slack

    1. In Choose App step, type and select Slack app.
    2. In Choose Action step, select an action from list of available actions, let say Send Channel Message and click Save + Continue.
    3. In Choose Account step, click Connect an Account to open authorization popup to authenticate and authorize your zap on Slack platform.
    4. Once connected in Choose Account step, click Test to verify the connected account, and when done click Save + Continue.
    5. In Edit Template step, click fill up the form to setup Slack Channel Message. In Message Text and in some other fields there is a Plus Icon to the Right of text field to add dynamic content with data fetched from the Trigger App connected to the Donorbox API. Once the form is filled click Continue.

    images/zapier/dbox_zap_16_zap_action.png

    1. In Test this Step step, preview the Test Channel Message click Send Test To Slack to send the test message.

    images/zapier/dbox_zap_17_zap_action.png

    1. Click Finish to to finish configuring the Action App.
  3. Name your Zap and Turn your Zap On to make it Live.

    Whenever the Zap is turned On there is a New RestHook created on the Donorbox platform and whenever the Zap is turned Off the coresponding RestHook’s in made inactive.

images/zapier/dbox_zap_18_zap_name_live.png

  1. Finally make a donation on Donorbox and verify the Zapier and Zap in Action, i.e. see its data being passed to the Action App(in this case slack).

images/zapier/dbox_zap_19_slack_message.png