Build with Notion’s Developer Platform – Notion
See the Developer Platform in action. Re-watch the keynote→
Trusted by engineers at
Sync any data source into Notion.<br>Continuously upsert external records into a Notion Database with Workers, a declarative schema, and a persistent cursor.
and others
zendeskSync.tsSee example<br>import { Worker } from "@notionhq/workers";
const worker = new Worker();
const tickets = worker.database("tickets", {<br>type: "managed",<br>initialTitle: "Support Tickets",<br>primaryKeyProperty: "Tickets",<br>schema: { properties: {<br>"Tickets": Schema.title(),<br>"CSAT score": Schema.select([{ name: "Very satisfied" }, ...]),<br>"Feature tags": Schema.multiSelect([{ name: "Account access" }, ...]),<br>}},<br>});
worker.sync("ticketsSync", {<br>database: tickets,<br>schedule: "5m",<br>execute: async () => ({<br>changes: (await zendesk.tickets.list()).map(t => ({<br>type: "upsert" as const,<br>key: t.id,<br>properties: {<br>"Tickets": Builder.title(t.subject),<br>"CSAT score": Builder.select(t.csat),<br>"Feature tags": Builder.multiSelect(...t.tags),<br>},<br>})),<br>}),<br>})
Workers > sync:ticketsSync<br>Connecting. Found 5 new tickets...
Build any tool for your agents.<br>Write custom tools for Notion Agents that generate assets, query live data, and hit any API.
Generate assets from your docs<br>presentationTool.tsSee example<br>worker.tool("createPresentation", {<br>title: "Create Presentation",<br>description:<br>"Reads a Notion page and creates a PowerPoint presentation from its content. Each heading becomes a new slide. The generated .pptx file is uploaded to the bottom of the page.",<br>schema: j.object({<br>pageId: j.string()<br>}),<br>execute: async ({ pageId }, { notion }) => {<br>// Fetch page content as markdown and parse into slides<br>const pageTitle = await getPageTitle(notion, pageId);<br>const markdown = await getPageMarkdown(pageId);<br>const slides = groupMarkdownIntoSlides(markdown, pageTitle);
// Build the .pptx file<br>const filename = `${pageTitle}.pptx`;<br>const buffer = await buildPresentation(pageTitle, slides);
// Upload to Notion and append to the page<br>await uploadToNotion(notion, pageId, filename, buffer);
return `Created presentation "${pageTitle}" with ${slides.length + 1} slides (1 title + ${slides.length} content) and added it to the page.`;<br>},<br>});
Workers > tool:createPresentation
Query any data warehouse<br>queryRevenueTool.tsSee example<br>worker.tool("queryRevenue", {<br>title: "Query Revenue",<br>description: "Run a SQL query against the deals warehouse table.",<br>schema: j.object({<br>query: j<br>.string()<br>.describe("e.g. SELECT SUM(amount) AS revenue WHERE region = 'North America'"),<br>}),<br>execute: async ({ query }) =><br>snowflake.query(query.replace(/(\s+WHERE|$)/i, " FROM deals$1")),<br>});
Workers > tool:queryRevenue
Take actions in any app<br>browserTools.mdCopy the prompt
Build a worker that lets my Notion agent order food from DoorDash using Browserbase.
I want three tools:
- listFavorites — Returns my saved meals (e.g. "friday night thai" = Pad See Ew + Green Curry from Siam Garden).<br>- orderFavorite — Takes a meal name, shows me what it's about to order and the estimated total, and asks for confirmation before placing it.<br>- checkOrder — Returns delivery ETA and driver status.
Generate assets from your docs<br>presentationTool.tsSee example<br>worker.tool("createPresentation", {<br>title: "Create Presentation",<br>description:<br>"Reads a Notion page and creates a PowerPoint presentation from its content. Each heading becomes a new slide. The generated .pptx file is uploaded to the bottom of the page.",<br>schema: j.object({<br>pageId: j.string()<br>}),<br>execute: async ({ pageId }, { notion }) => {<br>// Fetch page content as markdown and parse into slides<br>const pageTitle = await getPageTitle(notion, pageId);<br>const markdown = await getPageMarkdown(pageId);<br>const slides = groupMarkdownIntoSlides(markdown, pageTitle);
// Build the .pptx file<br>const filename = `${pageTitle}.pptx`;<br>const buffer = await buildPresentation(pageTitle, slides);
// Upload to Notion and append to the page<br>await uploadToNotion(notion, pageId, filename, buffer);
return `Created presentation "${pageTitle}" with ${slides.length + 1} slides (1 title + ${slides.length} content) and added it to the page.`;<br>},<br>});
Workers > tool:createPresentation
Trigger Notion workflows from anywhere.<br>Listen for incoming webhooks from any app, then run workflows with Notion Agents, pages, databases, and external APIs.<br>Read the docs→
PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer canceled<br>Candidate signed offer<br>Contract signed<br>Issue escalated<br>PR merged<br>Customer...