// the find
twilio-labs/function-templates
Twilio Function templates for different Voice, SMS, Video, Chat, Sync, etc use cases
An official Twilio-maintained collection of serverless Function templates covering common telephony patterns — call forwarding, SMS bots, conference rooms, spam blocking, Airtable integrations, and more. Each template is a self-contained directory with its own package.json, environment config, and tests. The target audience is developers building on Twilio who want a working starting point rather than reading docs.
Each template is genuinely self-contained: its own package.json, .env.example, tests with real fixture data (see the spam-filter test JSON files), and a README — you can lift one directory and deploy it without touching the rest of the repo. Test coverage is consistent across templates, not an afterthought. The CLI integration via `twilio-run new` means you can scaffold a template without cloning the whole thing. Active maintenance: last push was recent and GitHub Actions runs lint and test on every PR.
The README openly admits CJS/ESM compatibility is broken on Node v18+ but offers no fix — just a warning and a blog link. That is the current LTS runtime; this is a real adoption wall they haven't cleared. The `experimental-flex-dialpad` template ships compiled, minified private JS blobs (flex-dialpad-addon.private.js, .map) instead of source — in a template repo meant to be read and modified, that defeats the purpose. Several templates are clearly stale: covid-vaccine-faq-bot has prebuilt Dialogflow agents for a 2021 public health crisis. Some templates (forward-call, forward-message) have CLAUDE.md and AGENTS.md files checked in alongside copilot-instructions.md — these look like developer experimentation that leaked into the repo rather than anything useful to the template consumer.