Skip to content
Power-BI-banner
1 min read

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 Power Automate 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 importantand more difficultpart 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

Share
  
DON'T MISS!

Expert Insights from the Aerie Team

Drop us a line

Our team will be happy to answer your questions.

ADDRESS: 110 West Canal Street, Suite 201
Winooski, VT 05404

PHONE
: (813) 358-4656
HOURS: 8:00 am - 5:00 pm EST Monday to Friday
EMAIL: chanson@aerieconsulting.com