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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How do in reference ou...
Power Automate
Answered

How do in reference outside of a for each loop

(2) ShareShare
ReportReport
Posted on by
How do I reference outside of a for each loop. I am trying to get file content in compose to use subsequently in my flow. 
See attached images:
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,452 Super User 2025 Season 2 on at
    Hi,.
     
    Apologies, to just get Clarity.
     
    You have a For Each, and you are getting the File Content, and you want to be able to use it later on correct?
     
    You need to create An Array Variable, Right after your Trigger (When a new email arrives (v3)
    Then inside your For Each add an Append to Array Variable Action and do the following to get the Name and Contents.
     
    Now you can access them later on
     
    Cheers
  • CU23080740-4 Profile Picture
    on at
    This worked. Thank you.
     
    But now i am faced with a new problem the data comes like this [ { "ForEachLoopData": { "$content-type": "application/octet-stream", "$content": "c2VwPSwNCiJS……….." } } ] . How do I now convert the data in $content in base64 which is the actual body of the CSV to string for further use donwstream in the flow?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard