web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Microsoft Power Automa...
Power Automate
Unanswered

Microsoft Power Automate Outlook Display vs. Send

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

 

i got a problem with Microsoft Power Automate. 

 

I would like so create a E-Mail via Outlook. But before the E-Mail is getting send i would like to look over the mail and check it. So the Mail should be displayed and not send instandly. 

 

Thanks for Helping. 

Justen

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    There is no native way to display and email in Outlook. You could use the Outlook UI to create a new message and then type in the text, but that is a pain to automate.

     

    If you only care about the text content, I would suggest simply using the Display message box action to show you the email text before sending it.

     

    Alternatively, you could use scripting, such as VBscript or PowerShell to create a draft email message, review it and then make the flow send it. But it is actually quite complex to do.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

     

  • LokeshBysani Profile Picture
    229 Super User 2024 Season 1 on at

    You can have a script that creates the email and display it. Once everything looks good then you can manually click on send button.  I used power shell script to achieve this. Please find the code below. 

    # Create an Outlook application object
    $outlook = New-Object -ComObject Outlook.Application
    
    # Create a new mail item
    $mailItem = $outlook.CreateItem(0)
    
    # Set the email properties
    $mailItem.To = %ConsultantEmail%
    $mailItem.Subject = "Updated Schedule"
    $mailItem.HTMLBody = %FinalHTML%
    
    # Display the email for review (optional)
    $mailItem.Display()
    
    # Release the Outlook COM objects
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($mailItem) | Out-Null
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($outlook) | Out-Null
    Remove-Variable outlook, mailItem

     

    Use Run PowerShell script activity and then paste the above code. 

    Note:

    1. I  am sending html content as a body so I used $mailItem.HTMLBody if not you can use $mailItem.Body

    2.  If your html body has a " then you have to use replace text action and then replace " with `". (Its just escaping)

    3. Similarly you have to include %ConsultantEmail% variable in "" as "%ConsultantEmail%" shown below. 

    LokeshBysani_0-1692027902682.png

     

  • Nicolas_Justen Profile Picture
    5 on at

    I would like to fill the Mail with HTML content. 

    I would like to send a chart filled with Informations from my power Automate variables. 

    The HTML Code looks like: 

     

    <!DOCTYPE html>
    <html>
    <head>
     <title>Test</title>
    </head>
    <body>
     <p> xxx %ExcelData[0][0]%: </p>
    
     <table border="1">
     <tr>
     <th>Kalenderwoche</th>
     <th>Datum</th>
     <th>Wochentag</th>
     <th>xxxx</th>
     <th>xxxx</th>
     </tr>
     <tr>
     <td>%ExcelData[0][0]%</td>
     <td>%ExcelData[0][1]%</td>
     <td>%ExcelData[0][2]%</td>
     <td>%ExcelData[0][3]%</td>
     <td>%ExcelData[0][4]% %ExcelData[0][5]% %ExcelData[0][6]% %ExcelData[0][7]% %ExcelData[0][8]% %ExcelData[0][9]% %ExcelData[0][10]% %ExcelData[0][11]% %ExcelData[0][12]% %ExcelData[0][13]%</td>
     </tr>
     <tr>
     <td>%ExcelData[0][0]%</td>
     <td>%ExcelData[1][1]%</td>
     <td>%ExcelData[1][2]%</td>
     <td>%ExcelData[1][3]%</td>
     <td>%ExcelData[1][4]% %ExcelData[1][5]% %ExcelData[1][6]% %ExcelData[1][7]% %ExcelData[1][8]% %ExcelData[1][9]% %ExcelData[1][10]% %ExcelData[1][11]% %ExcelData[1][12]% %ExcelData[1][13]%</td>
     </tr>
     <tr>
     <td>%ExcelData[0][0]%</td>
     <td>%ExcelData[2][1]%</td>
     <td>%ExcelData[2][2]%</td>
     <td>%ExcelData[2][3]%</td>
     <td>%ExcelData[2][4]% %ExcelData[2][5]% %ExcelData[2][6]% %ExcelData[2][7]% %ExcelData[2][8]% %ExcelData[2][9]% %ExcelData[2][10]% %ExcelData[2][11]% %ExcelData[2][12]% %ExcelData[2][13]%</td>
     </tr>
     <tr>
     <td>%ExcelData[0][0]%</td>
     <td>%ExcelData[3][1]%</td>
     <td>%ExcelData[3][2]%</td>
     <td>%ExcelData[3][3]%</td>
     <td>%ExcelData[3][4]% %ExcelData[3][5]% %ExcelData[3][6]% %ExcelData[3][7]% %ExcelData[3][8]% %ExcelData[3][9]% %ExcelData[3][10]% %ExcelData[3][11]% %ExcelData[3][12]% %ExcelData[3][13]%</td>
     </tr>
     <tr>
     <td>%ExcelData[0][0]%</td>
     <td>%ExcelData[4][1]%</td>
     <td>%ExcelData[4][2]%</td>
     <td>%ExcelData[4][3]%</td>
     <td>%ExcelData[4][4]% %ExcelData[4][5]% %ExcelData[4][6]% %ExcelData[4][7]% %ExcelData[4][8]% %ExcelData[4][9]% %ExcelData[4][10]% %ExcelData[4][11]% %ExcelData[4][12]% %ExcelData[4][13]%</td>
     </tr>
     </table>
     <p> xxxxxxx <br> <br> Freundliche Grüße <br> <br> xxxx </p>
    </body>
    </html>

     

    How does the Power Shell Code look like?

  • LokeshBysani Profile Picture
    229 Super User 2024 Season 1 on at

    @Nicolas_Justen  only change you need to do is for the below three variables in the code 

     

     

    # Set the email properties
    $mailItem.To = %ConsultantEmail% - Email to which you would like to send. 
    $mailItem.Subject = "Updated Schedule" - Subject
    $mailItem.HTMLBody = %FinalHTML% - variable where your html is stored that you have shown above. 

     

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

  • AK88 Profile Picture
    453 on at

    Dear @Nicolas_Justen ,

     

    Please see the below code, hope this will help you;

     

    $htmlContent = @"
    <!DOCTYPE html>
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    <p> xxx $($ExcelData[0][0]): </p>

    <table border="1">
    <tr>
    <th>Kalenderwoche</th>
    <th>Datum</th>
    <th>Wochentag</th>
    <th>xxxx</th>
    <th>xxxx</th>
    </tr>
    "@

    for ($i = 0; $i -lt 5; $i++) {
    $htmlContent += @"
    <tr>
    <td>$($ExcelData[0][0])</td>
    <td>$($ExcelData[$i][1])</td>
    <td>$($ExcelData[$i][2])</td>
    <td>$($ExcelData[$i][3])</td>
    <td>$($ExcelData[$i][4]) $($ExcelData[$i][5]) $($ExcelData[$i][6]) $($ExcelData[$i][7]) $($ExcelData[$i][8]) $($ExcelData[$i][9]) $($ExcelData[$i][10]) $($ExcelData[$i][11]) $($ExcelData[$i][12]) $($ExcelData[$i][13])</td>
    </tr>
    "@
    }

    $htmlContent += @"
    </table>
    <p> xxxxxxx <br> <br> Freundliche Grüße <br> <br> xxxx </p>
    </body>
    </html>
    "@

    # Output the HTML content
    $htmlContent

     

     

     

    If my answer provides your query , please choose it as solution

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard