Customer Engagement & Dynamics CRM Forum

Power Automate - Clickable Links in HTML table / Weekly Summary of new Dynamics 365 Accounts

  • 1.  Power Automate - Clickable Links in HTML table / Weekly Summary of new Dynamics 365 Accounts

    GOLD CONTRIBUTOR
    Posted Dec 13, 2019 11:32 AM
    Edited by Adam Posegate Dec 13, 2019 12:27 PM
    I feel like I finally got somewhere with a basic Flow / Power Automate routine. This was especially easy to accomplish as a Dynamics 365 workflow, but there will be a time when we can't use this. I have several recurring email workflows, and the first one I tackled is the weekly summary of new Dynamics 365 accounts. Here is what I did - I am sure there are other ways to accomplish this, and feedback is encouraged. Here is how I did it.

    Of course, sending emails from Power Automate is among the easier tasks. The main challenge I had to overcome was including a clickable link to the record in the HTML table.

    Result

    Output

    Routine

    Screenshot of recurrence
    List records

    The Filter Query uses the formatDateTime() expression
    formatDateTime(body('Get_past_time'),'yyyy-MM-dd')


    The Created On expression is as follows:

    converttimezone(item()?['createdon'],'Dateline Standard Time','Central Standard Time','MM/dd/yyyy')

    select
    Create HTML table

    Then get your own profile (if this is a subscription to go to multiple users, you will need to do something else).

    Then send an email. Embed whichever fields from your profile, contextual language, and CSS (for the table) that you desire. For the table itself, do not just use the dynamic field from the Create HTML table. Use this instead:
    replace(replace(body('Create_HTML_table'), '&lt;', '<'), '&gt;', '>')
    This will ensure that you get usable links, rather than full-text HTML code.
    Send an email
    Send an Email
    #PowerAutomate(Flow)​​​ #Workflow #Admin​​

    ------------------------------
    Adam Posegate
    Fox Valley Technical College
    Appleton WI
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


If you've found this thread useful, dive deeper into User Group community content by role