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 Platform Community / Forums / Power Automate / Issues with Multiple a...
Power Automate
Unanswered

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,856 Most Valuable Professional on at
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

    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
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.
    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
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

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

     

    flow3.PNG

  • abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

    Hi @SPOFLOW 

     

    Let me run my flow. Let you know soon.

     

    Thanks

  • Verified answer
    abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

    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
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

    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,856 Most Valuable Professional on at
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

    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
    on at
    Re: Issues with Multiple attachements to email using array with OneDrive For Business.

     

    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
    Issues with Multiple attachements to email using array with OneDrive For Business.
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard