FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
lightweight

lightweight

glimpse2-runbook-view-glimpse-save-login

Remix of lightweight/glimpse2-runbook-view-glimpse-save
Public
Like
glimpse2-runbook-view-glimpse-save-login
Home
Code
8
_townie
13
backend
7
frontend
1
shared
1
.vtignore
README.md
deno.json
H
main.tsx
Branches
1
Pull requests
Remixes
1
History
Environment variables
5
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
backend
/
routes
/
tasks
/
README.md
Code
/
backend
/
routes
/
tasks
/
README.md
Search
9/4/2025
README.md

Task Routes

Webhook handlers for Notion integrations.

Endpoints

POST /tasks/url

Updates a Notion page's URL property with a glimpse URL.

Authentication: Requires X-API-KEY header with NOTION_WEBHOOK_SECRET value.

Request Body:

{ "data": { "id": "page-id-here" } }

Alternative payload structures supported:

{ "id": "page-id-here" }
{ "page_id": "page-id-here" }

Success Response (200):

{ "success": true, "message": "Page URL updated successfully", "pageId": "page-id-here", "url": "https://your-domain.com/glimpse/page-id-here", "timestamp": "2024-01-01T00:00:00.000Z" }

Error Responses:

400 - Missing page ID:

{ "success": false, "error": "Page ID is required in webhook payload" }

400 - Missing host header:

{ "success": false, "error": "Host header is required" }

500 - Notion API error:

{ "success": false, "error": "Failed to update Notion page with URL", "details": "Notion API error message" }

Testing:

curl -X POST https://your-val.web.val.run/tasks/url \ -H "X-API-KEY: your-notion-webhook-secret" \ -H "Content-Type: application/json" \ -d '{"data": {"id": "your-page-id"}}'

POST /tasks/notion-webhook

Main webhook endpoint for Notion integrations.

Authentication: Requires X-API-KEY header with NOTION_WEBHOOK_SECRET value.

POST /tasks/test

Test endpoint for webhook authentication.

Authentication: Requires X-API-KEY header with NOTION_WEBHOOK_SECRET value.

Success Response (200):

{ "success": true, "message": "Webhook authentication successful", "timestamp": "2024-01-01T00:00:00.000Z" }

GET /tasks/debug-webhook

Debug endpoint to check webhook configuration.

No authentication required.

Response:

{ "hasSecret": true, "secretLength": 32 }
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.