# Trigger Node

A Trigger Node is the starting point for any automated workflow. Once a specific event happens, the trigger automatically run your StackAI workflow.

In this guide, we’ll cover:

1. [Core Trigger Types ](#id-1.-core-trigger-types)
2. [Managing connections](#id-2.-linking-your-accounts): How to link your external accounts and apps.
3. [Setup & Data Configuration](#id-3.-setup-and-configuration): A step-by-step on building and using trigger data.
4. [Best Practices](#id-4.-best-practices-and-implementation-notes)
5. [Common Workflows & Supported Apps](#id-5.-practical-examples-and-trigger-providers)

### 1. Core Trigger Types

Triggers generally fall into two categories based on *why* they start.

#### Event-Based (Real-Time)

These triggers run the moment an action occurs in another app or within StackAI itself. Some examples:

* Communication: A new email arrives in Gmail or Outlook.
* Data Entry: Someone submits a form in Typeform.
* System Events: A payment is processed in Stripe, or a ticket is created in Zendesk.
* Workflow Chaining: You can set a trigger to fire as soon as a *different* StackAI workflow finishes.

#### Time-Based (Scheduled)

These fire based on a clock rather than an external action. They can be either:

* One-time: Run at a specific date and time.
* Recurring: Run every hour, daily, or weekly (e.g., generating a Monday morning report).

### 2. Create a connection

To use triggers from apps like Gmail or GitHub, StackAI needs permission to "see" those events.

* Setting up a connection: The first time you use an external trigger, you'll be asked to log in to that service.
* Permissions: This simply allows StackAI to monitor for the specific events (like new emails) that you've selected.
* Management: You can manage or remove these permissions anytime under Organization → Connections.

See all available connection providers [here](#id-5.-common-workflows-and-supported-apps).&#x20;

### 3. Setup and Configuration

1. **Add the Node:** Place a Trigger Node on your canvas and choose the specific trigger you'd like to use.
2. **Connect:** Link the trigger in the corresponding node&#x73;**.**

   <figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2F50JAgTxK25VFtlr9VzmP%2Ftrigger.gif?alt=media&#x26;token=e3a01188-78ef-4faa-ad5b-f11e8223c061" alt=""><figcaption></figcaption></figure>

#### Configuring and Filtering

Some triggers, like  "On Email Received" allow you to activate the trigger only if certain conditions are met. For example, if the email comes from a specific sender, has a specific label, or includes attachments.

For other triggers, you will need to select a specific table, sheet, or db from the connection.

Find these settings under "Configurations"

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FKMkaLZbTxTd7CWrqEg1n%2Fconfig.gif?alt=media&#x26;token=4536d254-bc4c-4171-959e-25926aab25c0" alt=""><figcaption></figcaption></figure>

#### How to Access and Use Outputs&#x20;

When a trigger occurs, it does more than just start a workflow—it captures specific details about the event and can pass them along as variables to other nodes.&#x20;

1. Locate the Variables: The list of available output fields is available in the "Outputs" section of each trigger.
2. Use in Downstream Nodes: You can reference these variables (like the sender's name or the body of the email) in your AI prompts, logic filters, or other action nodes. This allows the workflow to "know" the context of what triggered it.

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FIJVIOkWdyHywdYc1GO4Q%2Fvariables.gif?alt=media&#x26;token=47476609-3a4d-469b-8613-296520ec3fbf" alt=""><figcaption></figcaption></figure>

### 4. Testing

To test your triggers before publishing a workflow, you can click the "Run" button and see the options available.

You will be able to input test data or, for some triggers, use existing data (for example, from your inbox).

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FaoxwtxR1S9fjerKDhjoc%2FGoogle%20Chrome.gif?alt=media&#x26;token=70484471-06ec-4215-bae8-173d14a7e64d" alt=""><figcaption></figcaption></figure>

You can also click on "live listen" and wait for the trigger event to kick off your workflow. Once your project is ready, make sure to publish to "turn on" the trigger.

### 5. Best Practices

To keep your automations running smoothly, keep these points in mind:

* Publishing is required:&#x20;
  * Triggers are only active once the workflow is Published. They will not respond to live events while the workflow is only in "Draft" mode.
* Connection health:&#x20;
  * Verify that your connection has the necessary permissions (if applicable).
  * Confirm that webhooks are properly configured.
  * Monitor workflow execution logs for any connection or processing errors.
  * Ensure your account has webhook capabilities.
* Use the Analytics Tab:&#x20;
  * If a workflow didn't run as expected, the Analytics tab is the best place to see if the trigger fired and where the data went.
* Test with sample data:&#x20;
  * Always use the "Test Values" before relying on live form submissions.&#x20;

### 6. Common Workflows & Supported Apps

StackAI offers native trigger nodes for direct integrations (like Gmail or Stripe) that start your workflow automatically.&#x20;

If an app isn’t supported natively, you can still trigger your workflow using inbound Webhooks via the StackAI API, allowing any app that sends HTTP requests to kick off your flow.

Key Considerations:

* Your external app must support outgoing HTTP requests.
* You may need to manually parse or transform data when using webhooks instead of native nodes.

<table><thead><tr><th width="134.12890625">Category</th><th width="131.98046875">Providers</th><th>Common Use Cases</th></tr></thead><tbody><tr><td><strong>Email &#x26; Shared Inboxes</strong></td><td>Gmail, Outlook, Missive</td><td><p>Auto-reply to emails. </p><p>Extract structured information.</p><p>Create tasks or tickets from emails.</p><p>Filter and categorize messages.</p><p>Process attachments.</p></td></tr><tr><td><strong>Chat &#x26; Collaboration</strong></td><td>Slack, Microsoft Teams, Realtime Chat</td><td><p>Route conversations.</p><p>Escalate issues.</p><p>Monitor channels and send alerts.</p></td></tr><tr><td><strong>Support &#x26; Customer Operations</strong></td><td>Zendesk</td><td><p>Create and update tickets.</p><p>Route customer requests.</p><p>Collect and categorize feedback.</p><p>Follow-ups or escalations.</p></td></tr><tr><td><strong>Forms &#x26; Hiring</strong></td><td>Typeform, Workable</td><td><p>Process leads and applications.</p><p>Route job candidates.</p><p>Handle event signups.</p><p>Analyze responses.</p></td></tr><tr><td><strong>Databases &#x26; Spreadsheets</strong></td><td>Airtable, Google Sheets</td><td><p>Monitor row changes.</p><p>Process structured records.</p></td></tr><tr><td><strong>Files &#x26; Document Management</strong></td><td>Google Drive, SharePoint</td><td><p>React to file uploads.</p><p>Process documents.</p><p>Archive or sync files.</p><p>Generate reports from updated files.</p></td></tr><tr><td><strong>Payments &#x26; Transactions</strong></td><td>Stripe</td><td><p>Handle orders and subscriptions.</p><p>React to failed payments.</p><p>Update CRM on subscription changes.</p></td></tr><tr><td><strong>Developer &#x26; System Events</strong></td><td>GitHub, AWS SQS</td><td><p>Run checks on new pull requests.</p><p>Process queued events.</p><p>Integrate system-level workflows.</p></td></tr><tr><td><strong>Internal Workflows</strong></td><td>StackAI</td><td><p>Trigger workflows on workflow completion.</p><p>Chain multi-step automations.</p></td></tr><tr><td>Run on a schedule</td><td>StackAI</td><td><p>Weekly reports</p><p>Weekly competitor analysis / web scraping<br>Read google spreadsheet every month to revise changes</p></td></tr></tbody></table>


---

# 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.stackai.com/workflow-builder/inputs/trigger-node.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.
