# Pipeline Triggers

Every pipeline starts with a trigger — the event that kicks off processing. There are two categories: **connector triggers** that watch external folders, and **event triggers** that respond to activity inside Glossi.

### Connector Trigger: Watch Folder

The most common trigger type. Connects to an external storage provider and polls a folder for new 3D model files on a schedule.

#### Supported Connectors

| Connector        | Auth Method                      | Notes                                           |
| ---------------- | -------------------------------- | ----------------------------------------------- |
| **Google Drive** | OAuth or Service Account         | Personal and Google Workspace accounts          |
| **OneDrive**     | OAuth                            | Personal and Microsoft 365 business accounts    |
| **AEM**          | Credentials (Client ID + Secret) | Adobe Experience Manager — cloud and on-premise |

#### Configuration

* **Account** — Sign in with OAuth, or enter service account / API credentials for AEM.
* **Folder** — Browse and select the folder to watch. You can also create new folders from the picker.
* **Poll interval** — How often Glossi checks for new files: 5, 10, 15, 30, or 60 minutes (default: 5).
* **Batch size** — Maximum files to process per poll cycle: 5, 10, 20, 30, or 50 (default: 10).
* **Process existing files** — When enabled, files already in the folder are processed on the first poll. When off, only new files added after pipeline creation are picked up (default: on).
* **Reprocess modified files** — When enabled, files that are updated after their initial render are re-processed (default: off).

#### How File Detection Works

* **First poll** — Scans the folder and either queues all existing files (if Process existing files is on) or captures a baseline and starts tracking from that point.
* **Subsequent polls** — Uses change tokens (delta tracking) to only check for changes since the last poll. Even folders with thousands of files are scanned instantly if nothing changed.
* **Deduplication** — Each file is processed once. If the same file appears in multiple scans, it's ignored after the first time.

#### Authentication

When you sign in with OAuth, the pipeline stores an encrypted refresh token. If the token expires or is revoked (e.g., you remove Glossi's access from Google/Microsoft), the pipeline pauses and shows a re-authentication prompt.

For Google Drive, you can also use a **service account** instead of OAuth. This avoids token expiration and is better for automated workflows. Expand "Use service account instead" in the connector panel and enter the client email and private key.

### Event Triggers

Event triggers respond to activity within your Glossi workspace. They don't require a connector — they fire automatically when the specified event occurs.

#### Model Ready

Fires when a 3D model finishes processing (upload, conversion, and preparation complete). Use this to automatically create projects and render images whenever a model is uploaded.

**Typical chain:** Model Ready → Create Project → Render

#### Project Created

Fires when a new project is created. Use this to automatically render projects as they're set up.

**Typical chain:** Project Created → Render

#### Render Complete

Fires when a render job finishes. Use this to apply Brand Styles or AI edits to every completed render automatically.

**Configuration:**

* **Exclude renders from other pipelines** — Prevents chain reactions where pipeline A's output triggers pipeline B, which triggers pipeline A again. Enabled by default.

**Typical chains:**

* Render Complete → Style
* Render Complete → AI Edit

### More Triggers Coming Soon

We're actively adding new trigger types. If you have a specific trigger in mind that would help your workflow, reach out at <support@glossi.io>, we'd love to hear what you need.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.glossi.io/pipelines/pipeline-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
