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

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 Moderator 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 105 Most Valuable Professional

#2
Haque Profile Picture

Haque 77

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard