cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (32,306)