Following on from this post https://chrismvnro.com/use-an-ms-form-to-create-a-dataverse-record-and-store-documents-in-sharepoint/.

In this post are the specific steps to use a Power Automate Flow to associate a file to a Dataverse record using SharePoint document storage.

  1. Initialize a variable for the SP destination

2. Add a Dataverse record- we will store a document against this in SharePoint

3. List the Document Location row for that Table

4. Set the SharePoint destination folder

Details of the concat expression are here:

concat(outputs('Add_Dataverse_row')?['body/new_name'],'_',replace(outputs('Add_Dataverse_row')?['body/new_jumperentryid'],'-',''))

5. Create the SharePoint folder

6. Get the Id of the SharePoint document location

first(outputs('List_SP_doc_location_rows')?['body/value'])?['sharepointdocumentlocationid']

7. Create a word doc – you can replace with other file creation

8. Create SharePoint file

Concat expression is this:

concat(formatDateTime(utcNow(),'HHmm_dd-MM-yyyy-ss'),'.docx')

The whole flow looks like this: