content/guides/12.integrations/1.n8n/directus-n8n-triggers.md
This guide covers how to use the Directus Trigger Node to automatically start your n8n workflows when something happens in Directus.
← Back to Directus + n8n Overview
The Directus Trigger node automatically starts your workflow when something happens in Directus. This is perfect for automation!
Quick reference of all available triggers organized by resource type:
| Resource | Event | Description |
|---|---|---|
| Items | Created | Triggers when a new item is added to a collection |
| Items | Updated | Triggers when an existing item is modified |
| Items | Deleted | Triggers when an item is removed from a collection |
| Users | Created | Triggers when a new user is added |
| Users | Updated | Triggers when a user is modified |
| Users | Deleted | Triggers when a user is removed |
| Files | Uploaded | Triggers when a file is uploaded to Directus |
The trigger creates a Flow in Directus with a webhook that automatically starts your workflow when the selected event occurs.
When you activate a workflow with a Directus Trigger node:
::callout{icon="material-symbols:info-outline" color="warning"} Public URL Required Your n8n instance needs to be accessible from the internet for triggers to work. If you're using n8n Cloud, this is already set up. If you're self-hosting, you'll need to modify the Flow in Directus to use a tunnel (like ngrok or Cloudflare Tunnel) to expose your n8n instance publicly. ::
You can use data from the trigger in subsequent nodes. The trigger data contains the full item, user, or file object that triggered the workflow:
{{ $json.id }} - Get the ID from the trigger{{ $json.title }} - Get the title field{{ $json.email }} - Get the email field (for user triggers)This data is automatically available in all nodes that come after the trigger. Use expressions to access any field from the trigger data.
You can add conditions after the trigger to only process specific events:
status equals published before sending notifications::callout{icon="material-symbols:info-outline"}
Filtering Tip
Use n8n's IF node after the trigger to add conditional logic. For example, only send notifications when {{ $json.status }} equals "published".
::
Trigger Not Firing:
Webhook Not Created:
Connection Issues:
If you encounter issues: