In order to integrate with Microsoft Teams, we will first need to configure Microsoft Teams to accept a webhook request. To do this you will click on the ellipsis button on the channel you want the message to be sent to and choose Manage channel.
Then you will click the edit button under the connectors section.
Now, you will search for the connector called incoming webhook and click add.
After you add the connector you will click configure, provide a name, an optional image, and then click create.
This will then provide you with a URL that you can use in Fulcrum’s webhook feature to create messages based on the triggers and filters you set up.
Here is an example of the full URL: https://spatialnetworks.webhook.office.com/webhookb2/asdf3ff24-sf56-76as-fhvx-af2340fa35x@aff22fd8-4432-4ca2-8be0-7asf237bd83/IncomingWebhook/740cdcasdf234c87e8841aasxcgsx68/xxxx0923-d853-xxxx-8fc6-asdfsfxxxdfasdx
Next, you will configure a Fulcrum workflow with your triggers and filters. In the example below we have the workflow running every time a record is created with no filters.
For the action step, you will choose Webhook and use the below configuration. The payload portion is where you will configure data from within Fulcrum to show up in your Teams message. This can be configured however you like to implement the message you are looking to send when your workflow runs.
Method: POST
URL: The url provide by slack.
Basic Auth: Empty
Query Parameters: Empty
Headers: Empty
Payload:
{
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "A record has been posted.",
"themeColor": "EB1300",
"title": "Bottoms Up!",
"text": "{{_created_by_name}} created a new record!",
"sections":
[
{
"text": ">{{&comments}}"
},
{
"text": "![Photo]({{thumbnail}}/thumbnail)"
},
{
"facts":
[
{
"name": "Rating:",
"value": "{{stars}}"
},
{
"name": "Location:",
"value": "{{_latitude}}, {{_longitude}}"
},
{
"name": "Altitude:",
"value": "{{altitude}}"
}
]
}
],
"potentialAction":
[
{
"@type": "OpenUri",
"name": "View Location Map",
"targets":
[
{
"os": "default",
"uri": "https://www.google.com/maps/search/?api=1&query={{_latitude}},{{_longitude}}"
}
]
},
{
"@type": "OpenUri",
"name": "Open in Fulcrum",
"targets":
[
{
"os": "default",
"uri": "https://web.fulcrumapp.com/records/{{_record_id}}?mode=edit"
},
{
"os": "iOS",
"uri": "fulcrumapp://edit-record?record_id={{_record_id}}"
},
{
"os": "android",
"uri": "fulcrumapp://edit-record?record_id={{_record_id}}"
}
]
}
]
}
After you activate and save your workflow your integration is set up and Microsoft Teams messages will be sent based on the trigger and filters you have set up.