Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Looping through Object variable

(0) ShareShare
ReportReport
Posted on by
 
 
Hi All,
 
I am trying to create a flow that groups and emails files in a Sharepoint folder. The file names contain email addresses and if an email address appears more than once I want to group those files and send them in a single email. I am at a point where I currently have an object variable with the following schema -
 
{
    "type": "object",
    "items": {
        "type": "object",
        "properties": {
            "email": {
                "type": "string"
            },
            "fileIdentifier": {
                "type": "string"
            }
        },
        "required": [
            "email",
            "fileIdentifier"
        ]
    }
}

It is an Object as this made appending the file identifier to an existing record simpler. I was hoping I would then be able to loop through each record and get get the email, I am left with an object variable that looks like this-
 
{
    "fdgdf@domain": "HRASWFR-HR1.6%252fManagement%2bInformation%252fTOPS%2bReports%252fDirectorate%2bReports%2bfor%2b2024-2025%252fApril%2b2024%252fAdult%2bSocial%2bCare%2b%2526%2bHealth%252f40dY%2bYTD%2b-%2bAdult%2bSoc%2b-%2bAdult%2bSocial%2b-057%2b-%2bJim.Beale%dfs.sf.uk.xls",
    "julifdgdfge_agbo@domain": "HRASWFR-HR1.6%252fManagement%2bInformation%252fTOPS%2bReports%252fDirectorate%2bReports%2bfor%2b2024-2025%252fApril%2b2024gcial%2bCare%2b%2526%2bHealth%252f40dY%2bYTD%2b-%2bAdult%2bSoc%2b-%2bAdult%2bSocial%2b-192%2b-%fdsf.agfsdfbo%fdsfds.net.xls",
    "gdfg@domain": "HRASWFR-HR1.6%252fManagement%2bInformation%252fTOPS%2bReports%252fDirectorate%2bReports%2bfor%2b2024-2025%252fApril%2b2024%252fg%2b%2526%2bHealth%252f40d%2b-%2bAdult%2bSoc%2b-%2bAdult%2bSocial%2b-001%2b-%f.sdfds-%fsdf.fov.fs,HRASWFR-HR1.6%252fManagement%2bInformation%252fTOPS%2bReports%252fDirectorate%2bReports%2b-%2b.uk.xls",
   "fdgdf@domain": "HRASWFR-HR1.6%252fManagement%2bInformation%252fTOPS%2bReports%252fDirectorate%2bReports%2bfor%2b2024-2025%252fApril%2b2024gCare%2b%2526%2bHealth%252f40dY%2bYTD%2b-%2bAdult%2bSoc%2b-%2bAdult%2bSocial%2b-464%2b-%fdsf.TRAVERS%fdsf.fdf.ffd.xls",
    "gfd@domain": "HRASWFR-HR1.6%252fManagement%2bInformation%252fTOPS%2bReports%252fDirectorate%2bReports%2bfor%2b2024-2025%252fApril%2b2024%25gre%2b%2526%2bHealth%252f40d%2b-%2bAdult%2bSoc%2b-%2bAdult%2bSocial%2b-371%2b-%2,HRASWFR-HR1.6%fdsf%2bInformation%252fTOPS%2bReports%sdfds%2bReports%2bfor%2b2024-2025%252fApril%2b2024%252fAdult%2bSocial%2bCare%2b%2526%2bHealth%2.xls"
}
 
Unfortunately it seems that I can't loops through the variable in the same was as an array - Parse Map is the Object I want to loop through. Parse-All is a parsed array which lets me loop through the properties however the file identifiers are in separate records

I would really appreciate some advice on how I could extract the emails (keys) from the object and then get the file content for the identifiers (values). I have been trying to convert the object to an array or figure out how to build an array that updates identifiers for existing emails with little luck.
 
 
Categories:

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard