<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i" -->

---
title: How to use Notion as Code | daily.dev
description: Notion as Code is a new beta feature that lets you define an entire Notion workspace — teamspaces, pages, databases, views, entries, and custom agents — in...
canonical: https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to use Notion as Code | daily.dev
og:description: Notion as Code is a new beta feature that lets you define an entire Notion workspace — teamspaces, pages, databases, views, entries, and custom agents — in...
og:url: https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i
og:image: https://api.daily.dev/og/posts/QBCUUml1i.png
og:image:alt: How to use Notion as Code
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use Notion as Code

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 17 min read · 0 upvotes · 0 comments

## Summary

Notion as Code is a new beta feature that lets you define an entire Notion workspace — teamspaces, pages, databases, views, entries, and custom agents — in TypeScript and deploy it via the Notion CLI. The system works declaratively: TypeScript records intents, the CLI applies them to Notion and tracks resource IDs in local state. Key concepts include stable resourceIds (identity, not presentation), separating code-owned structure from human-owned content, seeding databases from JSON/CSV, defining database views and custom agents, and managing state carefully. The post covers installation, authentication, the full workflow from type-checking to applying, Git-based change management, CI/CD considerations, and practical ownership policies for avoiding drift.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/how-to-use-notion-as-code>

## Similar posts on daily.dev

- [Notion courts developers with platform for AI agents and workflow automation](https://daily.dev/posts/notion-courts-developers-with-platform-for-ai-agents-and-workflow-automation-5loncgt6f) · InfoWorld · 0 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#iac](https://daily.dev/tags/iac), [#notion](https://daily.dev/tags/notion)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to use Notion as Code","url":"https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i"},"datePublished":"2026-07-24T11:31:03.465Z","dateModified":"2026-07-24T15:20:16.038Z","description":"Notion as Code is a new beta feature that lets you define an entire Notion workspace — teamspaces, pages, databases, views, entries, and custom agents — in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/907c6c028f107fad7d0379f1571dde35?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/907c6c028f107fad7d0379f1571dde35?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-use-notion-as-code-qbcuuml1i","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"typescript,iac,notion","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"How to use Notion as Code"}]}
```

