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 / Export to PDF - On Sel...
Power Apps
Unanswered

Export to PDF - On Select Button

(0) ShareShare
ReportReport
Posted on by

Hi, 

I am new at Power Automate flows and I am trying to export Power Apps data to PDF including Images. I am following the tutorial from Reza Dorrani, Power Apps Export to PDF - YouTube, the last part of the video "Export Power Apps data to PDF including Images" describing what I would like to achieve.

 

I built my flow "ExportPDFItem" in the exact same way than in the video, I just added a compose action with the UserEmail. After using the flow checker, I do not see any errors.

However, when coming back to Power Apps, I tried to configure the OnSelect of my "Export to PDF" button and get the following issue:

Invalid number of arguments: received 1, expected 5

 

The OnSelect button is currently:

ExportPDFItem.Run(User().Email);

Notify("Report successfully sent", Success)

 

Any idea on why I get this issue and how to fix it? Thanks a lot in advance for the help!

 

Attached, I added screenshots of my flow.

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Try disconnecting and then reconnecting your ExportPDFItem flow to your app. This will force the app to re-read the schema for your flow and sort out the expected number of arguments. You will need to provide an argument for each required field in your PowerApps trigger in the flow, and consider changing it to the V2 trigger.

    Hope that helps,

    Bryan

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Marine_C ,

     

    Can you please share the detailed view of your trigger in Power Automate to show which parameters are expected?

  • CU15061124-0 Profile Picture
    on at

    Hi, 

    Thanks a lot for the replies! I tried to connect/reconnect the flow but still the same error, it indeed seems that the issue is coming from an invalid number of arguments. I now provide only the User().Email, while it expects 5 in total. 

    I checked again my flow but I don't see which arguments I need to add in my code, here is my complete flow:

    Marine_C_0-1660110266347.png

    Marine_C_1-1660110286768.png

     

    My UserEmail_Inputs is used in the Send an email V2 and the ItemID in the SharePoint Get Item and SharePoint Get attachments. 

    The "Array Images""and "Counter" are to retrieve the attachments, I set them up like in the video, same for the "Apply to each":

    Marine_C_3-1660110714125.png

     

    In the current code I am using in my PowerApps:

    Marine_C_2-1660110471167.png

    I indeed refer only to the User().Email and not the ItemID_Inputs but I am wondering how to implement it. But, it will mean I have 2 arguments, not 5 as mentioned in the error...

     

    When checking my flow and the dynamic content of the compose operation, I see below "Ask in PowerApps" a list of Inputs: Compose_Inputs, Compose_Inputs_1, UserEmail_Inputs, UserEmail_Inputs1, ItemID_Inputs, Body but I am using only two of them... so I don't really understand the error.

  • PaulD1 Profile Picture
    2,914 on at

    If you add an 'Ask In Power Apps' value, the Flow will ask for that as a parameter. If you remove the 'Ask In Power Apps', Flow will still ask for it as a parameter. There is no way I know of to remove the parameter as it gets buried somewhere in the Flow's metadata that is not user-accessible editable (you may be able to see it in Code View). This is a long standing bug (though I am sure it is considered a 'feature'). You can pass any rubbish you like, as long as it matches the data type, for the parameters you are not using.

    If you want to only have the two parameters I believe you will need to rebuild your Flow from scratch and be careful to never add another 'Ask In Power Apps' parameter by accident.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @Marine_C , 

     

    In any case there's some incongruence as the displayed trigger doesn't show any required information, yet you are trying to push a parameter, so:

     

    The number of parameters the flow visual shows it needs: 0

    The number of parameters you think the flow needs: 1

    The number of parameters the flow thinks it needs: 5

     

    @PaulD1 : Wouldn't it suffice to remove the trigger from the flow and then adding it back (or to use V2 at least)?

  • CU15061124-0 Profile Picture
    on at

    Hi, 

    I just rebuilt the flow and indeed, from the error "Invalid number of arguments: received 1, expected 5" I now have "Invalid number of arguments: received 1, expected 2".

     

    What is not clear for me, also from the video from Reza, is how he calls the "ItemID_Inputs" parameter he created at the beginning of the Flow in his code in PowerApps. 

    Because currently, I am only calling UserEmail_Inputs in my code with FlowName.Run(User().Email)

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard