cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VGoncalves
Frequent Visitor

Get link from Apply Each

I have a flow that send an approval email that as a link of an CSV.

 

Because the email can be sent from other users, i found out that i have to find the file in folder of the user first, so i can create the share link

 

This is my flow

VGoncalves_0-1609338481326.png

 

But now how can i put the Web URL link on my email? My flow created an action "Apply to each", that doesnt let me have the dynamic Web URK on my dynamic options.

 

can you help me

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

initialize a variable at the top of the flow.  Inside the loop when you create the sharing link save it to the variable.  Once you exit the loop the variable will have the link you need.  If you need to save multiple links create the variable as an array and append the link to the array inside the loop.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

View solution in original post

To initialize a variable use the Initialize Variable action.  Give it a name and specify the type String or array depending on what you need.  For Two or more URL you'll need an array.

image.png

Then inside the loop there are actions for either setting or appending to a variable.  Use those to set the value of the string or append another value to the array.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User
Dual Super User

initialize a variable at the top of the flow.  Inside the loop when you create the sharing link save it to the variable.  Once you exit the loop the variable will have the link you need.  If you need to save multiple links create the variable as an array and append the link to the array inside the loop.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Thank you for you reply @Pstork1 , but can you help further? Im really a newbie on this. How do i inatialize a variable? I have to 2 links. 

Thank you again

To initialize a variable use the Initialize Variable action.  Give it a name and specify the type String or array depending on what you need.  For Two or more URL you'll need an array.

image.png

Then inside the loop there are actions for either setting or appending to a variable.  Use those to set the value of the string or append another value to the array.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Oh i get it! Great 🙂

 

Just one more question, how do i call the variable on the email?

 

Thank you for the explanation 😄

When doing the body of the email the variable should be available in the dynamic content.  If you have added them to an array it will be a bit more difficult because using them directly will try to add an apply to each loop and give you multiple emails.  You can take the array and convert it to an HTML table (there is an action for that) and then insert the table into the email.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Thank you so much for you help, i can manage now 🙂

 

Happy New year 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,250)