{{placeholders}}, then generate a filled-in
document for any Person or Company in one click — from the command menu, from an
AI agent, or from a workflow.

What you’ll learn
Each chapter adds one capability. By the end you’ll have touched most of the SDK.| Chapter | Capability | Reference |
|---|---|---|
| 1. Data model | Objects, fields, and a relation | Data |
| 2. Generating documents | A logic function (AI tool + workflow action) that fills a Markdown template and attaches a polished PDF | Logic functions |
| 3. HTTP routes | Serving JSON and a shareable HTML page from routes | Logic functions |
| 4. Building the UI | Views, navigation, command menu, and front components that preview a document and edit a template | Layout |
| 5. An AI agent | Agent + skill | Skills & agents |
| 6. Publishing | Ship it to the marketplace | Publishing |
Prerequisites
You should have finished the Quick Start: a local Twenty server running on port2020 and the CLI authenticated to it.
If not, scaffold and start one now:
Prefer to read the finished code? The complete app lives in
packages/twenty-apps/examples/document-generator.
Every snippet below is copied from it.How the app fits together
{{placeholders}}. Picking a
template and a CRM record fills the placeholders and stores a polished
document (with a PDF file). Everything else — the command menu, the AI agent,
the workflow step, the shareable link — is just a different way to trigger that
one generator.
Keep this loop running
Leaveyarn twenty dev running in a terminal for the whole tutorial. Every time
you add or edit a file under src/, it re-syncs to your server within a few
seconds, so you can watch each capability appear in the UI as you build it.
Start building →
Chapter 1: model documents and templates.