cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattP13
Resolver I
Resolver I

Dynamically Extract SharePoint File Paths from Array and embed into Email

Upon creation of SharePoint files (Images stored in the library), I have the paths of the images appended to an array.

I want to be able to extract each path and embed into an email.

I've gotten this to work with just 1 element of the array, stuck on how to get it to work with multiple elements. This needs to be dynamic, so anywhere between 1-3 images can be stored into the array during a flow execution.

What would be the best way to go about this?

 

See images of my flow below:

 

Expanded Flow 1of 2:

Capture1.PNG

 

Expanded flow 2 of 2:

Capture2.PNG

 

Current Result of Appended Array:

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
MattP13
Resolver I
Resolver I

I managed to find a solution to this problem, it may not be the cleanest but it works.

In the send email step (Final step of the flow (not pictured in my previous uploaded images) ) I simply added more than 1 variables expression with the last 2 containing the "?" symbol for the last 2 elements of the array as shown below:

 

variables('SPImageID')[0]
variables('SPImageID')?[1]
variables('SPImageID')?[2]
 
This result in displaying however many embedded images in the email as there are elements in the array. 
This may not be the best solution if users and upload many images, at that point I'd be looking into attachments rather than embedding the images.

View solution in original post

2 REPLIES 2
MattP13
Resolver I
Resolver I

Bump

MattP13
Resolver I
Resolver I

I managed to find a solution to this problem, it may not be the cleanest but it works.

In the send email step (Final step of the flow (not pictured in my previous uploaded images) ) I simply added more than 1 variables expression with the last 2 containing the "?" symbol for the last 2 elements of the array as shown below:

 

variables('SPImageID')[0]
variables('SPImageID')?[1]
variables('SPImageID')?[2]
 
This result in displaying however many embedded images in the email as there are elements in the array. 
This may not be the best solution if users and upload many images, at that point I'd be looking into attachments rather than embedding the images.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,190)