Task Completion reminder using Flow Bot in Microsoft Teams | Power Automate

We can be a little creative and put Flow Bot to use in Power Automate’s Microsoft Teams connector! Let’s look at a use case where you can use it to make sure Task Reminders can be handled in a friendly way.

An Open Task

Let’s look at a typical Task in Dynamics –

  1. Let’s say there’s a Task set to Joe to have a meeting with Adam which looks like this in Dynamics.

  2. In this example, I’ll ask if the user forgot to mark it as closed since the time has passed.
  3. If the user is reminded that they actually worked on it but forgot to close, they can simply click on Mark as Complete right from Teams and not bother about going into Dynamics to close it.


Here’s how I constructed the Flow. It could be different in your case. I just wanted to put an example out –

  1. My Flow runs on Recurrence. Once a day to check whether any Tasks are left Open in the past 4 hours. Then it could be tasks from the previous day or anything older than 4 hours. (Not being stringent here 😊)
    Next, I’ll get all Tasks which are open over past 4 hours. Using Fetch Xml Query as I was comfortable doing that.

  2. Furthermore, in the Fetch Xml, I’m using Link Entity to get related data. I’ll need the record Owner’s Email address and I’m fetching it from User’s entity.

    To understand how to also read related records and use them as variables, you can follow Sara Lagerquist’s post on the same with a superb explanation – https://saralagerquist.com/2019/11/25/how-to-avoid-the-get-record-action-to-retrieve-related-data-in-power-automate/
  3. Post that, I’m Parsing JSON so that I can use fields later on in the Flow to put in the Flow Bot.

  4. Now, since the Get All Tasks will get all open Tasks from the system which may belong to other users too, an Apply to Each will open up to now treat each of these Tasks as a different Flow Bot message.
    This will loop through all the Parsed results from the step above so I can easily use fields from the Task

  5. Next, is the important step. In Microsoft Teams’ connector, you’ll find this Action called as ‘Post a choice of options as the Flow bot to a user’.
    As the name suggests, this Action can post buttons as choices to the user in their chat and capture responses. Simple!

  6. This Actions will demand the following details. My Flow bot card looks like this

    Now, the Options Item 1-, 2 etc. are the places where you can provide what all options the users can get to select.

    The Recipient above should be the email address of the Teams user who should get this Flow Bot. Hence, I had selected the FetchXML query above to get the Email address from the Owner of the Task itself and parsed it to select as a field in here.

    Finally, what should be the Message inside and the Headline. Which obviously will be read by the user to understand what the message is about. Hence, Description of the Task and Subject in them respectively.
  7. Later on, based on the response of the user, if they click on
    I’ll go ahead and mark the Task as Completed in Dynamics.

  8. And just set the Task record to Completed state.

  9. And that’s it. Yours can be even more basic or complex depending on how you want to use it.

Flow Bot

Now, every once a day according to above scenario, my Flow Bot will post the below message to the user’s Teams chat.

  1. You’ll see this card posted in the chat.

  2. Now, you have two options, Mark as Complete and This is Pending. Let’s say the user wants to Mark the Task as Complete. So selecting either of the options, you’ll get place to add Comments.

    I’m NOT doing anything to the passed comments, but you can do so based on your use case.
    Also, I’m NOT doing anything when the user clicks on This is Pending.

  3. On clicking Submit, the user sees as below and the buttons go away.

  4. And when you check the Task in Dynamics, it’ll be marked as Completed.

Hope this is useful to get your going! You can use this in several use-cases to capture something from the user through their Teams chat and update and forward it to other systems.

Here are some more Power Platform, Flow, Teams posts you might like to check –

  1. Using triggerBody() / triggerOutput() to read CDS trigger metadata attributes in a Flow | Power Automate
  2. Adaptive Cards for Teams to collect data from users using Power Automate | SharePoint Lists
  3. Send a Power App Push Notification using Flow to open a record in Canvas App | Power Automate
  4. Accept HTTP Requests in a Flow and send Response back | Power Automate
  5. Call HTTP Request from a Canvas Power App using Flow and get back Response | Power Automate
  6. Terminate a Flow with Failed/Cancelled status | Power Automate
  7. Pause a Flow using Delay and Delay Until | Power Automate
  8. BPF Flow Step as a Trigger in CDS (Current Environment) connector | Power Automate
  9. Generate Dynamics 365 record link in a Flow using CDS connector | Power Automate
  10. Loop through array of objects in a Flow & Create records in CDS | Power Automate
  11. Using Parse JSON to read individual List Records in Flow|Power Automate
  12. Call a Dynamics 365 Action from Flow [Bound and Unbound Actions] | Power Automate

Thank you!