Introduction

In this article, we will delve into the process of seamlessly uploading files and their associated metadata from PowerApps to a SharePoint library using Power Automate. The following three straightforward steps will guide you through the entire procedure.

Step 1. PowerApps Form

Begin by creating a user-friendly PowerApps form that incorporates an attachment control along with three metadata properties.

Upload

Step 2. Configure Power Automate Flow

Whether integrated within PowerApps or created separately from the Power Automate landing page, set up a flow with the following steps:

Create File Action

Contnet

File content

Update File Properties Action

Dynamic content

Metadata Handling

Metadata handling

Step 3. PowerApps Fx & Integration

In case of errors, carefully review the PowerApps trigger order. Ensure that the values are correctly passed from PowerApps to Power Automate.

Powerapps

Add the following code to the OnSelect property of the upload button:

Button

UploadFiles_To_SP.Run(
    txtCustomer.Value,
    txtProject.Value,
    txtSummary.Value,
    {
        file: {
            contentBytes: First(attachment.Attachments).Value,
            name: First(attachment.Attachments).Name
        }
    }
)

With this implementation, your flow will execute successfully.

Execute

Conclusion

Achieving a seamless file upload and metadata handling process from PowerApps to SharePoint library is simplified into three comprehensive steps. By integrating PowerApps forms, configuring Power Automate flows, and ensuring proper PowerApps trigger order, users can efficiently manage file uploads and associated metadata in SharePoint. This streamlined process enhances user experience and facilitates effective data management.

Happy learning!