How to send transactional emails and SMS from Webflow Cloud (SendGrid + Twilio + Postmark)
Blog post from Webflow
Webflow Cloud leverages Cloudflare Workers for efficient, globally distributed runtime capabilities, which are well-suited for API routes and server-side logic but require alternative methods for email and SMS services due to the unavailability of node:http or node:https. This guide provides solutions for integrating email and SMS functionalities using plain fetch() calls with SendGrid, Postmark, and Twilio, which are natively supported by Workers. It outlines the setup of environment variables, emphasizing the need for these to be injected at request time rather than build time, and describes creating helper modules for each service to facilitate sending emails and SMS within Webflow Cloud apps. The guide details the construction of these helper functions, which utilize REST APIs and require correct authentication and environment variable management, offering a streamlined approach compared to traditional SDKs. It also covers the deployment and verification process, highlighting common errors such as authentication failures and SDK incompatibility, and suggests best practices for ensuring reliable email and SMS communications.