On Retool, I'm trying to make a ".txt" file with some words to Google Cloud Storage(GCS) but I got this error.
makeTXTFile: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
This is the query settings on Retool to make a ".txt" file to GCS:
Action type and Content-Type:
Upload file name:
Upload data:
Lemon
Banana
Pineapple
And I want the ".txt" file with a fruit name in each row as below:
Are there any ways to make the ".txt" file from Retool to GCS without the error?
You need to encode the string in Base64 with "btoa()" method and the string needs to have "\n" for line break:
{{ btoa("Lemon\nBanana\nPineapple") }}
Then, you can make the ".txt" file with a fruit name in each row: