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 Automate / Upload SharePoint atta...
Power Automate
Unanswered

Upload SharePoint attachment to DataVerse

(0) ShareShare
ReportReport
Posted on by 21

I am having issues uploading an attachment from SharePoint into the DataVerse. I have tried various methods such as "Upload a file or an image" and "Get Attachments" with no luck.

Categories:
I have the same question (0)
  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @amg92 ,

     

    Just to confirm: does your Dataverse table have a column with file data type? If yes, please share an image of your current flow design and/or the error that you are receiving. Make sure to remove any sensitive data before sharing it.

  • amg92 Profile Picture
    21 on at

    Yes, I have three columns with file data type. If I input an attachment using Power Apps, the DataVerse will store the form. But I am trying to take a form from Microsoft Forms or SharePoint and upload in to the Dataverse. I have tried using two different methods, method one on the left parallel path and method two on the right.

    amg92_3-1694128048394.png

     

    On the left, I get an error stating "Action 'Upload_a_file_or_an_image' failed." Badrequest. The provided workflow action input is not valid.

    amg92_1-1694127910615.png

     


    On the right, I get an error saying NotFound.

    amg92_2-1694127951894.png

     

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @amg92 ,

     

    I ran some tests here and found a solution. 

     

    First, add a 'Compose' action before your parallel branch, and use this expression: 

    first(json(outputs('Get_response_details')?['body/r776a5868cec54310946102573d57121c'])), passing the dynamic content from your file Form question to the json() expression.
     
    After that, add a 'Get file content' action from OneDrive connector (apparently the MS Forms files are uploaded to OneDrive, by default) and pass as input the driveId and the Id properties from the compose, separated by a dot.  
     
    rzaneti_1-1694131296384.png

     

    You will need to access these properties via expressions, and they may look like this:

    • right side: outputs('Compose')['driveId']
    • left side: outputs('Compose')['id']

     

    Then, just pass the 'File content' dynamic content to the 'Content' input and it will be properly uploaded to your DV table: 
    rzaneti_2-1694131474734.png
     
    The flow ran without any issues (you can ignore the 2 last actions, as I just included it to test if the uploaded files were working fine):
    rzaneti_3-1694131683909.png

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/ 

  • amg92 Profile Picture
    21 on at

    When I use the same dynamic content as get response details I get the following error.

    amg92_1-1694135254036.png

     If I use what you recommended I get the following.

    amg92_0-1694135205187.png

     

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @amg92 ,

     

    Could you please share the outputs from your 'Get response details' action, or assign the 'upload file' answer dynamic content to a 'Compose' action and share its outputs? The idea here is to identify how Power Automate is reading the files that you are uploading in MS Forms: usually, it would be reading as a JSON stored into a string, but clearly it is not happening in your end, as both errors messages refer to a null and to an integer.

     

    When sharing any of these outputs, make sure to remove any sensitive content.  

  • amg92 Profile Picture
    21 on at

    amg92_0-1694184113811.png

    Example file output from Get response detail:

    amg92_1-1694184897652.png

     

     

    Compose action input: 

    first(json(outputs('Get_response_details')?['body/r218xxxxxxxxxxxxxxxxx']))
  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @amg92 ,

     

    Your flow looks fine. I recommend you to take 2 tests to try to identify potential errors:

    • Assign only outputs('Get_response_details')?['body/r218xxxxxxxxxxxxxxxxx'] to a string variable and check if it displays the JSON as text (which will looks identical to the output that you just shared)
    • Create a new Form with a file question (this is just for test purposes) and check if the expression is working properly (you can do it in a different flow as well).

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard