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) - Files: Get operation retrieves detailed information about a specific file stored in a Directus instance, using its unique ID. This node is useful when you need to fetch metadata or details of a file that has been uploaded to Directus, such as for displaying file information, validating file existence, or integrating file data into other workflow steps.
Practical scenarios:
- Fetching file metadata (e.g., name, type, size, upload date) for display in dashboards.
- Validating the presence and properties of a file before processing or sharing.
- Integrating file details into automated document management or approval workflows.
Properties
| Name | Type | Meaning |
|---|---|---|
| ID | String | Unique ID of the file object in Directus. Required to identify which file's details to retrieve. |
Output
The output will be a single item with a json field containing the file's metadata as returned by the Directus API. The structure typically includes fields such as:
{
"id": "string",
"storage": "string",
"filename_disk": "string",
"filename_download": "string",
"title": "string",
"type": "string",
"folder": "string",
"uploaded_by": "string",
"uploaded_on": "string",
"modified_by": "string",
"modified_on": "string",
"charset": "string",
"filesize": number,
"width": number,
"height": number,
"duration": number,
"embed": "string",
"description": "string",
"location": "string",
"tags": ["string"],
"metadata": { /* ... */ }
}
Note: The actual fields may vary depending on your Directus setup and file type.
- No binary data is returned by this operation; only metadata is provided.
Dependencies
- Directus API: You must have access to a running Directus instance.
- API Credentials: The node requires valid Directus API credentials (
directusApi) configured in n8n.
Troubleshooting
- Invalid or missing ID: If the provided file ID does not exist, the node will return an error indicating that the file was not found.
- Authentication errors: If the API credentials are incorrect or lack permission to access files, you may receive authentication or authorization errors.
- Connection issues: Network problems or incorrect Directus API URLs can result in connection errors.
Common error messages:
"File not found": Check that the ID is correct and the file exists in Directus."Unauthorized"or"Forbidden": Verify your API credentials and permissions."Network Error": Ensure the Directus instance is reachable from your n8n environment.