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
| Trigger | What it is | Applies to | Use it when |
|---|---|---|---|
| Schedule-based | Recurring runs, such as every day at 6:00 AM, weekly on Mondays at 9:00 AM or monthly on the 1st | Dataset Refresh, File Collection, Scheduled Export, Messaging | Timing is predictable |
| Manual | On demand with Run now | All automation types | Testing, failures, ad-hoc reports |
| File upload | Runs when files are uploaded to the source folder | Data Consolidation | Data arrives as files |
| Webhook (data push) | External systems push data over HTTP. Rows are added every 5 min, hourly, daily or by hand | Webhook datasets | You don't control when data arrives |
| API trigger | External systems run an automation with a PATCH request or the CLI | Any Active automation | Upstream 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": ""}]}'
| Part | Value |
|---|---|
| Method and path | PATCH /workspaces/22/projects/5/automations/123 (your workspace, project and automation ids) |
| Base URL | https://app.mammoth.io/api/v2 |
| Authentication | An 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
| Pattern | Example |
|---|---|
| Upstream completion | ERP finishes its nightly batch → API call → Mammoth refreshes the data |
| Event-driven | Payment system processes transactions → webhook → dataset updated with the new records |
| External workflow tool | An 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
| Symptom | Cause | Fix |
|---|---|---|
| Run now is greyed out | The automation is Suspended | Toggle it back to Active in the detail panel, then use Run now |
| Webhook data doesn't appear in the dataset | The URL or secret is wrong, or the rows are waiting for the next Add new rows run | Open 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 Unauthorized | The API token is missing, invalid or revoked | Send 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 403 | A token limited to one project is used in another project | Use a token for this project. See API errors |
| API says "Automation is suspended; resume it before running" | The automation is Suspended | Resume 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.
Related
- Schedule options: units, first run, end date, plan limits and time zones.
- Manage automations: suspend, resume and run an automation in the app.
- Receive data by webhook: every option on the Webhook card.
Something wrong? support@mammoth.io