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 / Cannot send file from ...
Power Apps
Answered

Cannot send file from Attach Control to flow on Power Automate

(0) ShareShare
ReportReport
Posted on by 2

I've followed more than 10 tutorials and think have all ok, but doesn't work.

I've created an attachment control and a button, when click button Run a flow that get attachment and write to Sharepoint.

 

 

I have this code on button:

 

Subir_fichero_hash.Run({file:{contentBytes:First(AttachCard.Attachments).Value; name:First(AttachCard.Attachments).Name}})

 

and get the errors:

1. The function 'Run' has some invalid arguments. (on flow.Run).

2. Unexpected characters. The formula contains 'Semicolon' where 'CurlyClose' is expected.

3. Invalid argument type (Error). Expecting a Record value instead.

4. Name isn't valid. 'name' isn't recognized.

5. Unexpected characters. The formula contains 'Colon' where 'ParenClose' is expected.

6. Unexpected characters. Characters are used in the formula in an unexpected way.

 

Have try with comma too (i'm on Spain and may use semicolon but for try).

 

Subir_fichero_hash.Run({file:{contentBytes:First(AttachCard.Attachments).Value, name:First(AttachCard.Attachments).Name}})

 

 

And then i get that errors:

1. The function 'Run' has some invalid arguments.

2. Missing column. Your formula is missing a column 'contentBytes' with a type of 'Blob'.

 

I think the problem is on comma/semicolon. I've set Powerapps language to English but nothing.

 

What can try or change for make it work?

Categories:
I have the same question (0)
  • Verified answer
    Inogic Profile Picture
    1,135 Super User 2025 Season 2 on at
    Hi,
     
    Based on our understanding, you are encountering an error while uploading an attachment in the app. Below is a formula you can try on your end, along with a screenshot of the Power Automate flow:
    In our scenario, we are uploading multiple files using the following approach:

    ForAll(
        AttachmentControl.Attachments As file,
        Collect(
            collectResult,
            ImportFileInsharepoint.Run(
                varFolderPath,  // Pass the folder path
                {
                    contentBytes: file.Value,  // Pass file content as contentBytes
                    name: file.Name  // Pass file name
                },
                file.Name
            ).response
        )
    );




    Thanks!
    Inogic

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 765 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 272

Last 30 days Overall leaderboard