All Collections
Integrations
Send a Microsoft Teams message
Send a Microsoft Teams message

Send a Microsoft Teams Message using a Flowingly webhook and Microsoft Power Automate

J
Written by JK
Updated over a week ago

Using Flowingly's webhooks feature and a middleware tool like Power Automate, you could send a Microsoft Teams message when a flowingly step is submitted.

To start choose the flow model and step that you would like to configure the webhook on. In this example we are going to send a MS Teams message when a new customer comes onboard i.e. when the step 'Capture Customer Information' is submitted.

Open Microsoft Power Automate and click 'Create' and choose 'Automated cloud flow'.

Click 'Skip' on the next screen.

Give your MS Power Automate flow a name and search for the trigger 'When an HTTP request is received'. Click on '+ New step' to add a new step then search for the connector 'Post message in chat or channel'.

Choose who you'd like to post the message as and select where to post the message in. We will configure the message body and subject further down.

Click 'Save' then click on the trigger 'When a HTTP request is received' and copy the HTTP POST URL.

Click Save to your Power Automate Flow.

You can now go back to your Flowingly flow to configure your webhook. If you need help with this, please have a look at this article. Enable the webhook, give it a meaningful name and paste the HTTP POST URL in your flowingly webhook's end point URL, then click 'Save'.

Click 'Save' to make sure that you also save your flow model.

The webhook icon should now appear on the step.

Now go back in to the webhook that you just configured and click 'Test' to see if your webhook is working.

You can now go back to your Microsoft Power Automate flow to see how your test ran. Click 'My flows' and then click on the flow you created earlier.

Click on the run to look at the data that came through from Flowingly

Expand the 'When a HTTP request is received' step and select and copy all JSON code under the Body section.

We are going to use this to create a Payload sample in our Power Automate Flow. This tells Power Automate what the webhook coming from Flowingly looks like and it contains some variables that will come in handy in your Teams message.

Click on My flows and edit your Power automate flow.

Expand the 'When a HTTP request is received' step and click on 'Use sample payload to generate schema'.

Paste the JSON code then click on 'Done'.

Now you can use the data fields from your Flowingly flow in the body of your Teams message. Please note that this does not include the values that were captured in the form fields. These we will retrieve in the next step using expressions.

If you want to retrieve the values that are captured in the different Flowingly form fields, you will need to use expressions. For example you may want to include the customer's name, email address and onboarding notes in the above Teams message.

To capture include the Customer Name, which is the second field on this Flowingly form (the first one is an Instruction field that contains Flowingly's logo) use the following expression: triggerBody()?['Step']?['Values'][1]['FieldValue']

Here is list of other useful expressions you can use:

  • First step field value: triggerBody()?['Step']?['Values'][0]['FieldValue']

  • Second step field value: triggerBody()?['Step']?['Values'][1]['FieldValue']

  • Third step field value: triggerBody()?['Step']?['Values'][2]['FieldValue']

    • Etc.

  • Convert UTC to NZ Standard Time: convertFromUtc(triggerBody()?['Flow']?['StartedDateTime'], 'New Zealand Standard Time', 'f')

Please note:

Due to a Power Automate restriction you will need to delete the Payload sample that we added before. If you don't your Power Automate flow will error.

Expand the 'When a HTTP request is received' step and delete JSON code under 'Request Body JSON Schema'.

Click on Save.

Now every time your Flowingly flow is run and the Capture Customer Information steps is submitted, you will receive a Teams message!

Did this answer your question?