How to: Send tables with links to items in Power Automate Flow emails

Use Case

Recently, a client requested a daily digest email be sent to their support staff with a list of their active tickets, along with a link to the particular record. This blog will take you step-by-step through the usefulness of this Flow and how I created it.

What’s great about this Flow is, even though in my example I am triggering it as a recurrence with CDS as a data source, you can use any type of trigger you may need or any data source that applies. The important—and more difficult—part is including the links directly to records in an email table. 

Challenges

You might think this would be a simple request, but it turns out that you need to do a little bit of thinking to make this work. My first instinct was to try to store the returned values for each user as an Array Variable, but when you use the “Create HTML Table” action based upon the array, the link reference does not get recognized as HTML and you get an email that looks something like below:

Ticket Table Issues

How to Create this Flow (or something similar)

  1. Create the Flow with a Trigger of Recurrence. Set the recurrence pattern to whatever you would like. We are setting a daily recurrence in this example.
  2. Initialize an integer variable for the count of records returned. We don’t want to send users emails with blank tables.
  3. Initialize a string variable for storing each new row of the table.
    Flow Ticket Variables
  4. List All Active Users 
    List All Active Users
  5. Apply to each user
  6. List tickets
    List Tickets
  7. Apply to each ticket
  8. Increment count variable
  9. Condition: If count is greater than 0
  10. Get account (to display the client’s name)
    Apply to each ticket
  11. Append to string variable for a new table row. This is how we are building the HTML for the email.
    Append to String
  12. Condition: Count is greater than 0
  13. Send an email from a Shared Mailbox. Formatting the rest of our HTML will happen in the body of this email action. Insert whatever table formatting you may want into the <style> tag. Keep in mind, in my screenshot the web version of outlook strips some of the formatting.
    Email Body HTML
  14. Set count to 0
  15. Set ticket table string to null

With any luck, your results should appear like this:

Email Table Example

A running list of my favorite announcements/features from Ignite 2019

Project Cortex (Skynet?)

Project Cortex is the newest AI-powered service released by Microsoft. At a high level, it creates a knowledge network for your organization and can deliver relevant knowledge to people though topic cards and pages in the apps that they are already using every day.

Key Links:

Teams

Pop out windows for chat and meetings. A long awaited feature is being rolled out some time in early 2020.

Private Channels. Maybe the most requested feature in Teams. These are available NOW!

Live Captions AND Video Backgrounds

Power Apps

New name (notice the space) which now fits all of the other Power Platform application names.

Enhanced Formula Bar. Is any explanation needed here? The previous version constantly was in the way of your app making screen and the autocomplete list was hard to see and navigate.

Environment Variables. Use these when apps or Flows need different configuration across different environments. They can act as input parameters to reference within solution components.

Embed Power App in Teams as a Top Level App. I love this feature, especially if you have an organization wide Power App that needs to be accessed quickly.

Power Apps Monitor. See what users are clicking and be able to pinpoint connection failures or why your performance is dragging.

Power Automate

Microsoft Flow is no longer! Welcome in Power Automate and give it a round of applause for a list of brand new features such as RPA (Robotic Process Automation)

Robotic Process Automation – UI Flows. Available now in Public Preview, create a flow that automates a process in a point-and-click experience.

Virtual Agents. Azure Cognitive Services and Bot Framework fully integrated and just a few clicks away.

Dynamics Project Service – Using Stage Name in v3.0

If you are like me, you work for a company that uses Dynamics Project Service. You recently upgraded from v2 to v3.0. You may have noticed that there is no longer a workflow that updates the Project Stage Name based upon Active Stage in the Business Process Flow.

You thought “OK, I will just create a workflow on the Project Stages Business Process change of active stage.” You were probably greeted with a similar message when trying to update the project record with the active stage name:

In a last ditch effort to preserve the sanity and beautiful PowerBI dashboard of our Director of Operations (which was based upon our project stages), I created a Flow to do the same thing. Below are some steps I followed to get the Stage Name to populate once again.

First off, you may need to recreate this Flow on Create and Update of the Project Stages entity. This is the entity for the Project Business Process Flow.

When a Project Stage record is updated:

Get the Active Stage related to the Project Stage which was updated:

Get the Project Record related to the Project Stage which was updated:

Update the Project Record:

Voila! We have a working Stage Name Field! You can recreate this process in a new implementation of Project Service as well. You would need to create your own Single Line of Text field to replace the Stage Name field.

Spring ‘19 Release Notes are here!

You can find the release notes at this link: https://docs.microsoft.com/en-us/business-applications-release-notes/april19/

Some highlights are:

Sales forecasting – with the help of Cortana

Deeper integration with LinkedIn

Teams integration with Relationship Assistant

App licensing requirements presented to app makers while building PowerApps – know if your app will work with your licensing!

Canvas apps with responsive layouts

Save and reuse PowerApps components