Elizon Docs
Guides & Walkthroughs

Schedules, webhooks and email

Run a Package on a schedule, start it from a webhook, and email its output to the installer's team.

This guide builds the shape of the Morning Brief demo: a Workflow that runs every weekday morning, can also be started by a webhook, and emails a summary to the installer's team.

1. Use a Workflow entry point

Schedules and webhooks can only start a Workflow. Make the Workflow the entry point, even if it has a single step that calls your Agent:

elizon.yaml
entryPoint: workflows.morning-brief

compatibility:
  requiredCapabilities: [workflows, schedule]

agents:
  - name: brief-writer
    ref: ./agents/brief-writer.yaml
workflows:
  - name: morning-brief
    ref: ./workflows/morning-brief.yaml

2. Add the triggers

elizon.yaml
triggers:
  - id: weekday-morning
    type: schedule
    cron: '30 7 * * 1-5'
    timezone: Europe/Sofia
    description: 07:30 local time, Monday to Friday.
  - id: on-demand
    type: webhook
    description: Ask for the brief out of band.
  • The time zone is required. 30 7 * * 1-5 alone would mean 07:30 UTC, which drifts by an hour across daylight-saving changes. With a zone, the brief stays at 07:30 local all year.
  • Europe/Sofia is your zone. Installers confirm or change the schedule in the wizard's Triggers step.
  • schedule must appear in requiredCapabilities, or validate fails with MANIFEST_CAPABILITY_DISAGREEMENT.

3. Send the result by email

Where the brief goes is not something the Package declares. Add a Send Email node at the end of the Workflow:

workflows/morning-brief.yaml
- id: send
  type: send_email
  data:
    subject: Morning brief
    body: '{{ upstream.write.output.text }}'
    bodyFormat: markdown
    attachments: []

Only the message travels in the Package. The SMTP server, its password (a {{secret.…}} reference to the installer's Secrets) and the recipients are the installer's, so they are left out of the artifact. After installing, the installer opens the Workflow and fills them in on the node, and can change them at any time. To attach the brief as a PDF, add a Convert to File node before it and attach {{ upstream.<nodeId>.output.file }}.

The only Slot this Package needs is the model:

elizon.yaml
slots:
  - id: reasoning
    type: llm
    required: true
    description: The model that writes the brief.

4. Validate, build, sign, install

npx @elizon/cli@<cliVersion> validate
npx @elizon/cli@<cliVersion> build
npx @elizon/cli@<cliVersion> sign <artifact.pkg> --yes

Install through Studio → Packages → Install a Package, or with npx @elizon/cli install … --activate. Activation is what arms the schedule and generates the webhook address.

After activation

  • The installed schedule shows its next run in the installer's time zone.
  • The webhook's address and token are shown once, at activation. The installer copies them into whatever will call it.
  • A webhook call starts the entry point with the posted body. Declare the fields you expect under payload.fields so installers know what to send.

The api trigger instead of a webhook

If the caller wants the answer back rather than fire-and-forget (a purchasing system asking for an approval decision, say), declare an api trigger. It's exposed through the Elizon public API the installer already uses, with no new endpoint or key. api and manual triggers work with any entry point type, including a single Agent.