Notify your team over email when someone needs urgent help

Manish Manohar Updated by Manish Manohar

If you provide emergency services and need to notify your team via email when someone requests urgent help you can use webhooks to set it up.

Let's say you run a social care service and has a specific menu item where people can reach out for urgent help, for example using a keyword such as “HELP” or “EMERGENCY”. To make sure the person is assisted immediately you want to notify your social worker team over e-mail.

Let's see how you do this in Threads and Automation, respectively.

How to set it up in Threads

Two easy steps to achieve this using Threads.

STEP 1: Set up your webhook 

You need to create a webhook that would:

  • Get the payload from Turn after a thread is completed by the user. The payload you will receive from Turn will include the phone number and other meta data of the user along with the keywords accessed by the user.
  • Set up a mailer to send email notifications to your social worker team. You can use whatever you prefer but here is a link to Nodemailer.

STEP 2: Add your webhook endpoint at the end of the thread 

Remember the webhook will be called only after the thread is completed. 

IMPORTANT! For urgent threads keep it very short, else users may not complete it and your webhook won't always trigger.
  • Go to the Content section.
  • Click on the Threads tab.
  • Open the Thread from which you want notify the social worker.
  • At the end of the thread click Add Action.
  • Add your webhook URL.

How to set it up in Automation

Three easy steps to achieve this in Automation.

STEP 1: Set up your webhook 

You need to create a webhook that would:

  • Get the payload from Turn after a they keyword was triggered. The payload you will receive from Turn will include the phone number and other meta data of the user along with the keywords accessed by the user.
  • Set up a mailer to send email notifications to your social worker team. You can use whatever you prefer but here is a link to Nodemailer.

STEP 2: Add your webhook in the Turn interface

  • Go to the Settings section.
  • Click on the API/Webhooks tab.
  • Click Add Webhook. Add your webhook URL and switch ON the toggle to enable the webhook to receive or send messages.

STEP 3: Add your webhook as an action to the automation. 

  • Add the automation. (For example, Add trigger >> Message Received >> Exact match >> EMERGENCY)
  • Next you need to add an action to your automation. You do this by clicking Add action and selecting Call a webhook as the specified action.
  • You will be prompted to enter your webhook URL.

Always test your webhook setup to be sure of the user experience, and to check that all the systems are configured correctly.

Was this article helpful?

Replacing the Contact Export API

Custom Integrations

Contact