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 / Attachments in Action ...
Power Automate
Answered

Attachments in Action 'Start_and_wait_for_an_approval' failed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

I am trying to attach files(from SharePoint folder) in the action 'Start_and_wait_for_an_approval' referring to this blog  https://powerusers.microsoft.com/t5/Building-Flows/Approve-with-attachment-in-mail/td-p/1482344m
using Array, 
but it seems not applicable to 'Start_and_wait_for_an_approval' and show the error

ngct_0-1670225090699.png

May I know how it is possible to be fixed? Thanks

 

Categories:
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Anonymous 

    could you please also share a picture of your array variable you try to add?

    It says that your JSON is not correct. Before running the "start and wait for an approval" you can add an "Compose" and see the results first. It should be in this structure:

    [
     {
     "name": <name 1>,
     "content": <content1>
     }
    ]

    or with multiple attachments: 

    [
     {
     "name": <name 1>,
     "content": <content 1>
     },
     {
     "name": <name 2>,
     "content": <content 2>
     }
    ]

     

    Does this help you? Otherwise please give me some more information.

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @MarvinBangert ,

     

    Here is the flow how I do the attachments

     

    Do you have any idea how to solve the error? Thanks!

     

    ngct_3-1670307816444.png

     

    ngct_5-1670307885159.png

     

     

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Anonymous 

    within your 'append to array variable' it looks like you are missing some double quotes (") around the 'display name' dynamic value, otherwise it's not interpreted correctly. Also, the "ContentBytes" might not work, please try "content" instead. Around the body dynamic value you don't need any quotes, because you have an object you need to pass in there. This should be the syntex:

     {
     "name": "<display name dynamic content>",
     "content": <body dynamic content>
     }

     

    Does this help you? Otherwise please give me some more information.

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @MarvinBangert, I have modified the syntax like this(tried taken out all quotation marks as well), but still the same error.

     

    Would you have any idea? Many thanks!!!

    ngct_1-1670389274930.png

     

     

    ngct_0-1670389215785.png

     

  • Verified answer
    MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Anonymous 

    please check the approval action where you put in the array.

    MarvinBangert_0-1670498588265.png

    The "Add new item" below your array isn't right it shouldn't display, when you want to enter an array, you need to click on the "switch input icon" (in red square) and then put in your array. So please first delete the array variable from this field, click on the icon so that it looks like this:

    MarvinBangert_1-1670498775871.png

    And then you can put in your array again. Please try then try again. If you have problems, you can also try to delete and readd the approvals action.

     

    Does this help you? Otherwise please give me some more information.

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @MarvinBangert ,

    Thanks for your solution!

     

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