cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PEAMBL
New Member

Send approval e-mail to multiple users and different attachments based in an excel table

Hi,

 

I want to create an approval flow using the data of an excel table from sharepoint and update this table according of the response (approved/declined) .

 

The table that I mention have this structure:

 

CountryDate

Status

Attachment

Country 1 

01/01/2019

Charged

URL 1

Country 2

01/01/2019

Charged

URL 2

Country 3

01/01/2019

Charged

URL 3

 

And I have a different approval responsable for each country.  

 

Country 1 - Ana

Country 2 - Maria

Country 3 - Jose

 

I need the flow start when this table get new rows or is updated. The idea is send an approval e-mail to the respective responsable. For example if i get  data rows for 3 countries, the flow have to sent 3 e-mails to the responsables(Ana,Maria and Jose) . And include in this e-mail the respective attachment (Using column with URL) for each country.

Finally, according of the response, the column "Status" of the table have to be update with the result:

 

CountryDate

Status

Attachment

Country 1 

01/01/2019

Approved

URL 1

Country 2

01/01/2019

Declined

URL 2

Country 3

01/01/2019

Approved

URL 3

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @PEAMBL ,

 

Do you want to send an approval email to corresponding approver when the according status is Charged?

 

Please check the following flow configuration for a reference.

 

When working with Excel online connector, there is not trigger could be used for “When a row is created or updated”. So you may need to trigger the flow daily using Recurrence to get the updated rows.

 

In my scenario, I am using Button trigger for testing.

 

Add action List rows present in a table. Note: I am using Filter Query to just filter out items that Status equals to “Charged”. My understanding is that when the status is Charged, they are new rows.

Status eq 'Charged'

 

Add Apply to each and select Value from previous action, then the action Start and wait for an approval.

 

In order to send email to separate approver based on which Country it is, use the following code:

if(equals(items('Apply_to_each')?['Country'],'Country1'),'test4@xxxxx.onmicrosoft.com',if(equals(items('Apply_to_each')?['Country'],'Country2'),'mabel@xxxxx.onmicrosoft.com','test2@xxxxx.onmicrosoft.com'))

 

In the action Update a row, select dynamic Response from approval action for Status field.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi @PEAMBL ,

 

Do you want to send an approval email to corresponding approver when the according status is Charged?

 

Please check the following flow configuration for a reference.

 

When working with Excel online connector, there is not trigger could be used for “When a row is created or updated”. So you may need to trigger the flow daily using Recurrence to get the updated rows.

 

In my scenario, I am using Button trigger for testing.

 

Add action List rows present in a table. Note: I am using Filter Query to just filter out items that Status equals to “Charged”. My understanding is that when the status is Charged, they are new rows.

Status eq 'Charged'

 

Add Apply to each and select Value from previous action, then the action Start and wait for an approval.

 

In order to send email to separate approver based on which Country it is, use the following code:

if(equals(items('Apply_to_each')?['Country'],'Country1'),'test4@xxxxx.onmicrosoft.com',if(equals(items('Apply_to_each')?['Country'],'Country2'),'mabel@xxxxx.onmicrosoft.com','test2@xxxxx.onmicrosoft.com'))

 

In the action Update a row, select dynamic Response from approval action for Status field.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (19,959)