06-29-2025 12:25 PM
Hello, I would like to upload xlsx files from SharePoint to Databricks (AWS).
I have files in my Sharepoint folder, try to use power automation (like if new file is created upload file to Databricks) and custom connector (where I defined API /api/2.0/fs/files{file_path}). I am able to to upload file, but I have an issue with (maybe) file codeing and I on Databricks a I can not open/read the file. Have i different content.
My steps in power automate:
1.Get File Content
2. Compose (decodeBase64(outputs('Get_file_Content')?[body]['$content'])
3. Upload file to Databricks (API) - Content-Type: application/octet-stream, Body: (outputs(Compose)
both files (on SharePoint and on Databricks, when I open them in Notepad looks similar, but not not exactly same).
Is anyone successful with similar task?
Thank you
Pavel
06-30-2025 04:02 AM
Hi @Pavel_Soucek ,
The Excel files are binary formats. I think when you are using decodeBase64() on the file content, you might corrupting the file accidently. I think Power Automate already returns the binary data in a format suitable for sending in the body of an HTTP request.
Could you try replace your code with following?
@body('Get_file_Content')
Also, documentation of the endpoint you're using suggest to not encode anything, so let's try above approach.
06-30-2025 12:58 PM
I have tried it with tis error message:
Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'body' validation failed in workflow operation 'UploadFile': The parameter with value '"@body('Get_file_content')"' in path 'body' with type/format 'String/binary' is not convertible to type/format 'Object'.'.
Maybe i need to somehow define something in the connector, but I don't know what.
p.
07-01-2025 05:07 AM
Hi @Pavel_Soucek ,
It was long time ago since I worked with Power Automate, but I think you can edit connector. You can try to change schema to binary or byte
07-02-2025 02:18 PM
I can define header and body for "PUT". I add to header "content-type". Bud I am not sure how to define "body".
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now