• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
colel

colel

slack-notification-triage-webhook

Public
Like
slack-notification-triage-webhook
Home
Code
11
CONFIGURATION.ts
LINEAR_EXAMPLE.md
README.md
H
ai-model-test.ts
ai-service.ts
citation-context.ts
H
linear-webhook.ts
main.tsx
notification-triage.ts
H
sentry-webhook.ts
stringify-utils.ts
Branches
1
Pull requests
Remixes
History
Environment variables
2
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
/
LINEAR_EXAMPLE.md
Code
/
LINEAR_EXAMPLE.md
Search
8/18/2025
Viewing readonly version of main branch: v60
View latest version
LINEAR_EXAMPLE.md

create bf32e89b-aaf8-4431-9790-8034b94c0988 Charlie 072c476d-9b26-4fba-bcb3-692e798f6485@oauthapp.linear.app https://public.linear.app/9f748af2-7258-4540-a068-817e1b0062f8/eae8dc19-fa4e-4c28-9327-ac7e7fb98409/256x256/6ab0f222-0e95-4042-a349-e9fc80b79d47 https://linear.app/phosphor/profiles/charlie user 2025-08-18T15:10:59.609Z 05f91f23-bce8-4a14-9abe-d965a6e47ff1 2025-08-18T15:10:59.609Z 2025-08-18T15:10:59.609Z 105

Val Town service: issue notification triage (Receive -> Convert -> Delegate -> Deliver) 0 -11691 -50714 2025-08-18T15:10:59.678Z all 2025-08-18T15:10:59.683Z ac9636f1-4ac0-481f-94f7-7efa039defa9 50636689-fc9d-495b-953b-9b17cf74b90b

bf32e89b-aaf8-4431-9790-8034b94c0988 a2f2b1db-992c-4325-9994-ce97c6a224d2 8a87416e-b6a6-4e73-b925-8e9844e9a421

No priority null ENG-105 https://linear.app/phosphor/issue/ENG-105/val-town-service-issue-notification-triage-receive-convert-delegate bf32e89b-aaf8-4431-9790-8034b94c0988 a2f2b1db-992c-4325-9994-ce97c6a224d2 a2f2b1db-992c-4325-9994-ce97c6a224d2 Cole Lawrence cole@phosphor.co https://public.linear.app/773e1976-1cf3-4f20-a94a-8838b9604f8c/a84b0191-0e19-4374-8174-6d15314bd7a4/db0d7b19-b0ee-4c0a-ba31-2fdf62a50cf3 https://linear.app/phosphor/profiles/cole 8a87416e-b6a6-4e73-b925-8e9844e9a421 #FC7840 Triage triage 50636689-fc9d-495b-953b-9b17cf74b90b ENG Engineering ac9636f1-4ac0-481f-94f7-7efa039defa9 #26b5ce Exploration 2ca86760-7be8-4c9e-8c19-0662a0c209a8 Build a Val Town–hosted webhook service that normalizes issue notifications, delegates routing to our shared AI triage system, and delivers concise, actionable messages to the right audiences. This should reduce notification fatigue and improve signal/noise.

*Source:* Slack thread [https://phosphor-group.slack.com/archives/C09AZBC6MNY/p1755529682771019](https://phosphor-group.slack.com/archives/C09AZBC6MNY/p1755529682771019) (Aug 18, 2025)

## Goals

* Cut noisy, broadcast-style alerts; send targeted, actionable notifications
* Centralize triage logic so sources can be added without rework

## Scope (pipeline)

1. **Receive & Validate** – HTTP endpoint(s) on Val Town for source webhooks; verify signatures/headers, basic schema validation
2. **Convert** – Map each payload to a standard `NotificationData` structure
3. **Delegate** – Call the shared AI triage service for routing decisions (audience, urgency, suppress/merge)
4. **Deliver** – Format and send notifications (Slack channels/DMs; room to add email later)

### Initial sources (MVP)

* GitHub: issues, PRs, comments, and label/state changes
* Linear: issue created/updated (subset to start)

### Standard shape (draft)

```ts
export type NotificationData = {
source: 'github' | 'linear';
kind: 'issue' | 'pr' | 'comment';
id: string;            // source id (node id or number)
title?: string;
body?: string;
url?: string;
project?: string;      // repo or team/project
labels?: string[];
assignees?: string[];
createdAt: string;     // ISO
updatedAt?: string;    // ISO
author?: { name: string; id?: string };
};
```

### Delivery (Slack)

* Compact, skim-friendly block with: title, summary, key labels/state, primary action link
* Optional: thread replies for follow-ups or merged events

### Security & ops

* Validate upstream signatures (e.g., GitHub HMAC), rate-limit, and dedupe
* Secrets via Val Town environment; minimal request logging with PII scrubbing; 7‑day retention
* Basic health check endpoint and error alerting

## Acceptance criteria

* Val Town endpoint accepts GitHub and Linear webhooks and returns 2xx on valid payloads
* Payloads convert to `NotificationData` and are persisted/transiently queued (in‑memory ok for MVP)
* Delegation call to AI triage service returns a routing decision and is honored
* Slack message is posted to the decided destination with links and minimal boilerplate
* Signature verification and a simple dedupe mechanism are in place
* README in the Val repo documents setup (secrets, webhook config, sample payloads)

## Open questions

* Which Slack destinations for MVP (exact channels/DM groups)?
* Confirm AI triage endpoint + contract (URL, auth, request/response schema)
* Any non-issue sources to include next (Sentry alerts, CI failures)?
{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Build a Val Town–hosted webhook service that normalizes issue notifications, delegates routing to our shared AI triage system, and delivers concise, actionable messages to the right audiences. This should reduce notification fatigue and improve signal/noise."}]},{"type":"paragraph","content":[{"type":"text","text":"Source:","marks":[{"type":"em","attrs":{}}]},{"type":"text","text":" Slack thread "},{"type":"text","text":"https://phosphor-group.slack.com/archives/C09AZBC6MNY/p1755529682771019","marks":[{"type":"link","attrs":{"href":"https://phosphor-group.slack.com/archives/C09AZBC6MNY/p1755529682771019"}}]},{"type":"text","text":" (Aug 18, 2025)"}]},{"type":"heading","attrs":{"level":2,"id":"1baf5da9-7f5f-4bcc-a50c-82bcefb8493a"},"content":[{"type":"text","text":"Goals"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"Cut noisy, broadcast-style alerts; send targeted, actionable notifications"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"Centralize triage logic so sources can be added without rework"}]}]}]},{"type":"heading","attrs":{"level":2,"id":"6b985aa5-0f42-44ba-b539-0955337c8688"},"content":[{"type":"text","text":"Scope (pipeline)"}]},{"type":"ordered_list","attrs":{"order":1},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"Receive & Validate","marks":[{"type":"strong","attrs":{}}]},{"type":"text","text":" – HTTP endpoint(s) on Val Town for source webhooks; verify signatures/headers, basic schema validation"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"Convert","marks":[{"type":"strong","attrs":{}}]},{"type":"text","text":" – Map each payload to a standard "},{"type":"text","text":"NotificationData","marks":[{"type":"code","attrs":{}}]},{"type":"text","text":" structure"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"Delegate","marks":[{"type":"strong","attrs":{}}]},{"type":"text","text":" – Call the shared AI triage service for routing decisions (audience, urgency, suppress/merge)"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"Deliver","marks":[{"type":"strong","attrs":{}}]},{"type":"text","text":" – Format and send notifications (Slack channels/DMs; room to ad…
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.