Skip to main content

Notifications

Community site session details

Community site session details

Session Id : g7BNhm0z7n5AnGkyI0FGHb
Power Automate - Building Flows
Unanswered

File Import

Like (0) ShareShare
ReportReport
Posted on 24 Mar 2025 20:27:55 by 2
Hello, I am working on an integration between Laserfiche Cloud and Microsoft Sharepoint. Laserfiche offers an API with endpoints that work with their repository. A specific one that is giving me trouble on Power Automate (works successfully on Postman), is the import endpoint. It expects a multipart form body. The parts would be, according to the Laserfiche API documentation, are "file", and "request". I am trying to use the Get File Content action in Power Automate to fulfill my file part, but it is coming in as raw data (illegible characters), and will exceed the line limit. What are my options now? I have attached my multipart request body in case it looks wrongly setup? I did try this both with and without the base64 encoding.
multipart request...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

  • LG-24031958-0 Profile Picture
    2 on 27 Mar 2025 at 15:07:49
    File Import
    Hi David, so what I'm trying to achieve is similar although not the same. My process is retrieving a file from my sharepoint library and trying to "POST" / import it into a Laserfiche Repository. To achieve this, I am using the "Get File Content" action built into Power Automate to get the file content. It works, but its retrieves it as Raw Data, which I'm sure is normal behavior and it looks like various line of illegible characters. Since I am using the "File Content" of the "Get File Content" action in the request body, the Laserfiche POST request quickly reaches a line limit of 100 characters, due to the raw data. I tried the Base64 encoding functions but I still get a huge string of now legible characters. Any way to condense the file content?  
  • David_MA Profile Picture
    10,802 Super User 2025 Season 1 on 26 Mar 2025 at 18:58:45
    File Import
    I cannot answer anything regarding the Laserfiche API, as I don't even know what it is. However, you would not use the get file content action to get the file content from the API. That is unless there is a specific Laserfiche action in Power Automate for this. Otherwise, the existing get file content actions would be specific to M365 (get file content from OneDrive, SharePoint or an Outlook attachment). You would make an HTTP request to the Laserfiche API to get the file content. 
     
    For example, I have a solution that uses the FedEx API to generate a shipping label. Once the request comes back, it provides me the URL where the file can be retrieved from. I then make another call to the FedEx API to get the file. This is the call to get the file, which you will need to adjust for the file type you expect to be returned (below is for pdf):
     
    The Label URL value is passed from my first call to request the labels. I then use the body of the above call to set a variable for creating the file:
     
    You may want to check the Laserfiche documentation to see how they return the file. You could look at a run of your flow to see what is returned. If I look at the first call I make to FedEx, I can see the URL to download the label:

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 51

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
Chriddle Profile Picture

Chriddle 21 Super User 2025 Season 1

Overall leaderboard
Loading started