• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
project logo

lightweight

findings

Remix of lightweight/findings-base
Public
Like
findings
Home
Code
9
_townie
6
backend
7
frontend
1
shared
1
.vtignore
deno.json
H
main.tsx
test-findings-controller.ts
test-run-findings-cron.ts
Branches
2
Pull requests
Remixes
History
Environment variables
8
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
8/16/2025
Viewing readonly version of main branch: v26
View latest version
README.md

Task Routes

Webhook handlers for Notion integrations.

Endpoints

  • POST /tasks/blob - Process PDF extraction and blob storage for Notion pages
  • POST /tasks/dupe - Duplicate Notion page to final reports database with content filtering
  • POST /tasks/notion-webhook - General Notion webhook handler
  • POST /tasks/test - Test endpoint for webhook authentication
  • GET /tasks/debug-webhook - Debug endpoint to check webhook configuration

Architecture

Routes handle HTTP request/response only. Business logic is delegated to:

  • tasks.controller.ts - Orchestrates PDF extraction, blob storage, page duplication, and Notion updates
  • notion.service.ts - Handles Notion API calls
  • pdfExtractor.ts - Handles PDF text extraction

Page Duplication (/tasks/dupe)

The /tasks/dupe endpoint duplicates a Notion page from any database to the final reports database (FINDINGS_REPORTS_FINAL_DB_ID) with content filtering:

Content Filtering

  • Removes: Callout blocks, code blocks, divider blocks, blocks containing "Evidence summary", blocks containing "Methodology", blocks containing "Executive summary"
  • Preserves: All other content blocks in original order
  • Source: Original page remains unchanged

Webhook Payload

Expects Notion webhook with page ID in data.id:

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

Response Format

{ "success": true, "sourcePageId": "source-page-id", "targetPageId": "new-page-id", "blocksCopied": 15, "blocksFiltered": 3, "timestamp": "2025-08-15T22:25:47.000Z" }
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.