Tutorial 09: Send MS Teams Messages
Introduction
This tutorial is targeting
Low-Code Developers who wants to sending messages from PIPEFORCE to external systems becomes straightforward when APIs or webhooks are accessible.
What you will learn
This tutorial elaborates how to send a message to Office 365 / Teams by PIPEFORCE Platform.
Step 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
:
Step 2: Send message from 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.
Congratulations!