Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/templates/perfect-meetings/APP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Prepare for Google Calendar meetings with people outside your organization, with

## Your library

<mention url="perfect-meetings-resources">Perfect Meetings Resources</mention> — The databases created by this app, grouped for demo cleanup.

- <mention url="meetings-db" type="database">Meetings</mention> — Meeting briefs and your notes.
- <mention url="people-db" type="database">People</mention> — Get to know the people you're meeting.
- <mention url="companies-db" type="database">Companies</mention> — Background on their companies.
Expand Down
19 changes: 10 additions & 9 deletions apps/templates/perfect-meetings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ Notion pages with a short research brief.

## What it creates

| Kind | Name | Purpose |
| ------------ | ------------------ | ------------------------------------------------------------------------------------------------- |
| Page | APP.md | Home page with Today, live research progress, library links, and collapsed help |
| Database | Meetings | One row per external meeting; brief at the top of the page, notes below |
| Database | People | One row per outside attendee, keyed by email |
| Database | Companies | One row per outside company, keyed by email domain |
| Database | Workflow runs | One row per calendar ingest run; add a row to run a catch-up now (linked under How it works) |
| Custom agent | Meeting researcher | Researches Ready rows and writes profiles and meeting briefs directly |
| Custom block | main_ui | Setup progress, then a Today view (the default) and company and people cards for the next meeting |
| Kind | Name | Purpose |
| ------------ | -------------------------- | ------------------------------------------------------------------------------------------------- |
| Page | APP.md | Home page with Today, live research progress, library links, and collapsed help |
| Page | Perfect Meetings Resources | Parent of the four app databases for demo cleanup |
| Database | Meetings | One row per external meeting; brief at the top of the page, notes below |
| Database | People | One row per outside attendee, keyed by email |
| Database | Companies | One row per outside company, keyed by email domain |
| Database | Workflow runs | One row per calendar ingest run; add a row to run a catch-up now (linked under How it works) |
| Custom agent | Meeting researcher | Researches Ready rows and writes profiles and meeting briefs directly |
| Custom block | main_ui | Setup progress, then a Today view (the default) and company and people cards for the next meeting |

## Home page

Expand Down
23 changes: 18 additions & 5 deletions apps/templates/perfect-meetings/src/notion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { access, customAgent, database } from "@notionhq/apps"
import { access, customAgent, page } from "@notionhq/apps"
import { notion } from "@notionhq/apps/notion-as-code"

// Resource and property IDs are stable declaration identities. Do not rename
Expand Down Expand Up @@ -55,7 +55,20 @@ export const MEETING_STATUS = {
cancelled: "Cancelled",
} as const

export const companies = database("companies-db", {
// Keep the data together for demo cleanup without deleting the app home.
const resources = page({
resourceId: "perfect-meetings-resources",
properties: { title: notion.text("Perfect Meetings Resources") },
content: `<database url="meetings-db" inline="false">Meetings</database>

<database url="people-db" inline="false">People</database>

<database url="companies-db" inline="false">Companies</database>

<database url="sync-runs-db" inline="false">Workflow runs</database>`,
})

export const companies = resources.addDatabase("companies-db", {
dataSourceResourceId: COMPANIES_SOURCE,
name: "Companies",
icon: { type: "emoji", emoji: "🏢" },
Expand Down Expand Up @@ -83,7 +96,7 @@ export const companies = database("companies-db", {
],
})

export const people = database("people-db", {
export const people = resources.addDatabase("people-db", {
dataSourceResourceId: PEOPLE_SOURCE,
name: "People",
icon: { type: "emoji", emoji: "🧑‍💼" },
Expand Down Expand Up @@ -158,7 +171,7 @@ export const people = database("people-db", {
],
})

export const meetings = database("meetings-db", {
export const meetings = resources.addDatabase("meetings-db", {
dataSourceResourceId: MEETINGS_SOURCE,
name: "Meetings",
icon: { type: "emoji", emoji: "🗓️" },
Expand Down Expand Up @@ -283,7 +296,7 @@ export const RUN_TRIGGER = {

// One row per calendar ingest run. Adding a row yourself runs a calendar
// catch-up, and the ingest fills in that row.
export const syncRuns = database("sync-runs-db", {
export const syncRuns = resources.addDatabase("sync-runs-db", {
dataSourceResourceId: "sync-runs-source",
name: "Workflow runs",
icon: { type: "emoji", emoji: "🔄" },
Expand Down
Loading