/twilio-cloudflare-workflow

Use Cloudflare Workers to create a scheduled durable execution with your Twilio applications

Primary LanguageTypeScript

Cloudflare Workflows 🧡 Twilio

This repo is an example of how to use Cloudflare Workers + Workflows to create a time based Twilio experience.

Twilio allows you to buy phone numbers that you can program. You can send and receive messages, and even make actual phone calls.

Setup

Get your Twilio Phone Number

If you don't have an account head over to Register and Get Started

Install your dependencies

npm install

Deploy

Upload your secrets

Log into

npx wrangler secret put TWILIO_ACCOUNT_SID
npx wrangler secret put TWILIO_AUTH_TOKEN
npx wrangler secret put TWILIO_PHONE_NUMBER

Deploy your application

npm run deploy

This will give you a URL, copy it and paste it

Set up your Twilio Phone Number

Head over to your phone number and change the Incoming Message to Webhook and for the URL replace it with the URL from the deployment followed by a forward slash, then incoming.

https://<your-url-from-previous-step>/incoming

Make sure you save the configuration.