Hello,
I have designed a flow to download a file from QuickBase via HTTP action and add this file to Dropbox with the build in add file action.
The HTTP action supplies in the body an object of
{
"$content-type": "image/png",
"$content": "sample123654"
}
When I supply this output to file content in the add file to Dropbox the automation works fine but the file cannot be opened in Dropbox it is a corrupted file.
(when i have downloaded the file from Dropbox and opened the file with notepad it was null)
I tried to input the whole output object.
I tried to input just the $content part of the file output.
I tried to append to the array like bellow.
{
"name": "test.png",
"contentBytes": {
"$content-type": "image/png",
"$content": "sample123654"
}
based on the QB documentation this output encoded in base64 format
based on Power Automate documentation the file content should be supplied in binary
I don't have much understanding in those formats. I tried to use the formula to convert base64 to binary
but the result of the conversion didn't change the file content it still had the same characters in the $content the only change i saw was the "$content-type": changed from "image/png" to "application/octet-stream" and the result in Dropbox was also a corrupted file.
Please help me figure what I need to supply to the file content and if format conversion is needed.
or if I'm missing something else.
Thank you.
Hello @Koen5,
Thank you for your reply,
I have finally figured this.
You 2nt idea were what brought me to the solution.
I tested a Dropbox file export and then a file import.
When that worked, I looked at the formatting and I was able to match that format with Initialize / Set variable and convert base64tobinary formula.
Your input is appreciated.
Dear P,
I am not familiar with DropBox (I know what it is, but do not use it), but I would suggest you first ensure that the first step (download a file from QuickBase via HTTP action) is completed.
I could not see anywhere in the message that you have done so.
Without doing anything with DropBox ... can you download a file from QuickBase successfully to a OneDrive/Sharepoint location? Is the file as it should be?
Seperately, if you take any file already on your OneDrive/Sharepoint location (not the file you have downloaded via QuickBase via HTTP action, can you read the contents (Get File Contents) and re-create it succesfully at DropBox?
If the seperate steps above are successful, only then would I try to combine everything to see the results. You may even build in an additional step in which you do a 'Get file contents' action on the downloaded file .... just ensure you build in a delay before you do so ... newly created files in the same flow need some time to be 'recognized'.
At this moment I believe you have too many variables which may cause an error.
Hope the suggestions help,
Kind regards,
Koen