Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Governance and Administ...
Answered

Upload files to SharePoint Site from Powers apps

(0) ShareShare
ReportReport
Posted on by 8

image.png

Estoy trabajando en una aplicación Powers que requiere que tome un archivo adjunto y lo guarde en un sitio de SharePoint. Tengo la siguiente fórmula en un botón la cual genera el error que se muestra en la imagen.

Categories:
  • Verified answer
    v-yueyun-msft Profile Picture
    on at
    Re: Upload files to SharePoint Site from Powers apps

    Hi ,  @Jhon_Mario 

    Thanks for your response , can you try to use this code:

    UploadfilesTest.Run( Last(DataCardValue89_1.Attachments).Name;{  file: {
                        contentBytes: Last(DataCardValue89_1.Attachments).Value;
                        name: Last(DataCardValue89_1.Attachments).Name
                    } }
             )

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

  • Jhon_Mario Profile Picture
    8 on at
    Re: Upload files to SharePoint Site from Powers apps

    I really appreciate your help.

    I did as you told me but the error still continues.

    Jhon_Mario_0-1718207477974.png

     

  • v-yueyun-msft Profile Picture
    on at
    Re: Upload files to SharePoint Site from Powers apps

    Hi , @Jhon_Mario 

    Thanks for your response! You need to check if your first parameter is Text in your Power Apps side:

    vyueyunmsft_0-1718161814344.png

     

    If this , you can use this expression in your Power Apps:

    UploadfilesTest.Run( Last(DataCardValue89_1.Attachments).Name,{ file: {
     contentBytes: Last(DataCardValue89_1.Attachments).Value,
     name: Last(DataCardValue89_1.Attachments).Name
     } }
     )

    It can work good in my side:

    vyueyunmsft_1-1718162320873.png

     

    My expression separator here is a comma, which you can modify if it's a semicolon in your language, it may be this:

    UploadfilesTest.Run( Last(DataCardValue89_1.Attachments).Name;{ file: {
     contentBytes: Last(DataCardValue89_1.Attachments).Value,
     name: Last(DataCardValue89_1.Attachments).Name
     } }
     )

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

  • Jhon_Mario Profile Picture
    8 on at
    Re: Upload files to SharePoint Site from Powers apps

    Jhon_Mario_0-1718138360339.png

     

  • v-yueyun-msft Profile Picture
    on at
    Re: Upload files to SharePoint Site from Powers apps

    Hi , @Jhon_Mario 

    Thanks for your response!

    Can you show me your Power Apps V2 trigger input's parameter in your flow?

    If your input is File type,, you need to deliver the record type in Power Apps Button as the Parameter :

    {

                    file: {

                        contentBytes: xxxx,

                        name:  "xxxx"

                    }

     }

    Solved: Trigger PowerApps (V2) & File - Power Platform Community (microsoft.com)

    Sorry it seems i have leak the {} in the code , can you try to use this code:

    Set(_VFlow;
        VargeFacturacionExamenesV2.Run({
            file: {
                        contentBytes: Last(DataCardValue89_1.Attachments).Value;
                        name: Last(DataCardValue89_1.Attachments).Name
                    } };
             Last(DataCardValue89_1.Attachments).Name
       )
    )

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • Jhon_Mario Profile Picture
    8 on at
    Re: Upload files to SharePoint Site from Powers apps

    Thanks for your support.

    I already tried as you indicated and it generated another error.

    The name is invalid. “file” is not recognized.

    Unexpected characters. The formula contains "Error" where "ParenClose" was expected.

    Unexpected characters. Characters are used in the formula unexpectedly

     

    Jhon_Mario_0-1717765349588.png

     

  • v-yueyun-msft Profile Picture
    on at
    Re: Upload files to SharePoint Site from Powers apps

    Hi , @Jhon_Mario 

    Dose your trigger parameter is "File" type in your flow.

    If this , you can try to use this code:

    Set(_VFlow;
     VargeFacturacionExamenesV2.Run(
     file: {
     contentBytes: Last(DataCardValue89_1.Attachments).Value,
     name: Last(DataCardValue89_1.Attachments).Name
     };
     Last(DataCardValue89_1.Attachments).Name
     )
    )

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Featured topics