Triggering Webhooks in Zapier

Zapier is a web tool that allows you to connect apps you use every day to automate tasks and save time.

Zaps, the name Zapier gives for an automated workflow, are made using two main components, triggers and actions. A trigger is something that happens to start a Zap's workflow, the webhook information being received.

An action is something your Zap does after a trigger occurs, usually, this would be the writing of an email, message or entry to a spreadsheet. There can only be one trigger in a Zap but there can be more than one action.

Creating an Application in myTTNC

To create a webhook trigger in Zapier you'll first need to create an application in myTTNC (My Account > Applications).

  1. Click on the green 'Generate new VKey' button.
  2. Enter a VKey Description (this will only show when we associate the application with the TTNC number)
  3. Leave the Webhook URL blank for now (we will get this information from Zapier shortly)
  4. Enter an IP Address. This is used to verify access to the TTNC API. This will not be used for webhooks but is required to create an Application in myTTNC
  5. Click the 'Create VKey' button.

Open up a new browser tab and go to https://zapier.com/app/dashboard.

Creating a Zap in Zapier

Log into Zaiper (https://zapier.com/app/dashboard) or create an account.

Free accounts allow up to five Zaps to be turned on at the same time and can run one hundred tasks per month, paid plans allow more concurrent Zaps and more tasks per month. - Multi-step Zaps are only available in paid plans.

We will create a very simple Zap which sends an email when a call completes.
The first is sent when the call connects, the second email is sent when the call is completed.
The second step, to filter out the first email, can only be done on a paid plan as the Zap is a multi-step Zap.

Click on the 'Make a Zap!' button.

Creating the Trigger

  1. The first step is to create the Trigger. Choose 'Webhooks' from the Built-In Apps section.
  1. Select Catch Hook, press the 'Continue' button. Press the 'Continue' button again as we don't need to pick off the child key.
  1. Copy the webhook URL, this is a unique address which will catch the webhooks which are sent from your TTNC number. This will be pasted into the 'Application' in myTTNC

Updating myTTNC with Zapier Details

  1. Go back into myTTNC, leaving Zapier open as we will continue setting up the Zap shortly.
    4a. Paste the URL it into the Webhook URL field in the Application in myTTNC (My Account > Applications) and Press the 'Save Changes' button.

4b. Navigate to Phone Numbers and press the 'Edit' button for the number you wish to associate the Webhook with. Towards the bottom of the Bolt-On list click on the 'Webhooks' option.

4c. Select your Application from the drop-down menu of either 'Incoming Calls' or 'Incoming SMS Messages'. Press the 'Confirm' button.

Completing the Trigger in Zapier

  1. Place a test call or send a test SMS (depending on the type of Webhook you've created, press the 'Ok, I did this' button. The screen should refresh with 3 hooks showing from the test call (An SMS will only show a single Hook)
  1. Highlight the Hook that has the most relevant information and press the 'Continue' button.

Creating a Filter

This step requires a paid account as this will create a Multi-Step Zap

  1. To create a filter click on the + on the left-hand side below the Trigger element.

  2. Select Filter from the list and Save + Continue

  3. Set the filter to only continue if Event Type Exactly Matches 'cdr'

Creating the Action

  1. Now add a step from the left-hand side, and select the Action/Search option.

  2. Choose the app in which you want the action to occur, we'll choose the Zapier email. - this option will only allow 10 emails to be sent per hour. For more applications, such as Gmail, Slack and SMTP

  1. Select Send Outbound Email and press the 'Save + Continue' button.
  1. Add details of the email recipient and email content. In the body or subject section, the button on the left-hand side will allow you to include any of the fields from the webhook, in this example, the time and length of the call will show on the email. Once completed press the 'Continue' button.

  2. You can send a test email with the information from the test call/SMS.

  1. If the test is successful, press the 'Finish' button.

  2. Finally, turn your new Zap on.

Creating Actions for different apps

Once you have set up a Trigger, click on the + on the left-hand side below the Trigger element.

Then click 'Action/Search. You can add an Action App from a wide range of applications which Zapier allows. - A full list of Applications and how to set them up can be found here

Here are direct links to some of the more widely used apps.

Email clients:
Your action can send an email from a wide range of email applications, including
Googlemail - https://zapier.com/help/gmail/
Office 365 Email - https://zapier.com/help/office-365/
Mandrill - https://zapier.com/help/mandrill/

If you wish to send an email from a specific domain you can use the Built-In SMTP App to define the origin of the message. For help you can visit Zapier's SMTP help page https://zapier.com/help/smtp/

Internal Messaging Apps:
If you wish for any calls to be sent via an internal message, you can use apps such as these:
Slack - https://zapier.com/help/slack/IMG
Zoho Cliq - https://zapier.com/help/zoho-cliq/

To send the details via text message you can use the Built-In SMS app. For more help visit the Zapier SMS help page https://zapier.com/help/sms/

Instead of sending notifications your action could be to add the details to a spreadsheet. Using apps such as:

Excel - https://zapier.com/help/excel/
Google Sheets - https://zapier.com/help/google-sheets/

Triggering Webhooks in Zapier


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.