Advanced
This guide covers advanced Directus features in Zapier, including raw request actions and advanced filtering in Search / List actions.
Raw Request 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.
Available Raw Request Actions
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 |
Using Raw Request Actions
Raw Request actions allow you to make custom Directus API calls with full control over the HTTP method and request body.
Setting Up a Raw Request Action
- Add Directus as an action step
- Select Raw Request operation (Items, Users, or Files)
- Choose the HTTP Method (POST, PATCH, or DELETE)
- For Items, select the Collection
- Configure the request:
- ID: Item/User/File ID (required for PATCH/DELETE)
- Request Body (JSON): JSON data for POST/PATCH requests
- Filter (JSON): Filter conditions for DELETE operations
Items - Raw Request
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
Users - Raw Request
POST - Create users with full JSON control:
{
"email": "user@example.com",
"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
Files - Raw Request
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
Working with Relations
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"}
]
}
Advanced Tips
Using Dynamic Values in Filters
You can use data from previous steps in your filters by using Zapier's field mapping in the filter fields.
Batch Processing
For bulk operations:
- Use Search / List to get all items
- Enable "Return all results as line items"
- Add a Filter step if needed
- Add Update Item to process each item
Performance Tips
- Select only needed fields: Use field mapping to reduce data transfer
- Use pagination: Use the Limit field in search actions, process in batches
- Filter in Directus: Always use Directus filters rather than Filter steps when possible
Example:
{
"filter": {
"status": {"_eq": "published"},
"date_created": {"_gte": "$NOW(-30 days)"}
},
"limit": 100
}
Next Steps
- ← Back to Integration Return to the integration overview
- Learn about Actions → Basic operations guide
- Learn about Triggers → Automation workflows
Additional Resources
- Directus Filter Rules - Complete filter syntax and operators
- Directus Query Parameters - All available query parameters
Get once-a-month release notes & real‑world code tips...no fluff. 🐰