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 Apps / Email attachment- Inva...
Power Apps
Unanswered

Email attachment- Invalid number of Arguments, received 6, expecting 3-4

(1) ShareShare
ReportReport
Posted on by 4

I am new to working with power apps and am trying to add an attachment to my email using an attachment control, I am also trying to use the email addresses off of a list that is attached to the main gallery. 

 

Office365Outlook.SendEmailV2(EmailPeopleGallery1, TextEmailSubject1.Text, RTEBody.HtmlText,
{Cc:"***@***.com},
{Attachments: AddColumns( RenameColumns(AttachedLEM.Attachments,"Value", "ContentBytes"), "@odata.type", "") },
{Importance:"Normal"});

Reset(TextEmailSubject1);
Reset(RTEBody);
Reset(EmailPeopleGallery1);

 

I keep getting "Invalid number of Arguments, received 6, expecting 3-4' 

it is also not liking my choice for EmailPeopleGallery as an option to get email addresses. 

 

Thanks

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @SilverStorm777 

    That's because you pass 6 arguments. The signature is 3 arguments, or 4, like this:

    poweractivate_0-1692238975246.png

    So in your case, try something like the below formula instead:

    Office365Outlook.SendEmailV2(
     Concatenate(ForAll(EmailPeopleGallery1.AllItems, EmailAddress & ";")),
     TextEmailSubject1.Text,
     RTEBody.HtmlText,
     {
     Cc: "***@***.com",
     Attachments: AddColumns(RenameColumns(AttachedLEM.Attachments, "Value", "ContentBytes"), "@odata.type", ""),
     Importance: "Normal"
     }
    );
    
    Reset(TextEmailSubject1);
    Reset(RTEBody);
    Reset(EmailPeopleGallery1);
    

    See if it helps @SilverStorm777 

     

  • SilverStorm777 Profile Picture
    4 on at

    Apparently I am having more issues then I thought I was. Its not liking the email address command so maybe I wasn't correct with that to start with. My gallery contains project work orders that the tech has completed through the app and saved to a SharePoint list. I want to be able to pull the associated email addresses of that gallery record (work order) of that work order if possible.

     

    And I thought my attachment control was working but doesn't appear so. I was told I could have the control pull from a SharePoint doc library where the work order get saved to, utilizing the pdf generator I created a flow that created and compressed the pdf and could not get it to attach to the appropriate record, it would just create a new record which I didn't want, so with the limited knowledge I have with this saved it to a doc library and connected that to the attachment control. 

     

    SilverStorm777_0-1692289844009.png

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard