web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Invalid number of argu...
Power Apps
Unanswered

Invalid number of arguments: received 1, expected 2

(1) ShareShare
ReportReport
Posted on by 4
I have a flow where I would like to have a trigger from PowerApps (file input) which will start the power automate to create a file in my sharepoint. Now the upload button in my Power Apps have some problems and I am going back and forth. Now it said Invalid number of arguments: received 1, expected 2.
 
Here is the text that i put in the upload button's OnSelect
pow.Run({file:{name: First(attach.Attachments).Name,contentBytes: First(attach.Attachments).Value}})
 
*Pow is my flow and attach is the attachment tools.
 
 
How can I make it able to run? 
 
Update:
I tried to simplify to see the problem and its said Missing column 'contentBytes' with a type of 'Blob'. In automate i already add @{triggerBody()['file']['contentBytes']} in the File content. How to fix?
Thank you in advance.
Categories:
I have the same question (0)
  • NN-27090407-0 Profile Picture
    4 on at
    I tried to simplify to see the problem and its said Missing column 'contentBytes' with a type of 'Blob'. In automate i already add @{triggerBody()['file']['contentBytes']} in the File content. How to fix?
     
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at
    I have just duplicated your Flow as below
    and also ran your exact code with one parameter (the file) and it worked perfectly. Are you doing anything different ?
    pow.Run(
       {
          file: 
          {
             name: First(attach.Attachments).Name,
             contentBytes: First(attach.Attachments).Value
          }
       }
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
     
     
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    You might want to make sure you have the latest flow in your app by refreshing it. This might make your error go away.
    By the looks of it, it looks correct and WarrenBelz has already replicated your solution and it works. 
     
    Hope this helps.
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at
    Just following up to see if you received the answer you needed, or if you require further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard