Actions15
Overview
This node integrates with the DatoCMS API to manage content records within a DatoCMS project. Specifically, the "Record" resource with the "Get" operation allows users to retrieve a single record by its ID from a specified item type in DatoCMS. It supports optionally including nested data for related records, which means referenced records can be returned as full objects rather than just their IDs.
Common scenarios where this node is beneficial include:
- Fetching detailed content entries from DatoCMS to use in workflows, such as generating reports or syncing content with other systems.
- Retrieving specific records by ID for further processing or conditional logic in automation.
- Including nested related records to get comprehensive data structures without additional API calls.
Practical example:
- A user wants to fetch a blog post record by its unique ID and include all related author and category information embedded within the response, enabling downstream nodes to access all relevant data in one step.
Properties
| Name | Meaning |
|---|---|
| Record ID | The unique identifier of the record to retrieve from DatoCMS. |
| Nested | Whether to include nested data for related records. When enabled (true), referenced records are included as full objects instead of just their IDs. Defaults to false. |
Output
The output contains a JSON object representing the retrieved record from DatoCMS. This includes all fields defined in the item type for that record. If the "Nested" option is enabled, related records referenced by the main record will be included as nested JSON objects rather than simple IDs, providing richer data context.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": "record-id",
"field_1": "value",
"field_2": "value",
"related_field": {
"id": "related-record-id",
"field_a": "value"
},
"_created_at": "2023-01-01T00:00:00Z",
"_updated_at": "2023-01-02T00:00:00Z"
}
Dependencies
- Requires an API authentication token credential for DatoCMS to authorize requests.
- Uses the official DatoCMS Node.js client library internally to communicate with the DatoCMS Content Management API.
- No additional environment variables are required beyond the API credentials configured in n8n.
Troubleshooting
- Invalid Record ID: If the provided Record ID does not exist or is malformed, the node will throw an error indicating the record could not be found. Verify the ID is correct and exists in the selected item type.
- Insufficient Permissions: Errors related to authorization may occur if the API token lacks permissions to read records. Ensure the API key has appropriate read access.
- Nested Data Issues: Enabling nested data may increase response size and complexity. If performance issues arise, consider disabling nested data or limiting the fields retrieved.
- Missing Item Type: Although not directly a property here, the node requires the item type to be set when working with records. Make sure the item type parameter is correctly selected in the node configuration.