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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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 on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (10,095)