Skip to content
Learn › Automate: open the docs menu

Start a Mammoth automation now, on a file or by API

An automation starts on its schedule, when you click Run now, when a new file lands in a folder, or when another system calls the Mammoth API or CLI. You set the schedule on the Set Schedule step (Set trigger for Messaging) of the New automation window, or later with Edit schedule in the automation's Schedule row. Every schedule option is on Schedule options.

What can start an automation

TriggerWhat it isApplies toUse it when
Schedule-basedRecurring runs, such as every day at 6:00 AM, weekly on Mondays at 9:00 AM or monthly on the 1stDataset Refresh, File Collection, Scheduled Export, MessagingTiming is predictable
ManualOn demand with Run nowAll automation typesTesting, failures, ad-hoc reports
File uploadRuns when files are uploaded to the source folderData ConsolidationData arrives as files
Webhook (data push)External systems push data over HTTP. Rows are added every 5 min, hourly, daily or by handWebhook datasetsYou don't control when data arrives
API triggerExternal systems run an automation with a PATCH request or the CLIAny Active automationUpstream processes finish at varying times

A Scheduled Export runs its export steps on its own schedule (Day, Week, Month or Year), whether or not the data changed. They still run after data updates too, unless you turn that off on the export.

Run an automation now

Click Run now on any Active automation to test it before its schedule starts, re-run after a fix, send data someone needs now, or check a configuration change. Mammoth confirms with "Automation triggered successfully". See Run an automation now.

Run an automation when a file arrives

A Data Consolidation runs when a file is uploaded to, or moved into, its source folder. See Combine incoming data.

Receive data pushed by webhook

A webhook lets an external system push data into a Mammoth dataset over HTTP. Your application sends an HTTP POST with a JSON or form-data payload to the dataset's unique URL, with the secret in an X-SECRET header if the webhook has one. Mammoth holds the rows and adds them at the next Add new rows run (5 min, Hourly, Daily or By hand), or when you click Add now.

To create one, click New dataset in the Data Library, choose Connectors, then Push > Webhook. Sends with a wrong or missing X-SECRET are turned away and nothing from them is added. Keep the secret safe: anyone with the URL and secret can push data. See Receive data by webhook.

Run an automation from another system with the API

Another system can run an automation through the Mammoth API, the same as clicking Run now, as soon as an upstream process finishes.

Run an automation with the REST API

Send a PATCH request to the automation with a command operation on the run path:

curl -sS -X PATCH \
  "https://app.mammoth.io/api/v2/workspaces/$WORKSPACE_ID/projects/$PROJECT_ID/automations/$AUTOMATION_ID" \
  -H "Authorization: Bearer $MAMMOTH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"patch": [{"op": "command", "path": "run", "value": ""}]}'
PartValue
Method and pathPATCH /workspaces/22/projects/5/automations/123 (your workspace, project and automation ids)
Base URLhttps://app.mammoth.io/api/v2
AuthenticationAn API token in the Authorization: Bearer mm_... header. Create one in Settings → API Keys → Generate key. See API authentication
Body{"patch": [{"op": "command", "path": "run", "value": ""}]}

List the project's automations with GET /workspaces/22/projects/5/automations to find the id. The same endpoint suspends or resumes an automation: send {"op": "replace", "path": "status", "value": "suspend"} (or "restore" to resume) in the patch list. A suspended automation can't be run through the API: the request is refused with "Automation is suspended; resume it before running".

Run an automation with the CLI

mammoth automation update 123 --input '{"patch": [{"op": "command", "path": "run", "value": ""}]}' --yes

mammoth automation list shows the ids. See mammoth automation for every automation command.

Integration patterns

PatternExample
Upstream completionERP finishes its nightly batch → API call → Mammoth refreshes the data
Event-drivenPayment system processes transactions → webhook → dataset updated with the new records
External workflow toolAn Apache Airflow DAG triggers a Mammoth automation as one step

The API applies per-minute rate limits (Limits and quotas). Retry a rate-limited call after a short delay.

Troubleshooting

SymptomCauseFix
Run now is greyed outThe automation is SuspendedToggle it back to Active in the detail panel, then use Run now
Webhook data doesn't appear in the datasetThe URL or secret is wrong, or the rows are waiting for the next Add new rows runOpen Recent deliveries on the Webhook card. A Turned away entry says why (wrong or missing X-SECRET, or a site the webhook does not allow). Check the sender uses the card's URL and puts the Secret in X-SECRET. Click Add now to add waiting rows
API trigger returns 401 UnauthorizedThe API token is missing, invalid or revokedSend it as Authorization: Bearer mm_... (API authentication) with a token from the automation's workspace. If it was lost or revoked, create a new one in Settings → API Keys
API trigger returns 403A token limited to one project is used in another projectUse a token for this project. See API errors
API says "Automation is suspended; resume it before running"The automation is SuspendedResume it in the app, or send {"op": "replace", "path": "status", "value": "restore"}, then run it again

For a schedule that didn't run on time, see Schedule options.

Was this page helpful?

Something wrong? support@mammoth.io