web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / getting sharepoint fil...
Power Automate
Answered

getting sharepoint file content using path from array config

(0) ShareShare
ReportReport
Posted on by 160

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.

Categories:
  • Verified answer
    rssilvaba Profile Picture
    160 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard