Skip to content
Skip to content
PGB Learn

Event rules: react when something happens

Route events such as user.created to a queue, function, webhook or email, and test rules with a sample event.

Updated Nov 12, 2026

Events let you separate "something happened" from "what should happen next". A rule matches an event name and sends it to a target. You can add a new side effect, such as a welcome email or a sync to another system, without touching your sign-up code.

Open Events & Webhooks

In the sidebar, under Platform Services, choose Events & Webhooks. The page, Event Bus & Reactive Triggers, lists your Event Routing Rules and the Recent Event History.

Which events you can use

Your project's authentication emits these events, and any rule matching them runs automatically:

  • user.created
  • user.login
  • user.login_failed
  • user.password_reset
  • session.revoked

Actions can also emit events through an event effect. See Actions. Your own server code does not emit custom event names directly; events come from authentication, from actions, and from the Emit a Test Event form.

Create a rule

  1. Choose + Create Event Rule.
  2. Enter an Event Pattern, such as user.created, or a pattern with a star, such as user.* or * for everything.
  3. Choose a Target Type:
    • Queue (Enqueue message): enter the queue name.
    • Function (Execute Cloud Function): pick a deployed function.
    • Webhook (HTTP POST): enter the URL and method. The address must be public, because internal or private targets are blocked.
    • Mail (Send Email): enter a recipient and subject.
  4. Add a Description if you like.
  5. Choose Create Rule.

A rule that is missing its target details is refused, for example "Enter a queue name" or "Enter the webhook URL to call", so a rule never silently does nothing.

Test a rule

Use Emit a Test Event to fire a real event through the bus without waiting for the real trigger. Enter an Event Name such as user.created and a Payload (JSON), then choose Emit Event. The result appears in Recent Event History with the event name, target, status (Success, Failed, or Spend Cap), attempts and time.

Good to know

  • Each matching rule runs separately, so one event can trigger a function and a queue message at once.
  • The history shows how many attempts each delivery took and whether it succeeded, so you can see why one failed.
  • To delete a rule, choose Delete on its row. Events already delivered are not undone.
  • For webhooks you receive from other services, see Webhooks: receiving and sending.

More guides in Console: realtime & queues