DatoCMS icon

DatoCMS

Interact with DatoCMS API

Overview

This node integrates with the DatoCMS API to manage "Item Types" within a DatoCMS project. Specifically, the Get Many operation for the Item Type resource retrieves multiple item types defined in the CMS.

Use cases include:

  • Fetching all available item types to dynamically build forms or interfaces.
  • Retrieving a subset of item types for display or processing in workflows.
  • Synchronizing item type metadata between DatoCMS and other systems.

For example, you might use this node to get all item types to generate reports on your content structure or to automate updates based on item type configurations.

Properties

Name Meaning
Return All Boolean option to return all item types or limit the number of results returned.
Limit Maximum number of item types to return when "Return All" is false (default: 50). Minimum value is 1.

Output

The output JSON contains:

  • results: An array of item type objects retrieved from DatoCMS. Each object represents an item type with its properties as defined by the DatoCMS API.
  • count: The number of item types returned.
  • query: An object summarizing the query parameters used, including:
    • returnAll: Whether all item types were requested.
    • limit: The maximum number of item types requested (if not returning all).

No binary data is output for this operation.

Example output structure (simplified):

{
  "results": [
    {
      "id": "itemTypeId1",
      "name": "Blog Post",
      "api_key": "blog_post",
      // ... other item type properties
    },
    {
      "id": "itemTypeId2",
      "name": "Author",
      "api_key": "author",
      // ... other item type properties
    }
  ],
  "count": 2,
  "query": {
    "returnAll": false,
    "limit": 50
  }
}

Dependencies

  • Requires an API authentication token credential for DatoCMS.
  • Uses the official DatoCMS Node.js client library internally.
  • No additional environment variables are required beyond the API token and optional environment name configured in credentials.

Troubleshooting

  • Failed to load item types: This error may occur if the API token is invalid or lacks permissions. Verify that the API key credential is correct and has access to read item types.
  • Limit ignored or too high: When requesting many item types without enabling "Return All," the node caps the limit at 50 by default. To retrieve more, enable "Return All."
  • Empty results: Ensure that your DatoCMS project actually contains item types. Also, check network connectivity and API token validity.
  • Permission errors: If the API token does not have sufficient rights, the node will throw permission-related errors. Use a token with appropriate scopes.

Links and References

Discussion