In this article we walk through how your can leverage our Webhooks feature for a custom workflow to write new Access Requests as messages in a Microsoft Teams channel.
Prerequisites
Paid plan for Webhooks access
A Microsoft Teams account
A Zapier Premium account with Webhooks
Setting Up the Webhook
Login to SafeBase and navigate to the Settings page and find the Webhooks option. Click on the Connect button if you have not previously set any webhooks up.
Click on Add Endpoint.
You will see the option to specify an endpoint URL. We will return to this later.
Open Zapier and Create a new Zap using the Webhooks by Zapier trigger.
Hit Continue twice until you see the option to Test. You should see a newly generated URL. Copy this and return to the SafeBase app.
Take the URL you just copied and paste it into the Endpoint URL field.
Select the
accessRequest.requested
option and hit Create to save.Navigate to the Testing tab and select the
accessRequest.requested
option.Find the Send Example button towards the bottom. We will now verify that the Zapier webhook was able to receive this event.
Return to Zapier and attempt to test the trigger. If successful, you should see a success message, along with sample data from our test.
Hit Continue and proceed to choose Microsoft Teams for your App, and Send Channel Message as your Event.
Connect your Teams Account if necessary. Note that you will need to install the Zapier app for the team. If you are having trouble getting data to load, please see this article on how to set this up: https://help.zapier.com/hc/en-us/articles/8496015602829-Common-Problems-with-Microsoft-Teams-on-Zapier
Select the appropriate Team and Channel. We recommend choosing Markdown as the Message Text Format to allow for better formatting such as bolding. You can use fields such as Name and Email from the Webhook event to populate your message as seen below.
Hit Continue and Test the Zap to ensure it is functioning correctly. Publish the Zap when you're done. You will now be able to see information about Access Requests in Microsoft Teams. Note that due to Zapier/Teams limitations, the message cannot include mentions, and will come from the Zapier app rather than something custom such as SafeBase Notifications.