Scheduled automation keys under cron.*, plus the media model template variable surface.

For the full key index and the other top-level config domains, see Configuration reference.

Automations (cron)

{
  cron: {
    enabled: true,
    triggers: {
      enabled: true,
    },
    webhookToken: "replace-with-dedicated-token", // optional bearer token for outbound webhook auth
    webhookSsrfPolicy: {
      allowedHostnames: ["127.0.0.1"], // optional exact exception for a trusted receiver
    },
    sessionRetention: "24h", // duration string ("0h" disables) or false
  },
}

The cron block is strict; cron.enabled, cron.skipMissedJobs, cron.triggers, cron.webhookToken, cron.webhookSsrfPolicy, cron.sessionRetention, and cron.failureAlert are the only accepted keys. The retired cron.webhook fallback URL is gone: runtime delivery uses per-job delivery.mode = "webhook" plus delivery.to, or delivery.completionDestination when preserving announce delivery. apus doctor --fix strips a leftover cron.webhook from existing config files.

cron.failureAlert

{
  cron: {
    failureAlert: {
      enabled: false,
      after: 2,
      cooldownMs: 3600000,
      includeSkipped: false,
      mode: "announce",
      channel: "last",
      to: "channel:C1234567890",
      accountId: "main",
    },
  },
}

cron.failureAlert owns the global alert policy and its default destination. Jobs with an existing failure route are covered by default after 2 consecutive execution failures with a 1-hour cooldown; a cron.failureAlert object explicitly activates/tunes the policy even when no route existed. The retired cron.failureDestination block is merged into it by apus doctor --fix.

See Automations. Cron records isolated automation run history.

Media model template variables

Template placeholders expanded in tools.media.models[].args:

Variable Description
{{Body}} Full inbound message body
{{RawBody}} Raw body (no history/sender wrappers)
{{BodyStripped}} Body with group mentions stripped
{{From}} Sender identifier
{{To}} Destination identifier
{{MessageSid}} Channel message id
{{SessionId}} Current session UUID
{{IsNewSession}} "true" when new session created
{{AttachmentUrl}} Current attachment URL or provider reference
{{AttachmentPath}} Current attachment local path
{{AttachmentContentType}} Current attachment MIME content type
{{AttachmentDir}} Directory containing AttachmentPath
{{AttachmentIndex}} Zero-based source fact index
{{Transcript}} Audio transcript
{{Prompt}} Resolved media prompt for CLI entries
{{MaxChars}} Resolved max output chars for CLI entries
{{ChatType}} "direct" or "group"
{{GroupSubject}} Group subject (best effort)
{{GroupMembers}} Group members preview (best effort)
{{SenderName}} Sender display name (best effort)
{{SenderE164}} Sender phone number (best effort)
{{Provider}} Provider hint (whatsapp, telegram, discord, etc.)

The legacy {{MediaPath}}, {{MediaUrl}}, {{MediaType}}, and {{MediaDir}} names remain available during the plugin SDK compatibility window but are deprecated. New configuration should use the Attachment* variables.