Hi,
I'm new to callin.io and have started building a prototype Telegram bot focused on the stock market. As an end user of the bot, you’ll be able to request information about a stock, view technical analysis (e.g., EUR/USD), and more. The bot should be functional for multiple users. I have a few questions regarding this setup:
-
Since multiple users will be using the bot, I’d prefer not to use GET requests to retrieve Telegram user data (due to cost inefficiency with workflow executions). Instead, I want to trigger a webhook from Telegram to a callin.io endpoint.
Is the Telegram Trigger (On Message) in callin.io equivalent to a webhook, or does it continuously poll the Telegram channel and trigger workflows? -
The bot will support various commands like
/chart
,/analyse
, etc.
When a user sends a command, and the webhook is triggered in callin.io, I want to respond with a follow-up question like:
“Which ticker are you interested in? For example: EUR/USD”
Which node in callin.io should I use to handle this kind of dynamic interaction? -
Following up on question 2: Can I use a single AI agent to handle different commands, or is it better to create separate flows for each command?
callin.io Setup:
Running on callin.io Cloud
Thanks in advance!
Sounds like an interesting project!
In Telegram, you can utilize the trigger node, which uses POST requests. You would call this endpoint with your data.
You could also, if desired, trigger different webhooks within that flow, such as for /chart
or /analyse
. Alternatively, you could use a switch node or a filter node to direct processing down a specific action path.
It's possible to have multiple agents within a single flow or call other workflows. An AI agent can certainly do this, as callin.io is very flexible.
It really depends on how unique you want the functionality to be and the desired output format.
Hope this helps!
Thanks for the prompt reply and the provided solutions! The Telegram webhook has been set up, and the Telegram trigger in callin.io is also configured. I have a few follow-up questions:
- When I send a command from the bot, I need to manually click "Test Workflow" in callin.io to retrieve the data. Why isn't this happening automatically?
-
If a user can select from five predefined actions via the Telegram bot (e.g., command 1, command 2, etc.), a response should be sent back to Telegram indicating the relevant stock (e.g., EUR/USD). The workflow should then continue after the user responds.
In this scenario, which node would be most suitable: Split, Switch, Filter, or IF? The workflow needs to follow a specific path based on the command selected. -
When the Telegram bot and callin.io workflow are operational in a production environment, but I wish to continue development, how can I safely test new iterations without disrupting the live workflow?
Thanks again for your feedback!
I would opt for a Switch node, defining each command. For multi-step questions, I've used Slack, implementing a wait mechanism and checking if the reply count increased before proceeding. For Telegram, you might be able to use the user ID or a similar message timestamp.
This is my approach for multi-step questions:
You could incorporate logic for any command using an IF node to filter out commands that don't exist, though I believe Telegram handles this by default.
Perhaps test on a separate Telegram channel? Use one for production and another for development. Once developed and tested on the test channel, you can migrate the changes to the production channel, as the URLs differ.