Tutorial 9: Send Teams Message
Estimated time: 10 min.
Prerequisites
- PIPEFORCE Enterprise 7.0 or higher
- You have a valid PIPEFORCE Developer account
- You have completed tutorial: Tutorial: Create a new app
- You have completed tutorial: Tutorial: Create and execute a pipeline
- You have an Office 365 / Teams account
Teams Messaging - Intro
Sending messages from PIPEFORCE to external systems is very easy when there is an API or webhook available. This tutorial will demonstrate that by sending a message to Office 365 / Teams.
1 - Create a webhook in Microsoft Teams
In the first step, you need to create a webhook in Teams, so we can send data to it. To do so, follow these steps:
Login to your Office 365 account: https://office.com
Open the Teams app
Navigate to Teams → Your Teams → Select the channel you want to send messages to → Connectors:
In the upcoming list click
Configure
of Incoming Webhook:Give the webhook a meaningful name and then click
Create
:Copy the generated webhook url into your clipboard, then click
Done
:
2 - Send a message from a pipeline
Login to the portal https://NAMESPACE.pipeforce.net
Navigate to LOW CODE → Workbench
The ad-hoc pipeline editor is shown
Copy and paste this content into the editor, and overwrite any existing data there by this:
pipeline:
- http.post:
url: "https://yourname.webhook.office.com/..."
body: |
{
"text": "This message was sent with PIPEFORCE."
}Replace the
url
param by the webhook url you have copied to clipboard before.As you can see, we set the
url
and thebody
for the HTTP message, which will be used by thehttp.post
command, in order to send it to the Teams webhook using the given url. Note the pipe|
character of parameter body. This is specific to YAML and allows to define a multi-line value without additional “line encodings” or “escapes”. We can write a JSON string straight here.Click
RUN
.Done. After a few seconds, you should receive a new message in the Teams channel:
If you want, you can persist this pipeline in an app to keep it for later use.
References:
https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-connectors
Report an Issue
In case you're missing something on this page, you found an error or you have an idea for improvement, please click here to create a new issue. Another way to contribute is, to click Edit this page below and directly add your changes in GitHub. Many thanks for your contribution in order to improve PIPEFORCE!