Webhooks Example: Sending Arrival Notifications with Slack

In addition to sending guest arrival notifications via email, text and push notifications you can use webhooks to alert your employees in Slack.

To send a guest arrival notification to your employees using Slack, you will need active Zapier and Slack accounts to configure this integration.

Please Note: Employees will be matched on their email addresses, please make sure that the email address used in WhosOnLocation matches the one used in Slack.

This process involves two different systems across four steps, each step will note which system you need to be working in.

Step 1 Create a webhook URL in Zapier

To get started you need to create a webhook URL in your Zapier account for WhosOnLocation to send information to.

Log into your Zapier account, then:

  1. Click Make a Zap!

    2019-05-24_14-49-58.png
  2. Select Webhooks by Zapier as your Trigger App.

    2019-05-24_14-51-54.png
  3. Select Catch Hook.

    2019-05-24_14-52-28.png
  4. Click Save + Continue.

This will generate the URL where data will be sent from WhosOnLocation. Click Copy next to the URL to easily paste into WhosOnLocation.

2019-05-24_14-53-26.png

Step 2 Add the webhook URL in WhosOnLocation

Now you have your webhook URL, you need to add it into your WhosOnLocation account as a destination to send data.

Log into WhosOnLocation as the Account Owner or IT Support user, then:

  1. Go to Tools > Accounts.
  2. Select Integrations from the left-hand menu.
  3. Select the Webhooks integration.

    2019-05-24_14-54-10.png
    Please Note: This should already be enabled.
  4. Click Settings.
  5. Click Create a New Webhook.
  6. Add the Webhook Name.
  7. Enter the Webhook URL (you should be able to paste this from your copied URL in Zapier).
  8. Select the 'Method' POST.
  9. Select the 'Content Type' JSON.

    2019-05-24_15-10-06.png
  10. Click Save.
Please Note: You don’t have to enter any Optional or Trigger Settings for this webhook.

Step 3 Create a Webhook Trigger

Now that we have added the webhook URL into your WhosOnLocation account you can set up a trigger to tell the system where and when to send data.

In WhosOnLocation:

  1. Go to Tools > Location.
  2. Click View next to your location.
  3. Select Triggers from the left-hand menu.
  4. Click Create a New Trigger.
  5. Enter a Trigger Name.
  6. Set the 'Trigger Status' to Active.
  7. Set the 'Trigger Event' to Visitor Sign In.

    2019-05-24_15-11-45.png
  8. Click Next.
  9. (Optional) Enter any 'Trigger Rules' that you may want to narrow down when WhosOnLocation will send the arrival notification through Slack.
  10. Click Next.
  11. Click Create a New Action.
  12. Select Webhook – Triggers a Webhook URL from the drop-down menu.

    2019-05-24_15-13-08.png
  13. Select your Zapier webhook from the drop-down menu.
  14. Select the 'Data mode' as Full.

    2019-05-24_15-13-36.png
  15. Select a record from the drop-down menu to test the webhook with.

    2019-05-24_15-15-03.png
  16. Click Send Data.

    2019-05-24_15-15-43.png

    Information should be presented under the Response Data including {"status": "success"… This means the test has worked.

    2019-05-24_15-16-18.png
  17. Click Save & Close.

Step 4 Create the Action to Find User in Slack

Now your trigger is set up it will start sending visitor data to Zapier whenever a visitor signs in, depending on your trigger rules. The next step is to tell Zapier how to find the employee in Slack.

In Zapier:

  1. Click Ok, I did this.

    2019-05-24_15-19-24.png

    You will be able to review the data that was sent to Zapier in your test.
  2. Click Continue.

    2019-05-24_15-20-27.png
  3. Click the Your Zap currently lacks an Action step. Add one now! link.

    2019-05-24_15-20-48.png
  4. Search for Slack and select it.

    2019-05-24_15-21-36.png
  5. Select Find User by Email.

    2019-05-24_15-24-09.png
  6. Click Save + Continue.

    If you have a Slack account already connected to Zapier, you can choose this and skip to step 12.
  7. Otherwise, click Connect an Account.

    A new window will open to your Slack login.
  8. Enter your workspace URL.
  9. Click Continue.
  10. Sign into your account.
  11. Click Authorize.

    You will be taken back to the Zapier window.
  12. Click Save + Continue.

    2019-05-24_15-25-08.png
  13. Next to the email field, click the Insert a Field button.
  14. Select Visiting Staff Email.

    2019-05-24_15-29-48.png
  15. Click Continue.
  16. Click Fetch & Continue.

    2019-05-24_15-34-21.png

Step 5 Create the Action to Send a Slack Message

Now Zapier knows how to find employees in Slack, it needs to be told what to send to Slack when a visitor arrives.

In Zapier:

  1. Click Add a Step.

    2019-05-24_15-37-44.png
  2. Select Slack.

    2019-05-24_15-38-13.png
  3. Select Send Direct Message.

    2019-05-24_15-38-36.png
  4. Click Save + Continue.
  5. Select your Slack account.
  6. Click Save + Continue.
  7. Under 'To Username' scroll to the bottom of the drop-down menu and select Use a Custom Value (advanced).

    2019-05-24_15-39-58.png
  8. Next to the 'Custom Value for To Username ID' field click the Insert a Field button.
  9. Select Find User by Email > ID.

    2019-05-24_15-40-25.png
  10. Under Message Text enter the notification to be sent through Slack using the placeholder fields to insert dynamic information about the visitor. For Example:

    2019-05-24_15-43-14.png
  11. Enter any optional information you want.
  12. Click Continue.
  13. Click Send Test To Slack to ensure it’s all working.

    2019-05-24_15-45-27.png
  14. Click Finish.
  15. Enter a Name.
  16. Set 'Your Zap Is' to On.

    2019-05-24_15-46-24.png

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request