Loading...
Loading...
Search, read, append to, and create Notion pages and databases via the Notion REST API. Use when the user mentions Notion, a page in their workspace, or wants to log something to a database.
npx skill4agent add acedatacloud/skills notioncurl + jq$NOTION_TOKENNotion-Version2022-06-28curl -sS https://api.notion.com/v1/users/me \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28" \
| jq '{id, name, type, bot: (.bot != null)}'curl -sS https://api.notion.com/v1/search \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{"query": "Q1 budget", "page_size": 10}' \
| jq '.results[] | {id, type: .object, url, title: (.properties.title // .properties.Name)?.title?[0]?.plain_text // .child_page?.title}'curl -sS "https://api.notion.com/v1/pages/PAGE_ID" \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28"curl -sS "https://api.notion.com/v1/blocks/PAGE_ID/children?page_size=100" \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28" \
| jq '.results[] | {type, content: (.[.type] // {})}'curl -sS -X PATCH "https://api.notion.com/v1/blocks/PAGE_ID/children" \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d "$(jq -nc --arg text "Appended via the assistant." '
{children: [{
object: "block",
type: "paragraph",
paragraph: {rich_text: [{type:"text", text:{content:$text}}]}
}]}')"curl -sS -X POST "https://api.notion.com/v1/databases/DATABASE_ID/query" \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"filter": {"property": "Status", "select": {"equals": "Open"}},
"sorts": [{"property": "Updated", "direction": "descending"}],
"page_size": 25
}'curl -sS -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d "$(jq -nc \
--arg db "DATABASE_ID" \
--arg title "New entry" \
'{
parent: {database_id: $db},
properties: {
Name: {title: [{text: {content: $title}}]},
Status: {select: {name: "Open"}}
}
}')"start_cursor=$cursornext_cursorhas_morefalse{"select": "Open"}{"select": {"name": "Open"}}GET /v1/databases/<id>publish_artifactpublish_artifact(kind="document", channel="notion", title="<title>", url="<the REAL returned URL>", status="delivered")status="failed"_shared/artifacts.md