AI agent → Telegram
Agents — Claude Code, Cursor, your own app — call a pipeline by id like a named function, authenticated with a per-agent bearer token scoped to an explicit pipeline allowlist. The request body is the event; with ?wait=true the agent gets the post-pipeline payload back to use as a tool result.
01source
02pipeline · 3 steps
- 01MUTredact.piistrip secrets from prompts + outputs
- 02ENRclassifylabel calls by risk
- 03ENRsummarizetrace → one-line outcome
03destinations · 1
- totelegramTelegramchat@oncall
how events arrive
- 01
create an agent source
Add an AI-agent source; ingestlayer issues a bearer token bound to an explicit allowlist of pipeline ids the agent may invoke — nothing else.
- 02
invoke a pipeline
From the agent, POST the event payload to https://in.ingestlayer.com/v1/agent/invoke/<pipelineId> with the bearer token. The body is the event; anything goes — the downstream actions handle the shape.
- 03
fire-and-forget or wait
By default the pipeline runs and its destinations fire. Add ?wait=true to also get a poll URL that returns the post-actions payload — the agent reads the enriched, redacted result and uses it as a tool response.
POST /v1/agent/invoke/pl_enrich_lead?wait=true HTTP/1.1
Host: in.ingestlayer.com
Authorization: Bearer ag_live_8fa2…
Content-Type: application/json
{
"type": "company.lookup",
"email": "ada@acme.com"
}route it to Telegram
Message a person, group, or channel through a connected bot.
- 01
connect a bot
Create a bot with @BotFather and paste its token. We register the webhook and verify it in-region.
- 02
start a chat
Send /start to the bot from the target chat — or add it to the group/channel — then pick the chat from the list.
- 03
format the text
Messages use MarkdownV2; the default template bolds the event name and lists fields. Reserved characters in field values are escaped for you.
oncall *support.ticket.created* ticket T-4821 subject API returning 500s tier enterprise urgency critical
notes
- Telegram caps a bot at roughly 30 messages per second overall, and one per second to a single chat.
- The bot must be added to a group — and promoted to admin for a channel — before it can post.
- MarkdownV2 requires escaping characters like _ * [ ] ( ); ingestlayer escapes field values, but custom templates are your responsibility.
questions
- How does an agent send data in?
- It calls a pipeline by id like a function: POST the event to /v1/agent/invoke/<pipelineId> with the agent's bearer token. The request body is the event payload.
- Can the agent use the processed result?
- Yes — invoke with ?wait=true and ingestlayer returns a poll URL holding the post-actions payload (enriched, classified, redacted), so the agent can use it as a tool result. The pipeline's normal destinations still fire.
- How do I keep prompt data out of chat?
- redact.pii masks sensitive fields per destination, so a warehouse copy can keep the full trace while the Slack message shows only a clean summary.
AI agent, routed elsewhere
- AI agent → SlackSlack
- AI agent → DiscordDiscord
- AI agent → EmailEmail
- AI agent → WebhookWebhook
- AI agent → PostgresPostgres
- AI agent → NotionNotion
other sources, into Telegram
- HTTP webhook → Telegramwebhook.in
- Inbound email → Telegramemail
- everything you can pipe to Telegramhub