Telegrin can wake your Claude routine itself whenever a new lead appears or a lead replies in a conversation. Claude receives those leads and handles them by your rules: checks, replies, filters out. No n8n, no Make, no "just in case" runs every couple of hours.
How it works
- New leads and lead replies are collected into a pack and sent to Claude at most once every 5 minutes. One pack - one run of the routine.
- Every run uses your Claude subscription limit. Packs keep that limit from being spent on each lead separately.
- Telegrin's autopilot still writes the first replies itself. Claude takes over from there: it handles lead replies and decides what to do.
What you need first
- A paid Claude plan: Pro, Max, Team or Enterprise.
- The Telegrin connector in claude.ai - see "MCP and the public API" for how to connect it.
- Instructions for Claude: who counts as a lead, how to reply, how many messages to send.
Step 1. Create a routine of the Code type
- Open claude.ai/code/routines and create a new routine of the Code type. Chat scheduled tasks have no API trigger, and the type cannot be changed later.
- Paste your instructions and make sure they include the phrase: "Process the Telegrin events from the routine-fire-payload block". Without it the routine will not act on the events Telegrin sends.
- No repository is needed. In the connectors, keep Telegrin.
- Add a daily scheduled run - it is your safety net. Pick a time a few minutes past the hour, for example 9:07: a run set exactly on the hour can start late.
- Click Add another trigger → API and save the routine.
Step 2. Copy the URL and the token
Open the routine → Edit → API. Copy the URL, which looks like https://api.anthropic.com/v1/claude_code/routines/trig_…/fire, and click Generate token.
⚠️ Important: the token is shown only once - save it right away. If you lose it, click Regenerate and paste the new one into Telegrin: the old one stops working.
Step 3. Connect the routine in Telegrin
Agents → Deliverers tab → Create your own deliverer → Claude. Paste the URL and the token.
💡 Tip: Claude can do this for you. In a chat with Telegrin connected, write: "Create a Telegrin connection to my Claude routine, URL …, token …".
Which campaigns reach the routine:
- campaigns with no deliverers of their own, or with only the Telegram bot - automatically, and the bot keeps working;
- campaigns with their own webhook, Slack or CRM - add Claude to their deliverers.
Step 4. Check it
- Click Send a test on the connection. The test starts one real run of the routine and uses a little of your limit. The run appears in the routine's history.
- If you had a scheduled qualification task before, switch it off. Otherwise leads get two replies.
- After a day or two, open claude.ai → Settings → Usage and see how much of your limit the runs use.
If something is wrong
| What you see | What to do |
|---|---|
| No Add another trigger button | It is a Chat task - create a new one of the Code type |
| The routine runs but ignores the events | Add the routine-fire-payload phrase to its instructions |
| The routine cannot see Telegrin | Edit → connectors → add Telegrin |
| The connection shows HTTP 401 | The token is wrong or was regenerated - paste the current one |
| The connection shows HTTP 400 | The routine is paused - turn it back on |
| HTTP 429 | More than 30 runs an hour for one routine. Do not send tests too often: packs usually make no more than 12 runs an hour |
| Your Claude limit runs out fast | Every run is a separate Claude session. Pick a lighter model, or keep just one safety run a day |
ℹ️ Note: if errors come in a row, the connection switches itself off. Fix the cause and switch it back on.