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:

  1. Login to your Office 365 account: https://office.com

  2. Open the Teams app.

  3. Navigate to Teams → Your Teams → Select the channel you want to send messages to → Connectors:

    image-20241202-123516.png
  4. In the upcoming list click Configure of Incoming Webhook:

    image-20241202-123726.png

  5. Give the webhook a meaningful name and then click Create:

     

  6. Copy the generated webhook url into your clipboard, then click Done:

Step 2: Send message from pipeline

  1. Login to the portal https://NAMESPACE.pipeforce.net

  2. Navigate to LOW CODE → Workbench

  3. The ad-hoc pipeline editor is shown

  4. 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." }
  1. Replace the url param by the webhook url you have copied to clipboard before.

  2. As you can see, we set the url and the body for the HTTP message, which will be used by the http.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.

  3. Click RUN.

  4. Done. After a few seconds, you should receive a new message in the Teams channel:

  5. If you want, you can persist this pipeline in an app to keep it for later use.

Congratulations!