Hey guys, how can I use the file block to upload a whatsapp audio? What I am trying to achieve here is this: The user sent an audio using whatsapp (I am using the official whatsapp integration in typebot) I upload this audio to N8N using a webhook. In N8N I am making the transcription of the audio. I already tested and everything is working, but now I need to find a way to differentiate the text that user sent from audio. How can I do that?
To differentiate between audio transcriptions and regular text in your Typebot flow:
When receiving an audio file Use a File block in Typebot to get the WhatsApp audio. Send it to N8N for transcription. When N8N sends the transcription back, add a prefix like "[Audio]" to the text.
For regular text messages Process them as you normally would, without any special prefix.
In your Typebot flow Check if the incoming message starts with "[Audio]". If it does, you know it's a transcription from audio. If it doesn't, it's regular text input from the user.
I can't use the file block if the user sent a text message, otherwise I will have an error. I need to understand, somehow that the message sent is an audio.
@Baptiste any chance to have the type of message from whatsapp as a environment variable? I know that they sent a type field saying it is a media or text in the json. Maybe we can add this to the environment, so I can test it on typebot.