Posting a file from an input component to Slack

I'm trying to take a file input from a user in my application and post that file (along with some other relevant data) into a Slack channel. However, Slack can't natively decode base64, and atob() just seems to pass in another array of random characters. Is there any way to bypass the base64 encoding from the retool components? Or is there another workaround?

I can see 2 workarounds:

1 - Upload the file to retool storage and reference the link in your slack message (or add it as a remote file: Working with files | Slack)
2 - Upload the file to slack using the file.upload API: files.upload method | Slack then reference it in your message.

Please let me know any of them worked.

The retool storage workaround works for now - would be great to be able to pass the file in directly, but this will get us through, thank you!

1 Like

@walps Thank you for the update! Glad to hear it worked for you.