Couchbase icon

Couchbase

Couchbase node to insert, update, retrieve, and delete data from a Couchbase database using KV, Query and Search services

Actions7

Document & Key-Value → Create

AI-generated

Summary

Inserts a new document into a Couchbase collection with a specified or auto-generated ID.

Inputs

  • couchbaseBucket (required) — The Couchbase bucket to insert into. Select from a list or enter the name manually.
  • couchbaseScope (required) — The Couchbase scope within the bucket. Select from a list or enter the name manually.
  • couchbaseCollection (required) — The Couchbase collection to insert into. Select from a list or enter the name manually.
  • isSpecifyDocumentId — Whether to provide a custom Document ID. If false, the operation generates a UUID.
  • documentId (required) — The Document ID to use. Required if 'isSpecifyDocumentId' is true.
  • documentValue — The JSON content to insert. Must be valid JSON string.

Output shape

One output item per input item containing the ID and the value that was inserted.

The operation returns the generated or specified ID and the document value exactly as provided. This operation does not return the document body after insertion.

Examples

Example 1: Insert a new document with a custom ID

Set 'isSpecifyDocumentId' to true and provide 'documentId' and 'documentValue'.

Example 2: Insert a new document with an auto-generated ID

Leave 'isSpecifyDocumentId' as false to generate a UUID for the document.

Links

Discussion