Aerostack
database

int-notion-page-update Edge Function — Database

Database

Updates an existing Notion page's properties — change status, tags, dates, or any database field. Supports archiving pages.

navin @navin verified
Updated Mar 19, 2026
GitHub

Edge function int-notion-page-update Updates an existing Notion page's properties — change status, tags, dates, or any database field. Supports archiving pages.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.

terminal — aerostack cli
$ npx aerostack add navin/int-notion-page-update
smart_toy

Use with AI Assistants

MCP

Connect Claude, Cursor, or any MCP-compatible client — then call this function by slug

① Add MCP Server

Add this once — access all Aerostack functions from your AI tool.

claude_desktop_config.json
{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev",
      "type": "http"
    }
  }
}

② Call this function

Ask your AI to use the call_function tool with this slug:

call_function
call_function({
  slug: "int-notion-page-update",
  args: {}
})

int-notion-page-update — Update an existing Notion page

Updates properties on an existing Notion page — change status, tags, dates, assignees, or archive the page.


Setup

Environment Variables
Variable Required Description
NOTION_API_KEY Yes Notion integration token — get yours at https://www.notion.so/my-integrations

How to set up:

  1. Go to notion.so/my-integrations and create an integration
  2. Copy the Internal Integration Secret (starts with ntn_ or secret_)
  3. In Notion, share your database with the integration (click ... → Connections → your integration)
  4. In your Aerostack dashboard, go to Project → Secrets → Add secret
  5. Key: NOTION_API_KEY — Value: your integration token

API

POST /api/int-notion-page-update

Request body

Field Type Required Default Description
pageId string Yes The Notion page ID to update
properties object Yes Notion property values to change (partial update)
archived boolean No Set to true to archive (soft-delete) the page

Success response (200)

{
  "success": true,
  "data": {
    "pageId": "abc123-def456-...",
    "url": "https://notion.so/abc123def456",
    "updated": true
  }
}

Usage

cURL
# Change a page's Status property to "Published"
curl -X POST "$FUNCTION_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "pageId": "your-page-id",
    "properties": {
      "Status": { "select": { "name": "Published" } }
    }
  }'
Use Cases
  • Content pipeline: Mark blog posts or social media content as "Published" after posting to another platform.
  • Task management: Update task status, priority, or assignee based on workflow triggers.
  • CRM updates: Change deal stage, add notes, or update contact information programmatically.
  • Archiving: Soft-delete processed records by setting archived: true.

Notes

  • properties is a partial update — only include the fields you want to change. Other fields remain untouched.
  • Property names and formats must match your database schema exactly.
  • The integration must have access to the page's parent database (share it via Connections).

Metadata

upgrade Version 1.0.4
gavel License MIT
language Language typescript
cloud Provider aerostack

Required Secrets

Add these in your Aerostack dashboard under Project → Secrets.

  • key NOTION_API_KEY

    Notion integration token — authenticates API requests to your Notion workspace.

deployed_code

Build and publish your own functions

Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.

Frequently asked questions

What does the int-notion-page-update function do? +

int-notion-page-update is a serverless edge function for database automation written in aerostack. Deploy it to Cloudflare Workers via your Aerostack workspace.

How do I deploy the int-notion-page-update function? +

Install the Aerostack CLI and run: ```bash aerostack deploy function @navin/int-notion-page-update ``` It will be live on Cloudflare Workers in seconds.

What runtime does int-notion-page-update use? +

int-notion-page-update runs on aerostack on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.

Can I customise the int-notion-page-update function? +

Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.