Cosmos DB icon

Cosmos DB

Cosmos DB Node - Upsert documents to Azure Cosmos DB

Container → Get

AI-generated

Summary

Read a container definition from the selected Cosmos DB database. Choose the database and container, then optionally return either a compact set of common fields or the full definition.

Inputs

  • Authentication Type — Choose Master Key (default) or Microsoft Entra ID (Azure AD) authentication. Supply the matching Cosmos DB credentials.
  • Database Name or ID (required) — Select or enter the database containing the container.
  • Container Name or ID (required) — Select or enter the container to read.
  • Simplify Output — Defaults to true. When enabled, returns only the container ID, partition key paths, and indexing mode. Disable it to return the full container definition.
  • Use Dev Override (Custom Endpoint + Token) — Defaults to false. When enabled with both override values supplied, the node uses the custom endpoint and bearer token for the Cosmos DB connection.
  • Custom Endpoint — Cosmos DB account endpoint URL; shown when Dev Override is enabled.
  • Custom Access Token — Bearer token scoped to https://cosmos.azure.com/; shown when Dev Override is enabled. Supports expressions.

Output shape

One n8n item containing the container definition as JSON.

With Simplify Output enabled, the JSON has id, partitionKeyPaths, and indexingMode fields (some may be undefined if absent from the definition). With it disabled, the full Cosmos DB container definition is returned. If an error occurs and Continue On Fail is enabled, the item contains an error field.

Links

Discussion