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 / Issues with Multiple a...
Power Automate
Answered

Issues with Multiple attachements to email using array with OneDrive For Business.

(0) ShareShare
ReportReport
Posted on by 51

I'm creating a flow that will send multiple attachments from my onedrive for business account. I've found threads similar to mine and followed through with the solutions but am falling short on getting this to work once it tries to send.  Each attachment has data.

flow1.PNG

Here is the Flow

Flow2.PNG

 

 

Error occurs when Email is being Sent:

 

{
 "status": 400,
 "message": "No input parameters provided. Please provide required input parameters 'To', 'Subject' and 'Body'.\r\nclientRequestId: 07fde98a-7f5a-4a19-9846-a391b50567df",
 "error": {
 "message": "No input parameters provided. Please provide required input parameters 'To', 'Subject' and 'Body'."
 },
 "source": "office365-wus.azconn-wus-01.p.azurewebsites.net"
}

 

 

 

What do you think is going on ?

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @SPOFLOW 

     

    See this post

     

    https://powerusers.microsoft.com/t5/General-Power-Automate/Multi-attachment-email-Error/td-p/369305

     

    Make sure use

    "ContentBytes": base64(filecontentdynamiccontent)

     

    Thanks

  • efialttes Profile Picture
    14,756 on at
    Hi!
    "Please provide required input parameters 'To', 'Subject' and 'Body'"
    So... the problem is not the attachments, right?
    Hope this helps
  • SPOFLOW Profile Picture
    51 on at

    When I tried that and pressed the "ok" button, i get the error "The Expression is invalid.

     

    flow3.PNG

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @SPOFLOW 

     

    Let me run my flow. Let you know soon.

     

    Thanks

  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @SPOFLOW 

    So the issue is you are not showing the correct dynamic mappings?

     

    The base64 should solve this.

     

    Here is my test flow.

     

    image.png

     

    See the expression I set.

     

    base64(body('Get_file_content_using_path_2'))
     
    You need to set the right name of your Get File Content using path.
     
    Here is my run result
     
    image.png
     
    Thanks
  • SPOFLOW Profile Picture
    51 on at

    getting error

    flow4.PNG

    my scripts look like this:

    flow5.PNG

     

    my expression for this one is  

    base64(body('VP EQ-Weekly TC Report-contents'))
     

     

     

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @SPOFLOW 

     

    Hi @SPOFLOW ,

     

    We are getting closer now 🙂

     

    Inside your expression use underscores for the spaces of your variable name.

     

    VP_EQ-Weekly_TC_Report-contents

     

    base64(body(VP_EQ-Weekly_TC_Report-contents))

     

    Let me know how it goes.


    Thanks

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @SPOFLOW ,

     

    We could find the solution to this issue in the comment of this blog:

    https://flow.microsoft.com/en-us/blog/multiple-attachments-single-email/

    You could click peek code to get the expression of the file content and add .$content after it.

    34.PNG35.PNG

    Expression reference:

    body('VP_EQ-Weekly_TC_Report-contents').$content

    Please take a try again.

     

    Best Regards,

  • Suggested answer
    MC-31071729-0 Profile Picture
    2 on at
    Can you please try use below JSON while appending the value to AttachmentArray variable. It worked for me for different file attachments in one single email.
     
     
    Suggested JSON:
     
    {
        "Name": "@{items('Apply_to_each')?['DisplayName']}",
        "ContentBytes": {"$content":"@{body('Get_attachment_content')['$content']}",
        "$content-type":"@{body('Get_attachment_content')['$content-type']}" }
    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard