Notion -> Page: Trash
Readonly
Action summary
How to Get a Notion API Key
Create an Integration
- Go to the Notion Developers Portal.
- Click "New Integration", name it, select a workspace, and submit.
Get Your API Key
- Copy the Internal Integration Token from the integration settings page.
Grant Database Access
- Open your Notion database.
- Click the three button dropdown at the top right of your screen, click Connections, and then select your integration.
Use the API Key
- Add it to your Xano Actions in the
Settings Registryinput option:
- Add it to your Xano Actions in the
For more details, see the Notion API Docs.
Notion → Page: Trash
Overview
This Xano action moves a Notion page to trash using its unique identifier (page_id). It uses the Notion API's PATCH method to archive the page.
Inputs
| Name | Type | Description |
|---|---|---|
notion_api_key |
registry | text |
page_id |
text | The unique identifier of the page to trash |
Function Stack
Notion API Request
- API Endpoint:
https://api.notion.com/v1/pages/%s - HTTP Method: PATCH
- Headers:
- Authorization: Bearer
<notion_api_key> - Notion-Version: 2022-06-28
- Authorization: Bearer
- Replace
%sin the endpoint with the providedpage_id
- API Endpoint:
Precondition
- Ensures that the HTTP request was successful
- Condition:
notion_api_response.status == 200 - If this condition fails, execution halts and an error is thrown
Response
| Key | Value |
|---|---|
As Self |
Returns notion_api_response.result |
Example
Input
{
"page_id": "59833787-2cf9-4fdf-8782-e53db20768a5"
}
Output
{
"object": "page",
"id": "be633bf1-dfa0-436d-b259-571129a590e5",
"created_time": "2022-10-24T22:54:00.000Z",
"last_edited_time": "2023-03-08T18:25:00.000Z",
.
.
.
"url": "https://www.notion.so/Bug-bash-be633bf1dfa0436db259571129a590e5"
}
Version notes
2025-01-13 15:15:17
Current