AI agent → Notion
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
- tonotion.dbNotiondatabaseSignups
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 Notion
Append events as rows to a Notion database, or content to a page. Connect once with OAuth, pick the target per pipeline.
- 01
connect your workspace
Authorize the ingestlayer Notion integration over OAuth from the destinations page, then choose which databases and pages it may touch. We hold only that workspace's access token, in-region, in the same KMS as your other credentials.
- 02
pick a target
Per pipeline, choose a database to append a typed row to, or a page to append content to. The picker lists exactly what you shared with the integration during authorization — nothing else.
- 03
map the columns
For a database, match event fields to Notion properties — automatically by column name, or per-column with $event.* templates. The title column falls back to the event name, so a row is never blank. For a page, the rendered body is appended as blocks.
┌─ Signups · database ───────────────────┐ │ Name ada@acme.com │ │ Plan ● pro │ │ Source marketing-site │ │ Signed up 2026-06-03 │ └─────────────────────────────────────────┘
notes
- Notion grants access page by page: the integration only sees databases and pages you explicitly share during authorization. Add the target there, or the delivery dead-letters as object_not_found.
- Each column is coerced to its Notion type — number, date, select, checkbox, URL, and so on. Properties an integration can't write (people, relations, files, formulas, rollups) are skipped rather than guessed.
- Title and rich-text values cap at 2000 characters per block and are chunked beyond that; a single page append tops out at 100 blocks.
- Tokens don't expire, but revoking the integration inside Notion flips the destination to an error state — reconnect from the destinations page to resume delivery.
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 → TelegramTelegram
- AI agent → EmailEmail
- AI agent → WebhookWebhook
- AI agent → PostgresPostgres