DatoCMS icon

DatoCMS

Interact with DatoCMS API

Overview

This node integrates with the DatoCMS API to create new records of a specified item type in a DatoCMS project. It allows users to define field values for the new record and optionally auto-publish it immediately after creation.

Common scenarios where this node is beneficial include:

  • Automating content creation workflows by programmatically adding new entries to a CMS.
  • Importing data from external sources into DatoCMS as structured content.
  • Creating draft or published content items dynamically based on triggers or other workflow steps.

Practical example:

  • A marketing team collects leads via a form and uses this node to create new "Lead" records in DatoCMS, setting fields like name, email, and interest area, then automatically publishing the record for immediate use on the website.

Properties

Name Meaning
Item Type The specific content model (item type) in DatoCMS to create the record for.
Fields The set of fields and their values to assign to the new record. Supports defining fields manually or mapping input data automatically.
Additional Fields Extra options for record creation. Currently supports:
- Auto Publish: Whether to publish the record immediately after creation (true/false).

Output

The node outputs JSON data representing the newly created record object returned by the DatoCMS API. This includes all fields of the record along with metadata such as its ID, timestamps, and status.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token credential for DatoCMS with appropriate permissions to create records.
  • Uses the official DatoCMS Node.js client library internally.
  • The node expects the user to select an existing item type in the DatoCMS project to create records against.

Troubleshooting

  • Missing or invalid Item Type: If no item type is selected or the ID is incorrect, the node will fail. Ensure the item type exists and is correctly chosen.
  • Field validation errors: Providing invalid or incomplete field data may cause API errors. Verify required fields and data formats match the DatoCMS model definitions.
  • Auto Publish failures: If auto-publish is enabled but the user lacks permission or the record cannot be published, an error will occur. Check user permissions and record status.
  • JSON parsing issues: Some fields require JSON strings or arrays; improper formatting can cause errors. Use valid JSON syntax when entering complex field values.
  • API rate limits or network issues: Temporary failures connecting to DatoCMS API may happen. Retry or check network connectivity.

Links and References

Discussion