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 / Upload files to ShareP...
Power Apps
Unanswered

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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard