cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
annetoal
Super User
Super User

Launch a Flow from an email

How can I embed a button in an HTML email that will launch a Flow when clicked?

Second question: is there an HTML address to run a Flow?

 

Thanks,

Anne

7 REPLIES 7
johnokeeffe
Frequent Visitor

Hi @annetoal , 

 

To answer the first part of the question you can't use button html in emails but you can use some basic css and html link elements. Here is this question answer else where: Is it possible to add HTML buttons in send an email(V2) of Power automate. I want to create 3 button...

 

I have condensed it here for you (Just replace the text after the href with your trigger url below):

 

<p><br>
<br>
This is a <strong>Test</strong> email containing links  looking like html buttons<br>
<br>
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
      <td>
          <table cellspacing="3" cellpadding="3">
              <tr>
                  <td style="border-radius: 5px;" bgcolor="#1281ee">
                      <a href="Enter the HTTP Get url here" target="_blank" style="padding: 8px 12px; font-size: 14px; color: #ffffff;text-decoration: none;font-weight:bold;display: inline-block;">Click me to run flow
                      </a>
                  </td>



              </tr>
          </table>
      </td>
  </tr>
</table>
<br>
<br>
</p>

 

To answer the second part the quickest way to do so would be setup a "When a HTTP request is received" trigger.

 

The HTTP get URL is what you would be "clicking" in the above html code. It will open up your browser then it sends the HTTP Get request which in turn triggers the flow.

 

Hope this helps.

 

johnokeeffe_0-1654800015279.png

 

 

 

Thanks, that sounds like a do-able approach. Where can I view the GET URL for a Flow, so I can enter the info into the connector?

 

Anne

vivekpande18
Super User
Super User

Hi @annetoal ,

 

You will get the Url from that action only.

 

1- Add the "When a HTTP request is received" trigger

2- Add one more action.

3- Save your flow.

 

After saving the flow, you will get see that URL inside HTTP GET URL  textbox.

 

Thanks

Vivek pande

Thanks again for the help. I found some helpful code on the net that embeds three clickable "buttons" inside an HTML mail. The code is configured to send the browser to Google for each button. I'd like to substitute a URL that triggers a Flow, if possible. Is there a URL for every Flow that can be executed to launch the process?

<p><br>
<br>
This is a <strong>Test</strong> email containing links  looking like html buttons<br>
<br>
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
      <td>
          <table cellspacing="3" cellpadding="3">
              <tr>
                  <td style="border-radius: 5px;" bgcolor="#1281ee">
                      <a href="https://google.com" target="_blank" style="padding: 8px 12px; font-size: 14px; color: #ffffff;text-decoration: none;font-weight:bold;display: inline-block;">LTA                            
                      </a>
                  </td>

    <td style="border-radius: 5px;" bgcolor="#1281ee">
                      <a href="https://google.com" target="_blank" style="padding: 8px 12px; font-size: 14px; color: #ffffff;text-decoration: none;font-weight:bold;display: inline-block;">SMT                              
                      </a>
                  </td>

<td style="border-radius: 5px;" bgcolor="#1281ee">
                      <a href="https://google.com" target="_blank" style="padding: 8px 12px; font-size: 14px; color: #ffffff;text-decoration: none;font-weight:bold;display: inline-block;">SOP                              
                      </a>
                  </td>
              </tr>
          </table>
      </td>
  </tr>
</table>
<br>
<br>
</p>

 @vivekpande18 

Hi @annetoal

 

There is no standard URL that will trigger any flow you want that doesn't work in power automate. You need to use the HTTP request trigger when saved will generate the URL for you to use. Then just replace the href attribute in the html code like below. I had already condensed the code for you in the example you found on the net.

 

johnokeeffe_0-1654875220334.png

annetoal
Super User
Super User

Thanks so much for the help. I will try it out.

 

Anne

annetoal
Super User
Super User

Would you be able to share an actual working URL (minus sensitive information) that launched a Flow that you have created to embed in an email message like your example above? 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,576)