cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rssilvaba
Resolver II
Resolver II

getting sharepoint file content using path from array config

Hi All,

I just need to create a flow that sends an email weekly all data and images are variable and since this need to work on the outlook client I need to embed most of the assets (let me know if you know other ways around that).

So I have an array with the relative path of all assets that the email might use.
[{"name":"logo","path": "/fakepath/assets/logo.png"}]

What I wanted is to either, add a content prop with the file content value or create an object and append to a new array with the result but keeping the name prop. ex from above: 
Original modified array [{"name":"logo","path": "/fakepath/assets/logo.png", "content": "fakecontent"}]
or
New array [name:"logo", content: "fakecontent"]

I found some articles but I did not understand yet how to update a existing array or append an object to the new array.
This is the error I keep getting:

 

rssilvaba_0-1617279915303.png

here is the formula: 

addProperty(items('EachAssetConfig'),'content',outputs('EachAssetConfig')?['body'])

 


Thank you all.

1 ACCEPTED SOLUTION

Accepted Solutions
rssilvaba
Resolver II
Resolver II

Hi,
I referred the wrong outputs.
here is the correct formula:
addProperty(items('EachAssetConfig'),'content',outputs('Get_file_content_using_path')?['body'])

 

now it works.

View solution in original post

1 REPLY 1
rssilvaba
Resolver II
Resolver II

Hi,
I referred the wrong outputs.
here is the correct formula:
addProperty(items('EachAssetConfig'),'content',outputs('Get_file_content_using_path')?['body'])

 

now it works.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (4,465)