content/guides/12.integrations/3.zapier/advanced.md
This guide covers advanced Directus features in Zapier, including raw request actions and advanced filtering in Find actions.
Raw Request actions provide full HTTP method control for Items, Users, and Files. These actions allow you to use Directus's native JSON syntax for filters, query parameters, and data manipulation.
Quick reference of all available raw request actions:
| Resource | Operation | HTTP Methods | Description |
|---|---|---|---|
| Items | Raw Request | POST, PATCH, DELETE | Full HTTP method control for items |
| Users | Raw Request | POST, PATCH, DELETE | Full HTTP method control for users |
| Files | Raw Request | PATCH, DELETE | Full HTTP method control for files |
::callout{icon="heroicons-outline:light-bulb"} When to Use Raw Request Actions Use raw request actions when you need full control over HTTP methods, complex query parameters (aggregation, search, etc.), or complete control over the JSON payload structure. For advanced filtering in Find actions, use the Filter (JSON) field instead. ::
Raw Request actions allow you to make custom Directus API calls with full control over the HTTP method and request body.
::callout{icon="material-symbols:warning-rounded" color="warning"} Token Permissions Ensure your Directus API token has the correct permissions for the resource and operations you're using. Raw request actions require the same permissions as their standard counterparts. ::
POST - Create items with full JSON control:
{
"title": "My New Post",
"content": "Post content here",
"status": "published",
"author": "author-uuid-here",
"categories": ["category-uuid-1", "category-uuid-2"]
}
PATCH - Update items with complex data structures:
{
"title": "Updated Title",
"status": "archived",
"metadata": {
"tags": ["updated", "archived"],
"notes": "Item has been archived"
}
}
DELETE - Delete items by ID or using Filter (JSON) for bulk deletion
POST - Create users with full JSON control:
{
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"role": "role-uuid-here"
}
PATCH - Update users with complex data structures:
{
"status": "suspended",
"metadata": {
"reason": "Account violation"
}
}
DELETE - Delete users by ID or using Filter (JSON) for bulk deletion
PATCH - Update file metadata with complex data structures:
{
"title": "Updated Title",
"description": "New description",
"tags": ["tag1", "tag2"]
}
DELETE - Delete files by ID or using Filter (JSON) for bulk deletion
When using Raw Request actions or creating items with relations:
Many-to-One:
{
"title": "My Post",
"author": "author-uuid-here"
}
Many-to-Many:
{
"title": "My Post",
"categories": ["category-uuid-1", "category-uuid-2"]
}
One-to-Many:
{
"title": "My Post",
"comments": [{ "text": "Great post!", "user": "user-uuid-here" }]
}
You can use data from previous steps in your filters by using Zapier's field mapping in the filter fields.
For bulk operations:
Example:
{
"filter": {
"status": { "_eq": "published" },
"date_created": { "_gte": "$NOW(-30 days)" }
},
"limit": 100
}