cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
delonge
Regular Visitor

Send Email based on record value (Custom Flow)

 

Hello,

 

I'm currently evaluating the possibility of using Powerapps + Flow for a small application but I haven't been able to confirm if I can do one thing.

 

Let's say I have a list of items, with the total quantity of each product, for example:

 

Item                Quantity

Product1         10

Product2          20

 

 

And I would like to be able to send an email using Flow when for example the Product1 quantity < 5. 

Is this achieveable using Powerapps + Flow?

 

I could not find any example on how to do this.

 

Thank you for your help!

1 ACCEPTED SOLUTION

Accepted Solutions

Hello there,

 

You can do this by embedding the Flow into the PowerApp itself. That way, it becomes a function call (just like you would call Navigate() as a function), that you can then put a conditional around.

 

So two routes you could probably take depending on your process.

 

Without diving into the form submission details, at a high level you would need to do something like I've outlined below:

 

1. Assumption: Have a form that captures appropriate information / update to the item.

  • Once submitted, you will need to either return a reference to that item in the DB from your gallery, or do a lookup to get the item info. I won't focus on this because there are many ways to do this depending on the process flow.

 

2. With that, go ahead and create a new Flow from scratch. You'll see a screen similar to the one below.

3. You can then go about adding a basic email connector (I'm using o365 Outlook for no particular reason) and set some basic info.

As you will see, you can start to "Ask in Powerapps" for relevant field information. I set my Email like below so that we can capture the body information and the subject.

 

4. Once set, save the flow and return to your PowerApp. Let 's go ahead and add the Flow to the PowerApp now.

 

and then add the Flow you created:

 

5. After adding, you can see that it will give you intellisense for the properties that we asked for in the Flow when we were creating it.

With this function, you can then put logic around it to say whether or not we need to send an email like I've outlined.

 

 

Hope this helps!

View solution in original post

5 REPLIES 5
KC
Kudo Kingpin
Kudo Kingpin

If using SharePoint, you can create a Custom Flow directly on your list that would trigger when an existing item is changed, i.e. the Qty field

Set a condition to check if the value is less than 5 then create an action to send an email.

 

 

 

 

delonge
Regular Visitor

Thanks for your reply!

 

I will not use Sharepoint, so unfortunately this will not help me.

 

To be even more concrete, I will actually import data from an old MS Access DB (basically we are trying to evaluate if it's possible to replace this DB with a powerapp).

 

But one of the requirements is to be able to detect that some data has changed and send an email based on a specific value (e.g.:  quantity < 5 from table Product ? then send email).

 

I don't know if this is achieveable but I appreciate every suggestion !

 

Thanks!

Hello there,

 

You can do this by embedding the Flow into the PowerApp itself. That way, it becomes a function call (just like you would call Navigate() as a function), that you can then put a conditional around.

 

So two routes you could probably take depending on your process.

 

Without diving into the form submission details, at a high level you would need to do something like I've outlined below:

 

1. Assumption: Have a form that captures appropriate information / update to the item.

  • Once submitted, you will need to either return a reference to that item in the DB from your gallery, or do a lookup to get the item info. I won't focus on this because there are many ways to do this depending on the process flow.

 

2. With that, go ahead and create a new Flow from scratch. You'll see a screen similar to the one below.

3. You can then go about adding a basic email connector (I'm using o365 Outlook for no particular reason) and set some basic info.

As you will see, you can start to "Ask in Powerapps" for relevant field information. I set my Email like below so that we can capture the body information and the subject.

 

4. Once set, save the flow and return to your PowerApp. Let 's go ahead and add the Flow to the PowerApp now.

 

and then add the Flow you created:

 

5. After adding, you can see that it will give you intellisense for the properties that we asked for in the Flow when we were creating it.

With this function, you can then put logic around it to say whether or not we need to send an email like I've outlined.

 

 

Hope this helps!

Thank you so much for your detailed explanation!!! 🙂

It really helps and I think this might work.

 

Just need to install the powerapp windows application because I don't see how to add the flow in the powerapp editor when using the application through a web browser.

  

Anyway, thank you for your answer, I will try this and let you know if it works for me!

 

 

Hi stormea,

 

Your solution worked for me!

Thank you very much for the detailed solution you provided 🙂

 

Regards.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,171)