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 / Cannot retrieve a list...
Power Automate
Answered

Cannot retrieve a list of several attachments' names from a Gmail or OneDrive

(0) ShareShare
ReportReport
Posted on by 18

Hello and thank you in advance to everybody reading this.

 

I'm using basically the flow "Gmail attachments to OneDrive" and I'm just trying to add a final step where I receive a mobile notification with just the name of the file added to OneDrive. My problem is that if there are for instance 3 files attached to that email I get 3 different notifications, one for each file.

 

Is there a way to get just one notification with a list of the names of the files added?

 

First, I tried using the Gmail connector "Attachments" but automatically it was put in an "Apply to each" container and I'm not sure if that was the problem.

 

In my second try I used an intermediate step to set the OneDrive connector "List files in folder" and I keep having the same results.

kosamuky_0-1667639187792.png

 

Thank you for your help!

Categories:
  • JonDoesFlow Profile Picture
    1,304 on at

    Yes. You could initialise an array variable, and then in the apply to each use the Append to an array, and then choose the file name and then use that variable in the notification step. 



    ---------------------------------------------------------------------------


    If I have helped you with an answer, please accept this post as a solution and thumbs up my reply. Thanks !

    Blog - JonDoesFlow
    Twitter - JonDoesFlow
    YouTube - JonDoesFlow

  • kosamuky Profile Picture
    18 on at

    Thank you for your reply, Jon.

    I have been trying to do what you say but 'm not really able to understand it. I guess I forgot to mention I'm not a programmer.

    If you could explain it again with other words, I will be more than happy, if not I will keep trying to understand this better.

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    I don't have the Gmail connector setup but used the Outlook connector as an example. I would assume they are almost identical.

     

    I would use a Select action taking in the attachments from your trigger and using Attachment Name to extract out the name for each one. This would give me an array of attachment names.

     

    I would then take that output and use a Join to join all the attachment names by comma or semi-colon.

     

    grantjenkins_0-1667656295629.png

     

    If I had three attachments with the following names:

    • Test 01.docx
    • Test 02.docx
    • Test 04.pdf

     

    My output from the Select would be:

    [
     "Test 01.docx",
     "Test 02.docx",
     "Test 04.pdf"
    ]

     

    And the output from the Join using a comma to separate the names would be:

    Test 01.docx,Test 02.docx,Test 04.pdf

     

  • kosamuky Profile Picture
    18 on at

    It worked! So easy!!

    Thank you so much!! 

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 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard