Skip to main content
onMailhook creates a managed @automations.automate.ax address. Each declaration gets a unique address by default; scope: "automation" or scope: "project" shares an address at that scope.

Example

automations/reply-inbox.automation.ts
Selecting Request a reply in the dashboard sends one email to every current organization member and uses the Platform email allowance. The matching reply starts a separate root run, correlate joins it to the dashboard run through plusPath, and markSignificant keeps the correlated run visible without sending another email. inbox.address is the deployed inbound address as a static string. Use it as sendEmail’s replyTo for an exact trigger address. For automation- or project-scoped mailhooks, you can instead pass { scope } and an optional static or signal-valued plusPath.

Options

onMailhook configuration is static and can’t use signals. Trigger scope gives each declaration a unique address. Automation scope shares an address across the automation. Project scope shares an address across the project. Every active subscription at that scope receives matching email.

Plus routing

Append +suffix before the @ to route related addresses through the same mailhook. For example, if inbox.address is abc@automations.automate.ax, email sent to abc+invoices@automations.automate.ax sets plusPath to "invoices". Use correlationId when the originating signal has no natural correlation key. Use valid email local-part characters and keep the complete local part before @ within the 64-byte email limit.

Trigger data

onMailhook returns an email signal with static address: string and this message data: Replies use the same trigger as other inbound email. Filter on isReply when an automation should only continue for replies.