> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://docs.mammoth.io/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Triggers

> Configure when automations execute using schedules, manual runs, file uploads, API calls, and webhook data pushes

Triggers determine when your automations execute. Mammoth supports several trigger mechanisms—from time-based schedules to on-demand runs, file uploads, external API calls, and a webhook data ingestion path for pushing data from external systems.

## Trigger types overview

| Trigger | Description | Applies to |
| --- | --- | --- |
| **Schedule-based** | Time-based recurring execution | Dataset Refresh, File Collection, Messaging |
| **Manual** | On-demand via **Run now** | All automation types |
| **File upload** | Runs when files are uploaded to the source folder | Data Consolidation |
| **Webhook (data push)** | External systems push data via HTTP | Webhook datasets |
| **API trigger** | External systems trigger automations programmatically | Existing automations |

## Schedule-based triggers

The most common trigger—automations run at a configured time interval. See the [Scheduling](https://docs.mammoth.io/learn/automations/scheduling) page for the complete configuration reference.

**Common patterns:**

| Pattern | Configuration |
| --- | --- |
| Daily operations | Every 1 Day at 6:00 AM |
| Weekly reporting | Every 1 Week on Monday at 8:00 AM |
| Monthly close | Monthly on the 1st at 11:45 PM |

## Manual triggers

Run any **Active** automation immediately without waiting for the scheduled time, from the detail panel or the three-dot menu. See [Run now](https://docs.mammoth.io/learn/automations/managing-automations/#running-manually-run-now) for the steps. Run now is only available while the automation is **Active**; a suspended automation must be resumed first.

**When to use manual triggers:**

- Testing a new automation before enabling its schedule
- Re-running after resolving a failure
- Ad-hoc reporting when stakeholders need data immediately
- Verifying a configuration change worked correctly

A Dataset Refresh set to **Manual only** has no automatic runs at all; it runs only when you trigger it manually or through the API.

## File upload triggers

**Data Consolidation** automations execute automatically when new files are uploaded to their configured source folder. No manual trigger or schedule needed—the upload event itself kicks off the consolidation.

See [Data Consolidation](https://docs.mammoth.io/learn/automations/data-consolidation/) for setup details.

## Webhook data ingestion

Webhooks let external systems push data directly into a Mammoth dataset over HTTP. Instead of uploading files manually, your application sends a payload to a unique URL and Mammoth ingests it automatically.

### Creating a webhook dataset

1. In the Data Library, click **+ New Dataset**
2. In the modal, select **Webhooks** from the left sidebar
3. Configure the two fields:

| Field | Description |
| --- | --- |
| **New webhook name** | Name for the dataset receiving incoming data |
| **Dataset mode** | How incoming payloads are applied to the dataset |

**Dataset mode options:**

| Mode | Use when |
| --- | --- |
| **Replace the older data** | External system sends full snapshots each time (e.g., complete CRM export) |
| **Combine with older data** | External system sends incremental records (e.g., new transactions since last send) |

4. Click **Create new dataset**

Mammoth generates a unique **webhook URL** for this dataset. By default, any request to that URL is accepted—no secret required.

To require authentication, enable the **Secure header** toggle in the dataset's Settings panel. Mammoth generates a secret and every request must then include it as an `X-SECRET` header:

```plaintext
X-SECRET: <your-secret-value>
```

Requests missing the header, or sending the wrong value, are rejected with an "Invalid webhook secret" error, and their data is not ingested.

> **Keep your webhook secret secure.** Anyone with the URL and secret can push data into this dataset.

### Sending data to the webhook

Your external system sends an HTTP `POST` to the webhook URL with the data payload (JSON or form data), and the `X-SECRET` header if the secure header is enabled.

Mammoth validates the request, stages the incoming data, and then adds it to the dataset. Incoming data is not available instantly.

## API triggers

External systems can trigger Mammoth automations programmatically via the Mammoth API. This enables event-driven architectures where upstream processes notify Mammoth to run after completing their own work.

**Authentication:** API credentials are required. See the [API reference](https://docs.mammoth.io/build/) for authentication details.

**Common integration patterns:**

| Pattern | Example |
| --- | --- |
| Upstream completion | ERP finishes nightly batch → API call → Mammoth refreshes dashboards |
| 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. Retry rate-limited calls after a short delay instead of sending them repeatedly.

## Choosing the right trigger

| Use this trigger | When |
| --- | --- |
| **Schedule-based** | Predictable timing, independent of other systems |
| **Manual** | Testing, handling failures, ad-hoc reporting |
| **File upload** | Data arrives as files from multiple sources |
| **Webhook** | External systems push data; you don't control when it arrives |
| **API** | Upstream processes complete at variable times; you need to be notified |

## Troubleshooting

### Automation doesn't run at the scheduled time

See [Scheduling troubleshooting](https://docs.mammoth.io/learn/automations/scheduling#troubleshooting).

### Run now is grayed out

**Cause:** The automation is **Suspended**.

**Fix:** Toggle it back to **Active** in the detail panel, then use **Run now**.

### Webhook data doesn't appear in the dataset

**Cause:** The webhook URL or secret is wrong, or the data has not been added yet. Incoming webhook data is not added instantly.

**Fix:**

- Confirm the webhook URL is correct and the secret is sent in the `X-SECRET` header
- Wait a few minutes and refresh the dataset

### API trigger returns 401 Unauthorized

**Cause:** The API credentials are missing, expired, or lack permission for the target automation.

**Fix:**

- Verify the API key is valid and not expired
- Check that you send the key the way the [API reference](https://docs.mammoth.io/build/) describes
- Confirm the API key has permissions for the target automation

---
Source: https://docs.mammoth.io/learn/automations/triggers.md · Updated: 2026-10-03