Configuration¶
Teams¶
Add workflows¶
First off you will need to add workflows to your channel/chat. This can be done in many ways.
- In the far left menu in teams, press Apps and then go to workflows.
- In the left list of your chats or channel, click the three dots on the right of the chat name. Add Workflows.
- In your chat or channel, press "view and add participants" and add add "agents or bots". Then select Workflows.
Add webhook to workflow¶
Depending which way you chose to add workflows this next step could differ.
Next step is to add a webhook to your channel/chat. Search for webhook in the prompt and select either
- "Post to a channel when a webhook request is received"
- "Post to a chat when a webhook request is received"
(depends if you've selected a chat or channel)
Next step is to name your flow. This is for easier management later. Here you also select the user that will send the message. It could be nice to have som kind of dedicated flow user here. Otherwise the messages will be sent from your account.
Next step you'll have to choose chat or channel. If you started from a chat/channel this will be pre-chosen for you.
At the latest step you'll get a webhook https address. This is the address you'll use for your webhook flow in webadmin. Don't worry if you lose this bacuse you could get it later in teams as well.
Lime webadmin¶
Next step is to build webhook flows in Lime webadmin for each limeobject you want. REMEMBER that you need to add code to each limeobject class you want to have active flows for. Check how to install!
Add the Lime base URL¶
On the first page in Teams Webhooks there's a text field where you need to put the base URL for Lime. This is used when including a lime link in your messages. It must start with https:// and can't end with a /. Example of OK URL: "https://mylimedns.com".
Add flows¶
Choose the limetype at the top and create a new flow below.
- Unique webhook flow name: A nice name for your flow. This will be the name you see when it's minimized.
- Inactive: If ticked, the flow won't run.
- Webhook URL: Here you paste your generated webhook https address generated by teams.
- Teams channgel/chat name: Write which channel/chat will receive the Teams message.
Next part is just like an automation but built a bit different.
- Is new: Send request when the lime object is new.
-
Is nupdated: Send rquest when the lime object is updated. Both of these can be ticked
-
Query: Write a query on what the object has to look like to trigger request. Examples:
{
"key": "city",
"op": "=",
"exp": "Stockholm"
}
or
{
"op": "AND",
"exp": [
{
"key": "businessunit",
"op": "=",
"exp": 1011
},
{
"key": "coworker",
"op": "=",
"exp": null
}
]
}
- Is dirty: Fields that has to be dirty in order to execute the request.
- Message title: The title in the message.
- Message body: The body of the message.
- Include lime link for web: If ticked, there will be a button in the message with the URL to the object hyperlinked (web client).
- Include lime link for desktop: If ticked, there will be a button in the message with the URL to the object hyperlinked (desktop client).
- Lime link button text: Text on the button. Example: "Open in Lime".
- Replacement codes: Codes used in either the title or body can be replaced by values from the object. This is where you specify which ones.