Appearance
Event Triggers
Event Triggers let you run secure logic automatically when specific events occur. You build them exactly like you would build API Endpoints but Event Triggers are internal only, meaning there is no public URL and they cannot be called from outside your app.
Instead, WeWeb runs them when the selected event happens.
When do triggers run?
Triggers fire automatically when the selected event occurs (for example, a user requests a magic link or completes sign up).
Interface action: Sign up with email
Event Trigger: On after sign up
Interface action: Request magic link
Event Trigger: On magic link requested
Example use cases
Send magic link emails automatically
When a user requests a magic link, send the email right away with the link.
Example use: on On magic link requested, send an email to the user who requested the link.
Send one‑time codes (OTP)
Deliver a one‑time code for sign‑in, verification, or password reset.
Example use: on On OTP requested, send the code to the user and (optionally) log attempts to prevent abuse.
Pre‑validate sign ups
Run checks before accounts are created to block bad data or apply rules.
Example use: on On before sign up, return an error if the password does not meet your custom requirements.
Welcome new users and prepare data
Right after sign up, send a welcome email and create any needed default records.
Example use: on On after sign up, send a welcome email to the user and assign them to a default pricing plan.
Core parts of Event Triggers
Event Data
When an event fires, it will pass data related to the event in its respective event data.
This data can then be used in the logic you create in the Event Trigger.
For example, in the On after sign up Event Trigger, you would have access to the information about the user who just signed up, such as their email, and any other information you may take at sign up (like a name or address).
Logic
The logic is where you define what should happen when the Event Trigger is fired.
To make your logic dynamic, you can use the data that has been passed by the event.
In the example of the On after sign up Event Trigger, you may want to send the new user a welcome email. To do so, you could use the Send email action of the Resend integration, and send the email to the email passed in the event data.

