Webhooks! Integrations!
Do you like integrations? We do too! Check this out.
Integrate location based events
With our latest update on Pathshare Professional, integrating other REST services is super easy. Based on different events formulated as rules, Pathshare Professional calls just any REST web service.
This can be your professional dispatching system when a new delivery vehicle is available, or helpful tools like Slack and Google Sheets as in our examples below.
Example with Slack
Here’s a simple slack integration. You can get notified by slack when a user joins and leaves a session, or when another team member is nearby. We’ll explain how that works below.
Example with Google Sheets
Need a log book for your trips? Not a big deal. Just let Pathshare Professional send the events to a Google Sheet together with the name, session and timestamp. Done.
Your first integration
Ok, enough teased. Here’s how you set up your first integration. Let’s do our first example with Slack.
Go to your User > Integrations and click on add a new integration.
This will present you a form to add a new rule.
Step 1: Choose a condition
A rule lets you define events (as a condition) on when to execute the action (meaning the web hook). In this example we said to always send a message to the slack channel, whenever a user joins any session.
Step 2: Choose an action
To add a new slack message to a slack channel, log in to your slack account and go to https://my.slack.com/services/new/incoming-webhook/. Choose the channel, copy the URL and paste it into the Pathshare rules form. The method is POST and the message in our example:
payload={
“text”: “%user% joined the session <%session_link%|%session%>.”
}
Save and done.
Add variables to the payload
In order to send some context of your event to your service, we added some context variables that you can easily address in the action body.
%user% the user name
%session% the session name
%session_link% the session link which lets users directly join the session or watch it in the browser
%timestamp% the time at which the event occurred
This is only the beginning with many more events and context variables to come. Signup here: https://pathsha.re/professional
Now we would like to know how you would like to integrate location sharing into your applications. Drop as a line in the comments, an email to pathshare@freshbits.ch or a direct message on the lower right of the dashboard.
Stefan, Jaro and Thomas
Originally published at blog.pathsha.re.