Overview
When a user installs a public integration, the integration often needs to set up structured content in the user’s workspace — for example, a project tracker database with pre-configured views, or a set of pages with a specific layout. Historically, the recommended approach was to configure a template URL during OAuth. When a user authorizes the integration, they can choose to duplicate a static Notion page into their workspace. While this works, it has limitations:- The template is a snapshot — it can’t adapt to the user’s existing workspace or preferences.
- The integration can’t customize the setup based on user choices during onboarding.
- The duplicated content may include boilerplate that doesn’t apply to every user.
Create workspace-level pages and databases.
Configure views on new databases.
Populate pages using templates.
How it works
The end-to-end flow looks like this:User authorizes your integration
The user goes through the standard OAuth flow. You receive an
access_token with the capabilities your integration requested. No template URL is needed.Configure views
Use the views API to add views (table, board, calendar, etc.) to your newly created databases, with the filters and sorts your integration needs.
Optionally apply templates
If your databases have data source templates, you can create pages that start from those templates for a richer initial experience.
Creating workspace-level content
Public integrations can create pages and databases at the workspace level by omitting theparent parameter (or setting it to { "type": "workspace", "workspace": true }). This places the content in the authorizing user’s Private section.
This capability is only available to public integrations. Internal integrations cannot create workspace-level content because they aren’t owned by a single user.
Create a database
database.id and database.data_sources[0].id — you’ll need them to create views and pages.
Create a standalone page
Adding views
After creating a database, you can add views that match your integration’s use cases. Each database starts with a default Table view, but you’ll likely want to create additional views with specific filters, sorts, and layout types. For a project tracker, you might want a Board view grouped by status and a Calendar view for due dates:Applying templates
If your integration pre-configures database templates for the data source, you can create pages that start from those templates. This is useful for providing users with structured starting points — for example, a “Bug report” template with pre-filled sections.Comparison with template URL duplication
| Template URL (OAuth) | Programmatic setup | |
|---|---|---|
| Customization | Static — every user gets the same template | Dynamic — tailor content to each user |
| Schema control | Template is a snapshot; schema changes require updating the source page | Full control over database schema, properties, and views at creation time |
| Multiple databases | One template page per integration | Create as many databases and pages as needed |
| View configuration | Views are duplicated as-is from the template | Create views programmatically with specific filters, sorts, and types |
| User interaction | User must choose “Duplicate template” during OAuth | No extra user interaction needed — setup happens after authorization |
| Template URL still useful? | Yes — it’s simpler for basic use cases where a static template is sufficient | Use programmatic setup when you need flexibility or when the template URL approach doesn’t cover your needs |
The template URL approach still works and is fine for simple integrations. Programmatic setup is recommended when your integration needs to create multiple resources, customize content per user, or keep the workspace structure in sync with external systems over time.
Next steps
- Working with views — full reference for creating, updating, and querying views.
- Creating pages from templates — detailed guide on using data source templates.
- Working with databases — database schemas, querying, and page management.
- Authorization — the OAuth flow for public integrations.