Skip to main content

Notifications

Power Apps Pro Dev & ISV
Unanswered

Set Dataverse File Attachment field to file returned from PowerAutomate flow

Posted on by 25
Hi All,
I have a PowerApps canvas app that invokes a Flow which creates a word document file and saves it in OneDrive.
 
Does anyone know how to get that Flow to return a file to the Canvas App and then in the App update a file attachment Dataverse field to this file?
 
thanks Craig
  • Suggested answer
    Nandit Profile Picture
    Nandit 348 on at
    Set Dataverse File Attachment field to file returned from PowerAutomate flow
    Hi  caharland,
     
    You need to add the following steps your flow. First Create a Share Link of the newly created file, Save that link in a FileLink Text column in your Dataverse Table, and also you can send this link back to your app using Respond to a Power App or flow. Here are the steps I have added. The last two actions use the same output from "Create Share Link" action - 

     
     
    In your Power Apps, you can add the following code to a button to download the file:
    //If you have a gallery connected to Dataverse Table
    Launch(ThisItem.FileLink & "?Download=1")
    
    //If you want to download from the link coming from the flow
    Launch(varFileLink & "?Download=1")
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     
  • CA1105 Profile Picture
    CA1105 101 on at
    Set Dataverse File Attachment field to file returned from PowerAutomate flow
    What do you want to do with the file when returned to Power Apps? Do you want to edit inside word document in app or what is the use of it?
  • Jonathan Manrique Profile Picture
    Jonathan Manrique 2,682 on at
    Set Dataverse File Attachment field to file returned from PowerAutomate flow
    Hi
     
    I understand that you need to save the generated file in a dataverse file field. You could use the same flow to do it, what you should do is use the dataverse action to upload attachment, and it will be easier and more functional than returning it to the canvas and then uploading it. Within the flow you already have the content and the name of the file, which is what you need to upload it to dataverse.
     
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution
    Follow me on Linkedin, I talk about Power Platform
    www.linkedin.com/in/jonathan-manrique-rios
     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard