Portal Community
Soft delete only: The Notion API does not support permanent page deletion. Archiving is the only removal action available via API. Archived pages remain in the workspace and can be restored at any time from Notion's trash. Use archiving for soft-delete patterns where data preservation matters.

When to Use

Configuration

Authentication

FieldRequiredDescription
AuthenticationMethodRequired"ApiToken" or "OAuth2".
ApiTokenRequiredNotion Internal Integration Token starting with secret_.
ClientIdOAuth2OAuth2 client ID.
ClientSecretOAuth2OAuth2 client secret.
AccessTokenOAuth2OAuth2 access token.

Operation Fields

FieldRequiredDescription
PageRequiredUUID of the page to archive.
Idempotent but check first: Archiving an already-archived page does not return an error — the operation is idempotent. However, if the page has already been permanently deleted from Notion's trash, the call returns NOTION_NOT_FOUND. Use page/get first to verify the page exists and its current archived state.

Sample Configuration

{
  "resource": "page",
  "operation": "archive",
  "AuthenticationMethod": "ApiToken",
  "ApiToken": "{{ $credentials.notionApiToken }}",
  "Page": "{{ $json.pageId }}"
}

Validation Errors

Error CodeCause
NOTION_VALIDATION_FAILEDPage field is empty or not a valid UUID.
NOTION_NOT_FOUNDPage does not exist or has been permanently deleted from trash.
NOTION_PERMISSION_DENIEDIntegration lacks write access to this page.
NOTION_UNAUTHORIZEDAPI token is invalid.
NOTION_RATE_LIMITEDRate limit exceeded. Add a Delay node when archiving many pages in a loop.

Output

Success Port

FieldTypeDescription
idstringUUID of the archived page.
archivedbooleanAlways true after a successful archive operation.
urlstringNotion URL. The page is still accessible via this URL but marked as archived.
last_edited_timestringISO 8601 timestamp of the archive action.
propertiesobjectFull property values at the time of archiving.

Error Port

On failure the error port receives errorCode, message, and httpStatus. In bulk archive loops, wire the error port to a logging node and continue iterating rather than aborting all remaining pages.

Sample Output

{
  "id": "c9d0e1f2-a3b4-5678-cdef-789012345678",
  "archived": true,
  "url": "https://www.notion.so/c9d0e1f2a3b45678cdef789012345678",
  "last_edited_time": "2024-06-11T12:00:00.000Z",
  "properties": {
    "Name": {
      "type": "title",
      "title": [{ "plain_text": "Q1 Closed Project" }]
    },
    "Status": {
      "type": "select",
      "select": { "name": "Closed" }
    }
  }
}

Expression Reference

ExpressionTypeUse
{{ $output.archivePage.archived }}booleanConfirm archive succeeded (always true on success port)
{{ $output.archivePage.id }}stringLog the archived page ID for audit trail
{{ $output.archivePage.last_edited_time }}stringRecord the archive timestamp for compliance logging
{{ $output.archivePage.properties.Name.title[0].plain_text }}stringInclude archived page title in notification message

Node Policies & GuardRails

PolicyDetail
Not reversible via APIThere is no page/unarchive operation in the API. Unarchiving must be done manually from the Notion UI (Trash section). Design workflows that require reversibility to track archived IDs for manual recovery.
Verify before bulk archiveBefore running a bulk archive, test the query filter on a small set and review results. Archiving the wrong pages is recoverable manually but disruptive. Always dry-run by logging page IDs before executing the archive loop.
Archive does not free space immediatelyArchived pages remain in Notion's trash for 30 days before permanent deletion. During this period they count toward workspace storage.
Check page/get before archivingIn workflows triggered by external events, call page/get first to confirm the page exists and is not already archived before making the archive call.
Credentials in Credentials ManagerAlways use {{ $credentials.notionApiToken }} — never hard-code the token.

Workflow Examples

Example 1 — Archive Completed Projects

Weekly workflow archives all project pages with Status = "Closed" to keep the active project database clean.

// Step 1: ScheduledTrigger (weekly)
// Step 2: database/query
{
  "Database": "{{ $vars.projectsDbId }}",
  "Filter": { "property": "Status", "select": { "equals": "Closed" } },
  "ReturnAll": true
}
// Step 3: Loop over results
// Step 4 per item: page/archive { "Page": "{{ $json.id }}" }
// Step 5: Log archived count to Slack

Example 2 — Conditional Archive on Status Change

Triggered when a page is updated. If the new status is "Rejected", archive the page immediately.

// Step 1: trigger/pageUpdated (Database: proposals DB)
// Step 2: page/get { "Page": "{{ $trigger.pageId }}", "Simplify": true }
// Step 3: IfCondition
// Condition: {{ $output.getPage.properties.Status }} === "Rejected"
// True: page/archive { "Page": "{{ $trigger.pageId }}" }
// False: StopWorkflow

Example 3 — Test Cleanup

After an integration test run that creates Notion pages, archive all test records identified by a test prefix in the title.

// Step 1: database/query (filter: Name starts_with "[TEST]")
// Step 2: Loop over test pages
// Step 3 per page: page/archive
// Step 4: Log total test pages archived