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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Flow failing at get the attachment section

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm getting this error:

 

Unable to process template language expressions for action 'Apply_to_each-_SP_Attach' at line '1' and column '83072': 'The template language expression 'body('Get_attachments')?['body']' cannot be evaluated because property 'body' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

I've used the 'id' in 'Get attachments' and 'get attachment content' from ask in PowerApps.

 

DanielRK_0-1617191478154.png

 

More detail= here:

 

DanielRK_1-1617191483657.png

 

'DisplayName' is: 

DanielRK_2-1617191641755.png

 

'$Content' is:

DanielRK_3-1617191677162.png

 

Have I written the expressions wrong?

 

Thanks again for your help!

 

Regards,

 

Daniel

 

 

I have the same question (0)
  • Mira Ghaly Profile Picture
    11,409 Moderator on at
    Re: Flow failing at get the attachment section

    @Anonymous 

     

    Please use below:

    Display Name:

     

    items('LoopName')?['DisplayName']

     

    Content

     

    outputs('Get_attachment_content')?['body']

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow failing at get the attachment section

    Hi @Mira_Ghaly ,

     

    Thank you for your swift answer. Here's failing on the apply to each loop. From what I can tell it's saying it wants and integer index but I don't know what this is or how to solve it.

     

    DanielRK_0-1617192650906.png

     

    The trigger of the flow is a powerapp button and the users can attach attachments in the powerapps. The datasource is Sharepoint online.

     

    Also, the attachment being called is the one captured in the powerapps on the submission of the form.

     

  • Mira Ghaly Profile Picture
    11,409 Moderator on at
    Re: Flow failing at get the attachment section

    @Anonymous 

    I have the same flow , Can you please open the Get Attachments from History and check the raw outputs

    Mira_Ghaly_0-1617193456031.png

     

  • Verified answer
    Mira Ghaly Profile Picture
    11,409 Moderator on at
    Re: Flow failing at get the attachment section

    @Anonymous 

     

    Try Passing below expression to your array Input

    Mira_Ghaly_0-1617193731825.png

     

    outputs('Get_attachments')?['body']
  • Community Power Platform Member Profile Picture
    on at
    Re: Flow failing at get the attachment section

    Hi @Mira_Ghaly ,

     

    I tried the expressions you said but I get the same result.

     

    DanielRK_0-1617195036574.png

     

     

    I did check the raw outputs of the get attachments file and there is only one attachment.

     

    Do I have to add something after ?['body'] in the expression like the ID?

     

    So like this ?['body']?['ID'] or am I wrong?

     

    Thank you again.

     

    Regards,

     

    Dan

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow failing at get the attachment section

    Hi @Mira_Ghaly ,

     

    Thank you so much! It worked!.

     

    Regards,

     

    Daniel

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard