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 Automate / Adding properties to a...
Power Automate
Suggested Answer

Adding properties to a file in Sharepoint

(0) ShareShare
ReportReport
Posted on by 16
Hi
 
I have created a canvas app in Power Apps based on Dataverse tables.
In the app it is possible to upload a file from the desktop to Sharepoint using Power Automate.
However - now I would like to add some properties to the file saved in Sharepoint (a reference to find the files relatede to a certain group).
 
On a "upload"-button in Power Apps I have this code in "onselect":
-------------
ForAll(
    DataCardValue226.Attachments;
    Upload_Produkt_Bilag.Run(
        {
            file: {
                contentBytes: ThisRecord.Value;
                name: ThisRecord.Name
            }
        }
    )
)
-------------
 
What should I do to paste eg. the value from gallery1.selected.productnumber in the column with the red circle?
I have tried several solutions, but none of them works for me... (it still loads the file to Sharepoint, but the "productnumber is not loaded to the column)
 
wkr Jørgen
Categories:
I have the same question (0)
  • Suggested answer
    Infamous_Let Profile Picture
    332 Super User 2026 Season 1 on at
    In Power Automate, open your flow (Upload_Produkt_Bilag) and in the Power Apps trigger, add a new Text input—call it something like ProductNumber. Then, after your "Create file" step, add an "Update file properties" action. Use the ID of the created file, and in the properties, map your custom SharePoint column to the ProductNumber input.
     
    Back in Power Apps, just tweak your formula like this:
     
    ForAll(
        DataCardValue226.Attachments,
        Upload_Produkt_Bilag.Run(
            {
                file: {
                    contentBytes: ThisRecord.Value,
                    name: ThisRecord.Name
                }
            },
            Gallery1.Selected.ProductNumber
        )
    )
    

    This way, Power Apps sends the product number along with the file, and Power Automate updates the metadata in SharePoint.
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,191 Super User 2026 Season 1 on at

    In Power Automate—Edit your flow

    Open your flow (Upload_Produkt_Bilag).

    Step A: Receive file and metadata

    Right now you are only passing:

    {
    file: {
    contentBytes: ...,
    name: ...
    }
    }
     

    You also want to pass the ProduktNummer.

    Add an extra input parameter in your flow:

    • ProduktNummer (Text)

    Step B: Create File

    Keep your Create File action as you have it:

    • Folder Path: where you save the file

    • File Name: name

    • File Content: contentBytes

     After this action, you get an Identifier or ItemId output.

    Step C: Update File Properties

    Add a new action:

    SharePoint – Update file properties

    • Site Address: same site

    • Library Name: same library

    • Id:

      • Use Identifier from Create File (dynamic content)

    • ProduktNummer:

      • Use the ProduktNummer input parameter you just added

    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

  • CU14081108-3 Profile Picture
    16 on at
     
    I have now added this parameter to my flow:
     
    I have added this action (update file properties):
    In the app I have added this yellow part to the onselect...
     
    As you can see there is something wrong... But what is it...? (it works fine, when testing the flow in Power Automate, so it must be something with in the command...
     
    Wkr Jørgen

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 410

#2
Vish WR Profile Picture

Vish WR 289

#3
David_MA Profile Picture

David_MA 282 Super User 2026 Season 1

Last 30 days Overall leaderboard