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

wilt

emailToDiscordWebhook

Public
Like
emailToDiscordWebhook
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
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

Email to Discord Forwarder

Usage

First, create a Discord Webhook and add it to your Val.town environment variables.

Then create an Email Val:

Create val
import { getEmailHandler } from "https://esm.town/v/wilt/emailToDiscordWebhook?v=19"; // e.g. ["email@example.com", "otherEmail.address.biz"] const senderAllowlist = JSON.parse(Deno.env.get("DISCORD_EMAIL_ALLOWLIST") || "[\"*\"]"); const webhookUrl = Deno.env.get("MY_DISCORD_WEBHOOK")!; export default getEmailHandler({ replyToSender: false, senderAllowlist, webhookUrl, });

Now, whenever you send an email to your email val, it will be forwarded to your Discord webhook

Code
README.mdmain.tsx
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.