> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.lido.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Triggers: how workflows start

Every workflow starts with a trigger. The trigger determines *when* the workflow runs and *what data* it starts with. This article covers the seven trigger types, when to pick which, and the configuration that matters for each.

---

## Pick a trigger

| If your workflow should run when… | Use… |
| --- | --- |
| You click a button | **Manual Trigger** |
| A schedule hits (daily, hourly, cron) | **Scheduled Trigger** |
| A new file lands in a Google Drive folder | **Google Drive Trigger** |
| A new file lands in a OneDrive folder | **OneDrive Trigger** |
| An email arrives at a Lido-hosted address | **Lido Mailbox Trigger** |
| An email arrives in your Outlook inbox | **Outlook Trigger** |
| An external system sends an HTTP request | **Webhook Trigger** |

You can have multiple triggers in one workflow if they should all start the same pipeline (e.g., extract from both Google Drive AND a mailbox).

---

## Manual Trigger

Use when the workflow should only run when a human clicks Run. Common cases:

- One-off cleanup or migration.
- A workflow that needs human approval before each run.
- Testing.

Configuration: minimal. Optionally accepts input parameters that the user provides when triggering.

---

## Scheduled Trigger

Use when the workflow should run on a fixed cadence:

- Daily report at 9am.
- Weekly digest every Monday.
- Hourly polling of a system that doesn't have webhooks.

Configuration:

- **Schedule** — pick from common cadences (every X minutes, daily, weekly) or set a cron expression for full control.
- **Time zone** — make sure this matches your team's expected zone.

The trigger emits a single item with the current timestamp. Use `$now()` in downstream nodes to reference it.

---

## Google Drive Trigger

Use when documents you want to process arrive in a Google Drive folder.

Configuration:

- **Folder** — the folder to watch (must be accessible to the connected Google account).
- **File types** — restrict to specific extensions (`.pdf`, `.png`, etc.) to avoid triggering on unrelated files.
- **Watch mode** — typically "new files only". Avoid "all changes" unless you genuinely want to re-fire on edits.

The trigger emits one item per new file. The item's `data.file` field is the file reference you pass to downstream nodes (Data Extractor, Copy File, etc.):

```
{{$item.data.file}}        // the file itself
{{$item.data.file.name}}   // file name
{{$item.data.file.url}}    // URL to the file
```

Requires a connected Google account. See **Connect Google Drive**.

---

## OneDrive Trigger

Same shape as Google Drive Trigger, but for Microsoft OneDrive.

Configuration is identical: Folder, File types, Watch mode. Item shape is the same too — `{{$item.data.file}}`.

Requires a connected Microsoft account. See **Connect OneDrive**.

---

## Lido Mailbox Trigger

Use when you want a dedicated email address that triggers a workflow when anything arrives. Lido provisions an address like `your-prefix@yourco.com.lido.email`. Anyone can send to it; each incoming email starts the workflow.

Configuration:

- **Mailbox address** — Lido generates this; you can customize the prefix.
- **Filtering** (optional) — restrict to specific senders or subject patterns.

The trigger emits one item per email. The item's `data.email` field includes the email body, headers, and any attachments. The Data Extractor with Source Type = Email handles both the body and attachments.

```
{{$item.data.email}}                   // the email object
{{$item.data.email.from}}              // sender
{{$item.data.email.subject}}           // subject
{{$item.data.email.body}}              // body text/HTML
{{$item.data.email.attachments}}       // array of attached files
{{$item.data.email.attachments[0]}}    // first attachment
```

No external account needed — Lido hosts the mailbox.

---

## Outlook Trigger

Use when emails come into a real Outlook inbox you control and you want a workflow on them. Useful when you can't tell senders to use a Lido mailbox address.

Configuration:

- **Account** — the connected Outlook account.
- **Folder** — Inbox by default; can target subfolders.
- **Filtering** — typically by subject pattern, sender, or having attachments.

Item shape is the same as Lido Mailbox Trigger: `{{$item.data.email}}`.

Requires a connected Outlook account. See **Connect Outlook**.

---

## Webhook Trigger

Use when another system needs to push data into Lido. The trigger gives you a unique URL; any HTTP POST to that URL starts the workflow with the request body as the item.

Configuration:

- **URL** — Lido generates this. Treat it as a secret.
- **Authentication** — optionally require a header token.
- **Content type** — JSON or multipart form data (multipart for file uploads up to a configurable size limit).

The item is the request body. For JSON: `{{$item.data.fieldName}}`. For multipart with files: the file is at `{{$item.data.file}}` and you can pass it directly to a Data Extractor.

Webhook Triggers turn any external system into a Lido trigger. Useful for:

- Embedding Lido in your own product (your backend POSTs to the webhook).
- Wiring up tools like Zapier, n8n, or Make to start Lido workflows.
- Receiving data from third-party APIs that support webhooks.

---

## Choosing between triggers when both work

| Situation | Best trigger |
| --- | --- |
| Vendors send you invoices by email + you'd rather not give out a personal email address | **Lido Mailbox** (give vendors `invoices@yourco.com.lido.email`) |
| Vendors send invoices to your existing AP email | **Outlook Trigger** on that inbox |
| You handle invoices yourself in a Drive folder | **Google Drive Trigger** |
| Your AP system can push notifications via webhook | **Webhook Trigger** |
| Daily-batch processing only | **Scheduled Trigger** that picks up files from a Drive folder |

When in doubt, **Lido Mailbox** + **Google Drive** are the lowest-friction options.

---

## Tips

- **Start with an empty folder/inbox** when first activating a file/email trigger. Existing items can fire all at once and create a burst of work.
- **Restrict file types** on file triggers. A folder full of `.docx` won't accidentally trigger your PDF extraction workflow.
- **Test with a single item first.** Most triggers have a Test option that uses a recent file/email.
- **Log the source** — add an Edit Item node right after the trigger to capture filename, sender, timestamp. Future-you will want it.
- **Never expose webhook URLs publicly** without authentication. Anyone who has the URL can trigger your workflow.

---

## Common mistakes

- **Activating a trigger pointing at a folder full of files.** It'll fire on all of them. Either start clean or expect (and budget for) a backlog burst.
- **"All changes" instead of "new files only".** Re-fires every time a file is edited. Almost never what you want.
- **No file type restriction.** Random `.docx` or `.txt` files trigger extraction workflows that don't expect them and fail.
- **Mailbox/Outlook trigger with no sender filtering** when only specific senders should trigger work. Spam will hit your workflow.
- **Webhook URL leaked.** Treat the URL as a secret and add a header-based auth token.
- **Wrong time zone on Scheduled Trigger.** "Daily at 9am" in the wrong zone fires at 5am for half the team.

---

## Related articles

- Build your first workflow
- Nodes reference (overview)
- Error handling and retries
- Connect Google Drive
- Connect OneDrive
- Connect Outlook
- Lido Mailbox
- Lido API: quickstart and authentication (for the Webhook Trigger pattern)