cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Resolver I
Resolver I

Re: Dynamically Extract SharePoint File Paths from Array and embed into Email

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
Highlighted
Resolver I
Resolver I

Re: Dynamically Extract SharePoint File Paths from Array and embed into Email

Bump

Highlighted
Resolver I
Resolver I

Re: Dynamically Extract SharePoint File Paths from Array and embed into Email

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,421)