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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Upload files to ShareP...
Power Apps
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.

I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    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

     

     

  • Jhon_Mario Profile Picture
    8 on at

    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
    Microsoft Employee on at

    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

    Jhon_Mario_0-1718138360339.png

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    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

    I really appreciate your help.

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

    Jhon_Mario_0-1718207477974.png

     

  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard