The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined" helppp

Hi all :slight_smile:
this is the first time that im using retool and doing some api stuff in general
Im trying to integrate "assembly ai" transcription api to retool.

according to the docs
they require a binary file option for the "put" action, however, I'm receiving this error whenever I'm trying to run a preview

Try using
and if you need to provide filetype then also add

Thank you :heartbeat:

Hey there! Just a quick heads up that you might need to specify {{filefile.value[0]}} and {{filefile.files[0].type}} in your query instead of using i with this solution!

Retool tries to guess the value of i and will set its value to 0 but only when previewing queries. When the query actually runs i will be undefined unless the query is triggered from a Table or List View component:

This can cause your transformer to return null instead of the desired value:

Hi @Kabirdas
So what should I write if it returns a null?
I dont need a specific file type,
And the desired option is 'binary'

Ahh sorry about that @jimijim, the example wasn't meant to be replicated just to illustrate the way i behaves in preview mode.

As for as your setup goes I'd just recommend passing either {{ filefile.value[0] }} instead of {{ filefile.value }} :

Or, following these docs and using {{ {...filefiles.files[0], data: filfile.value[0]} }}:

Can you let me know if either of those work?