Notion whoami (signed-in account)
Report which Notion account this browser is signed in as: the user id, email and name, the current workspace, and every workspace the account belongs to (id and name). Fails with a signed-out error when no Notion account is signed in, so it can be used to check a session before running other Notion scripts.
Input
None
Output
evidence requiredloggedIn requiredname optionalemail optionaluserId optionalworkspaces optionalcurrentWorkspace optionalFAQ
Query a Notion database
Read the rows of a Notion database the signed-in account can open, in the order of one of its views, with every property's value by name (text, numbers, selects, multi-selects, dates, checkboxes, people, links to other rows), plus the database's properties and their options. Optionally keep only rows matching a text search. Takes the database's link or id; get it from search_pages.
Invite workspace member (Notion)
Invite someone to a Notion workspace by email, with a chosen role and built-in verification. Records the People page before and after, returning invited / verified — proof the invite actually landed. dryRun (default true) fills the invite form and cancels without sending; set it to false to actually send the invite. Role defaults to "Restricted member" (available on all plans); "Workspace owner" is also supported. The "Member" role requires a paid Notion Plus plan and is rejected up front rather than silently opening a billing/upgrade dialog. Acts on the workspace currently active in the browser, so there is no workspace name to pass. Requires being signed into Notion with permission to invite members.
Create a Notion page
Create a Notion page with a title and optional text, then read it back. Put it in your private pages, under another page, or in a database as a new row with property values by name (text, number, select, multi-select, date, checkbox; select options must already exist). Returns the new page's id and link. Get page and database ids from search_pages and their properties from query_database.
