# Triggers

> Complete guide for using Directus triggers in Zapier workflows to automatically start Zaps when events happen in Directus.

This guide covers how to use Directus triggers in Zapier to automatically start your Zaps when something happens in Directus.

**← Back to Zapier Integration**

## Using Directus Triggers

Directus triggers automatically start your Zaps when events happen in Directus.

## Available Triggers

Quick reference of all available triggers organized by resource type:

<table>
<thead>
  <tr>
    <th>
      Resource
    </th>
    
    <th>
      Event
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Items
      </strong>
    </td>
    
    <td>
      Created
    </td>
    
    <td>
      Triggers when a new item is added to a collection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Items
      </strong>
    </td>
    
    <td>
      Updated
    </td>
    
    <td>
      Triggers when an existing item is modified
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Items
      </strong>
    </td>
    
    <td>
      Deleted
    </td>
    
    <td>
      Triggers when an item is removed from a collection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Users
      </strong>
    </td>
    
    <td>
      Created
    </td>
    
    <td>
      Triggers when a new user is added
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Users
      </strong>
    </td>
    
    <td>
      Updated
    </td>
    
    <td>
      Triggers when a user is modified
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Users
      </strong>
    </td>
    
    <td>
      Deleted
    </td>
    
    <td>
      Triggers when a user is removed
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Files
      </strong>
    </td>
    
    <td>
      Uploaded
    </td>
    
    <td>
      Triggers when a file is uploaded to Directus
    </td>
  </tr>
</tbody>
</table>

---

## Setting Up a Trigger

1. In your Zap, select **Directus** as the trigger app
2. Choose the trigger event:

  - **New or Updated Item**: Select the **Collection** to watch, then choose the **Action** (Created, Updated, or Deleted)
  - **New or Updated User**: Choose the **Action** (Created, Updated, or Deleted)
  - **New File Uploaded**: No additional configuration needed
3. Click **Continue** and test the trigger

The trigger automatically creates a Flow in Directus with a webhook that starts your Zap when the selected event occurs.

### How Triggers Work

When you set up a Directus trigger in Zapier:

1. Zapier automatically creates a Flow with a webhook in your Directus instance
2. Directus sends notifications to Zapier when the selected event happens
3. Your Zap runs automatically with the data from Directus
4. When you turn off your Zap, the Flow and webhook are automatically removed

---

## Tips and Best Practices

### Using Trigger Data

You can use data from the trigger in subsequent steps. The trigger data contains the full item, user, or file object that triggered the Zap:

- Map fields from the trigger to actions in other apps
- Use the search box to quickly find the field you need
- All data from the trigger is available in subsequent steps

### Filtering Trigger Events

You can add Filter steps after the trigger to only process specific events:

- Check if `status` equals `published` before sending notifications
- Filter by collection or field values
- Only process certain types of files
- On collections using a boolean `archived` field instead of `status`, filter where `archived` equals `false`

<callout icon="i-lucide-info">

**Filtering Tip**
Use Zapier's **Filter** step after the trigger to add conditional logic. For example, only send notifications when `status` equals `"published"`.

</callout>

---

## Troubleshooting

### Trigger Issues

**Triggers Not Firing:**

- Ensure your Zap is turned on
- Verify the trigger is set up correctly (right collection, right action)
- Check that your Directus flows are active (the integration creates these automatically)
- Ensure your Directus instance can reach Zapier's webhook URLs
- Test by manually creating/updating an item in Directus
- Check Directus logs for any errors

**Webhook Not Created:**

- Verify your Directus API token has permission to create webhooks
- Ensure your Directus instance is accessible from the internet

**Connection Issues:**

- Make sure your Directus URL is correct and accessible (must include `https://`, no trailing slash)
- Verify your API token is valid and has the right permissions

### Getting Help

If you encounter issues:

1. **For Directus-specific questions:** Ask for help in the [Directus Community](https://community.directus.com)
2. **For Zapier-specific questions:** Visit the [Zapier Community](https://community.zapier.com) or check [Zapier Help Center](https://help.zapier.com/)
3. **For trigger issues:** Check that both your Directus and Zapier instances are accessible

---

## Next Steps

- **← Back to Integration** Return to the integration overview
- **Learn about Actions →** Perform operations on your Directus data
