Upload xlsx file with API

Pavel_Soucek
New Contributor II

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