Challenges Implementing A Reliable Queueing Mechanism

Why Am I Here ?

I’m building a Telegram virtual assistant using n8n to automate responses to user queries. The bot should handle both text and audio messages, leveraging AI for intelligent responses.

Current Progress…

Workflow Foundation: I’ve set up the basic n8n workflow with a Telegram Trigger node, Switch node (to separate text and audio), Edit Fields node, AI Agent node, and Telegram Output node.

Audio Transcription: Integrated OpenAI’s transcription tool to convert audio messages to text before sending them to the AI Agent.

AI Integration: Connected the AI Agent node to Anthropic and Google for generating responses.

Challenges…

Queueing Mechanism: I’m facing challenges implementing a reliable queueing mechanism to handle user messages sequentially. I have two options:

  1. Code Node Approach: Using code nodes for queueing leads to “Unknown error” messages that need debugging.

  2. Redis Approach: Implementing Redis requires assistance with installation, configuration, and integration with n8n.

Seeking Assistance On !

I’m looking for a JavaScript developer or someone with Redis expertise to help me:

Option 1 (Code Node)…

  • Debug and resolve the “Unknown error” messages in the code nodes.
  • Ensure smooth data flow through the workflow using the code-based queueing mechanism.

Option 2 (Redis)…

  • Install and configure Redis on my server or guide me through using a managed Redis service.
  • Integrate Redis with n8n, including setting up the necessary nodes and configuring them correctly.
  • Migrate the existing queueing logic to utilize Redis for improved reliability and performance.

I am also open to other suggestions…

Hey Adams, what’s up?

Saw you’re stuck on the queueing mechanism for your Telegram automation with n8n. Cool setup, by the way—really like how you’re integrating Anthropic and Google.

For a quick fix, definitely review your Code Node logic. Just throw in some simple try/catch blocks and add console.log() statements to pinpoint exactly where those “unknown errors” are coming from. Usually sorts it out fast.

Redis is a solid step up for a more robust solution without too much hassle. Spin it up quickly via Docker (docker run -d redis) or grab a free instance on Redis Cloud. Then just integrate using n8n’s HTTP Request node with commands like LPUSH (enqueue) and BRPOP (dequeue). If you need some ready-to-use examples, just ask.

There are even beefier solutions like Kafka, Kubernetes, or going fully serverless with AWS Lambda—great if your project scales up significantly. But unfortunately, I can’t detail too much here or else I might get mistaken for AI again, haha!

If you wanna chat more deeply about this or need real hands-on help with Redis or any other option, just click the “Message” button (assuming it really is private, lol) and I’ll be happy to help.

Cheers,
Dandy

Hey Adam,
i have a question on this part of your workflow.

I’m trying to solve this one, I’m getting a webm or a audio ogg file and neet to convert it to something that open ai will accept.
since you’ve solved it can you help me here.
id appreciate any help, thx