Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

(0) ShareShare
ReportReport
Posted on by 10

Hi, 

 

I have a approval flow for form response, where i am requesting for attahment, however when i run the flow i am getting this error: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

Any idea how to solve it?

 

Thanks! 

 

  • Uday21 Profile Picture
    27 on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    Hi,

     

    This is resolved by adding "Get File Content".  So please don't bother. 

     

    Thanks,

    Uday

  • Uday21 Profile Picture
    27 on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    This is the error in the flow.

     

    Error PA1.png

     

  • Uday21 Profile Picture
    27 on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    Please find the screenshot. 

    PA error.png

     

  • Uday21 Profile Picture
    27 on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    Hi,

    I am facing the same issue.  And the the solution given to use "base64(body('get_file_content_using_path'))" from the expression is not available there.  Only base64(value), base64ToBinary(value) and base64ToString(value) are only available.  I have created a multi level approval flow and I wanted attachments to be part of the email.  And when i run I am getting the above error.  I wanted to attach the snapshot but I am not able to attach the same here as the interface for insert/edit image is bit confusing as it not taking any path.

     

    Regards

    Uday

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    Hi @ON13,

     

    Send a notification email with attachments is available, however, you should convert it to base64 code, for example:

    Annotation 2020-04-08 182422.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • ON13 Profile Picture
    10 on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    Hi @v-litu-msft 

     

    the error was showing because i was trying to add attachment in the email notifications that should go for the assigned to. however once i just added the attachment link (using parse json). the issue was resolved. i already updated the flow, so i can not show it to you. 

    however does that mean that adding attachment as an item and sending it to an emailcannot be done? as there was no problem with the extension.

     

     

  • v-litu-msft Profile Picture
    on at
    Re: BadRequest. The request failed. Error code: 'InvalidAttachmentName'. Error Message:

    Hi @ON13,

     

    If the error is "InvalidAttachmentName", it may be caused by the extension of the file is incorrect, please make sure it is a valid extension.

    You could share the error information and your Flow configuration.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow