Notifications
Clear all
Topic starter
Hello,
I’m currently developing a conversational agent on callin.io, connected to Telegram, with the goal of receiving messages (text or voice) and automatically replying via the AI Agent node.
What works:
When I send a text message via Telegram:
- The message is successfully captured,
- It is passed to the
AI Agentnode, - The prompt is recognized (
{{ $json.message.text }}), and the response is correctly sent back via Telegram.
Issue encountered:
When I send a voice message, I get the following error from the AI Agent node:
Problem in node 'AI Agent'
No prompt specified
Details:
- The voice message is successfully downloaded using
Telegram -> Get File. - The transcription is correctly performed using
OpenAI - Transcribe Recording, and thetextfield is present in the output. - I use
{{ $json.text }}in the Prompt (User Message) field of theAI Agentnode. - However, the
"No prompt specified"error appears only with voice messages. - The
textfield is clearly visible in the output JSON of the previous node.
What I’ve tried:
- Added a
Switchto handle text and voice messages separately. - Used
{{ $json.text }}for voice and{{ $json.message.text }}for text. - Added a
Setnode to unify both into a common field likeprompt = {{ $json.text }}. - Set
"language": "fr"in the transcription node to force French.
What I need:
I want the AI Agent node to dynamically handle either case:
- Use
message.textwhen the message is a text, - Use
text(transcription result) when it’s a voice message, - And generate a response in both scenarios without triggering the
"No prompt specified"error.
Any suggestions or working setups are welcome. Thanks in advance!
—`Preformatted text
Posted : 21/04/2025 2:31 pm
It's not the cleanest, but it should likely function.
Connect both nodes, using json.text and json.message.text.
Then, within your AI prompt field, utilize it like this:
// your input here
{{ $json.text ?? json.message.text }}
Posted : 21/04/2025 5:45 pm
This thread was automatically closed 90 days following the last response. New replies are no longer permitted.
Posted : 20/07/2025 5:45 pm