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 / Automate name change o...
Power Automate
Unanswered

Automate name change of the attachment uploaded by PowerApps to Sharepoint List

(0) ShareShare
ReportReport
Posted on by 2

Hi.

I've tried to create a flow to change the original name of an attachment that was uploaded from PowerApp and saved in a sharepoint list but i get this error:

 

"The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@concat(outputs('Get_attachments')?['body/{EmployeeNo}'],'.jpg')' is of type 'String'. The result must be a valid array."

 

My receptionist will use the powerApp to search for the employee name from the existing records in sharepoint list, go to edit, take a photo of the employee and save the record.

The photo will be saved as an attachment in Sharepoint list. I need to rename the attachment to the employeeNo.jpg.

 

elfyelfy_0-1684325792374.png

 

 

Categories:
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @elfyelfy 

     

    One of the solution is to copy content of existing list item attachment & add it with employeeid.jpg as a name. After that, remove the old attachment. Here is the sample flow:

    ManishSolanki_0-1684336116619.png

    ManishSolanki_1-1684336450749.png

     

    If this help, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • elfyelfy Profile Picture
    2 on at

    Hi Manish, 

     

    I've followed your flow. No more errors but the file name doesnt change.

    Notice that I get triggerBody() instead of triggerOutput()??

    elfyelfy_0-1684342083935.png

     

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
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard