Community

Connect with us and enhance your M-Files experience using Unitfly Toolkit for M-Files. Here’s how to get started.

Notifications
Clear all

[Solved] Integration Kit - PowerAutomate - SendFile

0
Topic starter

I currently have a flow in PowerAutomate that is:

  1. Get submission from MS Form
  2. Create a task in MS Planner
  3. Post a message to MS Teams
  4. Create new Engagement Object with Unitfly connector (This WORKS)
  5. Send files uploaded from MS Form with Unitfly connector (This DOESN'T WORK)

I am struggling trying to get the send file action to work but I keep getting unsupported media type errors. Then I tried the send object and files but I get a bad request error. Does anyone have an example Power Automate flow that is able to send files to M-Files I can copy from?

3 Answers
0
Topic starter

Showing the Send Object and Its Files action settings:

image

I get this error: "No objects and files were sent to M-Files vault. POST request to /objects/0 returned a status code of 500."

Raw Output:

image
0

Hi Kyle, 

the example was sent to you via email, but we'll also post the response here.

So here is the example for sending a file from OneDrive to M-Files:

  1. Get File Content
1

 

2. Convert to Base64

2

 

3. Send Object and Its Files

3


Hope it will help.

 

Regards, 

Ines

kygillette Topic starter 16/02/2024 2:00 pm

@ines-prespjanin 

So I am not sure what is different with mine but I am getting an error when it tries to send the files to M-Files.

{
"errorMessage": "No objects and files were sent to M-Files vault. POST request to /objects/0 returned a status code of 500."
}
 
Get Content
 
image

Convert Base64

image

Send to M-Files

image

 

kygillette Topic starter 16/02/2024 3:50 pm

@ines-prespjanin 

Something else I noticed from some testing this morning. I am getting inconsistent errors. I did some tests with 4+ documents and some tests / documents worked while others didn't. Never consistently the same document failing either.

0

Kyle, I know we made this work over the mail but just want to post the update for others and future reference. 

Here is the working flow: 
1. For each uploaded file get file content from One Drive
2. Convert the file to Base 64
3. Send file/object to M-Files

A screenshot of a phone

Description automatically generated

 

A white line on a white background

Description automatically generated

The difference we had was due to on-prem/cloud environment differences which we managed to resolve and updated the API behind the connector. 

 

Ivan

Answer