> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On routing form submission created

> Run an automation when someone submits a Calendly routing form.

`calendly.onRoutingFormSubmissionCreated` requires organization scope and Calendly Teams or above.

```ts automations/calendly-routing-submission.automation.ts theme={null}
import { automation, sendEmail } from "automate.ax"
import { calendly } from "automate.ax/calendly"

export default automation("Review Calendly routing", () => {
  const event = calendly.onRoutingFormSubmissionCreated({
    organizationUri: "https://api.calendly.com/organizations/organization-id",
    scope: "organization",
  })
  sendEmail({
    subject: "New routing form submission",
    text: JSON.stringify(event.payload.questionsAndAnswers),
  })
})
```

The payload includes answers, UTM and Salesforce tracking, the submitter when a meeting was booked, and a typed result for an event type, external URL, or custom message.
