• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
femiorok

femiorok

slackBotExample

Remix of charmaine/slackBotExample
Public
Like
slackBotExample
Home
Code
4
.vtignore
README.md
E
email.ts
raw-input.txt
Branches
1
Pull requests
Remixes
History
Environment variables
3
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
/
Code
/
Search
README.md

Slack Bot: slackBotExample

This Val processes incoming appointment emails and publishes a job (via Upstash QStash) to our dashboard backend.

How We Use It

  • Source: email.ts parses subject/body to extract patient, firstApptTime, firstApptProvider, and an optional reviewUrl.
  • Publish: Sends a JSON payload to https://outreach-dashboard.vercel.app/new-pt (via QStash publish URL). Our Next.js App Router handles POST /new-pt to insert an outbox row and kick off Slack outreach.
  • Cancel path note: The code defines a CANCEL_URL, but no /cancel route exists in this repo yet.
  • Reliability: QStash ensures delivery and retries; our app’s outbox workflow is idempotent.

Code‑First Workflow

  • Edit code locally in this folder.
  • Publish changes: pnpm vt:push:slack-bot
  • Pull latest remote state: pnpm vt:pull:slack-bot
  • Watch and auto‑push: pnpm vt:watch:slack-bot
  • Stream logs to verify behavior: pnpm vt:tail:slack-bot
  • Open in Val Town UI: pnpm vt:browse:slack-bot

Notes

  • vt push is forceful (no confirmation). To undo, revert in Val Town UI, then pull.
  • If outbound network is restricted, vt -h/vt push may warn about upgrades; re‑run when connected.
Email
  • email.ts
Code
.vtignoreREADME.md
E
email.ts
raw-input.txt
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.