Email triggers
Scripts and flows can be triggered by email messages sent to a specific email address, leveraging SMTP.
Email triggers on Windmill Community Edition are limited to 100 emails per day.
Configuration
Email triggers is available on both cloud and self-hosted instances.
Cloud
On cloud instances, Email triggers is already configured. You can try it from demo workspace.

Self-hosted
First, make sure that the port 25 is exposed either on your instance public IP or a separate IP and that it redirects to the Windmill app on port 2525. The Caddyfile already contains the necessary configuration for this. For Kubernetes, you will find example configurations for some providers on the Windmill helm charts repository.
In addition, you will need to create one or two records in your DNS provider depending on your setup.
If the port 25 is exposed on the same IP as the Windmill instance (e.g. docker-compose with Caddy):
- An MX record from
mail.<instance domain>to<instance domain>.
If the port 25 is exposed through a different IP (e.g. Kubernetes):
- An A/CNAME record that points to the IP of the Windmill instance with port 25 exposed (for example
mail_server.<instance domain>). - An MX record from
mail.<instance domain>to the record defined above (mail_server.<instance domain>if following the example).
You can choose any email domain, we suggest using mail.<instance domain>.
Once you have defined the DNS settings, set the email domain in the instance settings under the "Core" tab.

How to use
There are two kind of email triggers: default runnable emails and custom email triggers.
Default runnable emails
Each script and flow has a default trigger email address. You will find the specific email address to use in the triggers panels.
The email address takes the form <path/hash>+<workspace+path/hash+token base32 encoded>@<email domain>.
Custom email triggers
In addition to default runnable emails, you can also create email triggers with a custom address to trigger a script or flow. The local part can only contain lowercase letters, numbers, underscores, and dots (no dashes allowed). Only workspace admins can create custom email triggers or edit the local part of existing ones.
You have the option to prefix the email address with the workspace id.
This is useful for avoiding conflicts when you have a staging and production workspace and you are deploying between the two (see Deploy to prod).
The format is {workspace_id}-{local_part}@yourdomain.com.
On Cloud, the option is always enabled.