Actions109
- Collections Actions
- Activity Actions
- Assets Actions
- Authentication Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Overview
The Directus (DrWade) node for n8n allows you to interact with the Directus API. Specifically, when using the Revisions resource and the Get operation, this node retrieves detailed information about a specific revision in your Directus project by its unique identifier. This is useful for workflows that need to audit, display, or process historical changes made to items within Directus collections.
Common scenarios:
- Auditing changes to content or data in Directus.
- Displaying revision history in dashboards or reports.
- Triggering actions based on specific changes recorded in revisions.
Example use case:
You want to fetch the details of a particular revision (e.g., to see what changes were made to an item at a certain point in time) and use this information in subsequent workflow steps, such as sending notifications or logging changes externally.
Properties
| Name | Type | Meaning |
|---|---|---|
| ID | String | Primary key of the revision to retrieve. This uniquely identifies which revision's details will be fetched from Directus. Required field. |
Output
The output will be a single object in the json field containing all available details about the requested revision. The structure of this object depends on the Directus API response for a revision, but typically includes fields such as:
id: The unique identifier of the revision.activity: Information about the activity that caused the revision.collection: The collection affected.item: The item affected.data: The data before/after the change.parent: Parent revision, if any.revisions: Array of related revisions, if applicable.timestamp: When the revision was created.- ...and other metadata provided by Directus.
Example output:
{
"id": "368",
"activity": "...",
"collection": "articles",
"item": "123",
"data": { /* previous and/or new values */ },
"parent": null,
"timestamp": "2024-06-01T12:34:56Z"
}
Note: The exact fields depend on your Directus setup and the revision's context.
Dependencies
- Directus API: You must have access to a running Directus instance.
- API Credentials: The node requires valid Directus API credentials configured in n8n under the name
directusApi.
Troubleshooting
Common issues:
- Invalid ID: If the provided revision ID does not exist, the node will return an error message indicating that the revision could not be found.
- Authentication errors: If the API credentials are missing or incorrect, you may receive authentication or authorization errors.
- Network issues: Connectivity problems between n8n and the Directus server can cause request failures.
Error messages and resolutions:
"error": "Request failed with status code 404": The specified revision ID does not exist. Double-check the ID value."error": "Unauthorized": Check your Directus API credentials in n8n."error": "Network Error": Ensure the Directus server is reachable from your n8n instance.