Cosmos DB

Azure integration · 18 node(s).

00Overview

Work with Azure Cosmos DB (NoSQL) straight from a flow — create and list databases and containers, and read, write, query and patch the JSON items inside them. Point-read or upsert a single document, run parameterised SQL queries scoped to one partition or across them all, and inspect or change provisioned throughput without leaving the editor. Everything runs against your own Cosmos DB account using either an account key or a Microsoft Entra service principal.

Every field below is exactly what you see in the Flomation editor. Fields marked ● live picker let you choose from a list pulled live from your account — no IDs to look up.

01Connecting Cosmos DB

  1. Choose how to connect in the node's Authentication dropdown — Master Key (an account-wide key, simplest to set up) or Microsoft Entra (service principal) (a scoped Azure identity). Either way, put your account's short name in Account Name — the mycosmosaccount part of mycosmosaccount.documents.azure.com.
  2. For Master Key, open the Azure Portal → your Cosmos DB account → Keys and copy the PRIMARY KEY (a secondary or read-only key works too). This key grants access to every database in the account, so treat it as a full-access credential.
  3. For Microsoft Entra, register an application in Microsoft Entra ID → App registrations, add a client secret under Certificates & secrets, then assign that app a Cosmos DB data-plane role on the account (for example the built-in Cosmos DB Built-in Data Contributor role). Fill Tenant ID, Client ID and Client Secret with the app's Directory (tenant) ID, Application (client) ID and the secret's value.
  4. Leave Custom Endpoint and Allow Insecure TLS unset for a normal Azure account; set the endpoint to https://localhost:8081 and enable insecure TLS only when you are pointing the node at the local Cosmos DB emulator.
  5. In Flomation, store the secret — your Master Key or the service principal's Client Secret — as an environment secret (e.g. cosmosdb_secret), then pick it in the node's matching Master Key or Client Secret field.
FieldTypeDetails
AuthenticationstringMaster Key, Microsoft Entra (service principal)
Master KeysecretPrimary or secondary key (base64) — Azure Portal ▸ your account ▸ Keys
Client SecretsecretThe service principal's client secret
Allow Insecure TLSbooleanSkip TLS verification — required for the Cosmos DB emulator's self-signed certificate
Account NamestringRequiredmycosmosaccount
Tenant IDstringDirectory (tenant) ID of the service principal
Client IDstringApplication (client) ID of the service principal
Custom Endpointstringhttps://localhost:8081 for the emulator — leave blank for https://{account}.documents.azure.com
i
Pick an Environment on your flow (Flow Settings → Environment) so the secret resolves. Secret fields never show the value — they reference ${secrets.your_secret}.

02Container

Cosmos DB: Create Container

azure/cosmosdb/container_create · Action

Create a container in a database — set the partition key path, and optionally an indexing policy, item TTL, unique keys, and provisioned throughput (manual RU/s or autoscale).

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe ID of the container to create
Partition Key Pathstring/id — the item property that partitions the container, e.g. /category
Indexing Policy (JSON)object{"indexingMode":"consistent","includedPaths":[{"path":"/*"}]}
Default TTL (seconds)integerExpire items after this many seconds — -1 keeps items forever but lets per-item ttl work
Unique Key Pathsstring/email, /employeeId — comma-separated, one constraint each
Throughput (RU/s)integerDedicated manual throughput, minimum 400 — leave blank for the database default
Autoscale Max (RU/s)integerDedicated autoscale maximum, minimum 1000 — mutually exclusive with Throughput

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Delete Container

azure/cosmosdb/container_delete · Action

Delete a container from a database, including every item inside it. This cannot be undone.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe ID of the container to delete

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Get Container

azure/cosmosdb/container_get · Action

Retrieve a container's definition — partition key, indexing policy, TTL, and unique keys.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: List Containers

azure/cosmosdb/container_get_all · Action

List the containers in a database.

FieldTypeDetails
DatabasestringRequiredThe database ID
Return AllbooleanFollow every continuation token until all containers are fetched
LimitintegerMaximum containers per page — default 50, maximum 1000
Continuation TokenstringResume from an earlier run's Next Continuation — leave blank to start at the first page
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: results, count, request_charge, next_continuation, truncated, tool_result, success, error

Cosmos DB: Replace Container

azure/cosmosdb/container_replace · Action

Update a container's indexing policy and/or default item TTL. The partition key cannot be changed after creation.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Indexing Policy (JSON)object{"indexingMode":"consistent","includedPaths":[{"path":"/*"}]} — replaces the current policy
Default TTL (seconds)integerExpire items after this many seconds — -1 keeps items forever but lets per-item ttl work

Returns: id, result, request_charge, tool_result, success, error

03Database

Cosmos DB: Create Database

azure/cosmosdb/database_create · Action

Create a database in the Cosmos DB account, optionally with shared provisioned throughput (manual RU/s or autoscale).

FieldTypeDetails
DatabasestringRequiredThe ID of the database to create
Throughput (RU/s)integerShared manual throughput, minimum 400 — leave blank for none
Autoscale Max (RU/s)integerShared autoscale maximum, minimum 1000 — mutually exclusive with Throughput

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Delete Database

azure/cosmosdb/database_delete · Action

Delete a database from the Cosmos DB account, including every container and item inside it. This cannot be undone.

FieldTypeDetails
DatabasestringRequiredThe ID of the database to delete

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Get Database

azure/cosmosdb/database_get · Action

Retrieve a database's definition from the Cosmos DB account.

FieldTypeDetails
DatabasestringRequiredThe database ID
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: List Databases

azure/cosmosdb/database_get_all · Action

List the databases in the Cosmos DB account.

FieldTypeDetails
Return AllbooleanFollow every continuation token until all databases are fetched
LimitintegerMaximum databases per page — default 50, maximum 1000
Continuation TokenstringResume from an earlier run's Next Continuation — leave blank to start at the first page
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: results, count, request_charge, next_continuation, truncated, tool_result, success, error

04Item

Cosmos DB: Create Item

azure/cosmosdb/item_create · Action

Create an item in a container. Strict by default — creating an id that already exists fails unless Upsert is enabled, which overwrites it instead.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Item (JSON)objectRequired{"id":"order-1001","status":"open"} — must include id
UpsertbooleanOverwrite the item if the id already exists — off by default (strict create)
Partition KeystringThe item's partition-key value — leave blank when it is a property of the item itself

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Delete Item

azure/cosmosdb/item_delete · Action

Delete one item from a container by id. This cannot be undone.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Item IDstringRequiredThe id of the item to delete
Partition KeystringThe item's partition-key value — leave blank when the container is partitioned on /id

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Get Item

azure/cosmosdb/item_get · Action

Retrieve one item from a container by id — the cheapest possible read (a point read).

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Item IDstringRequiredThe id of the item to read
Partition KeystringThe item's partition-key value — leave blank when the container is partitioned on /id
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: List Items

azure/cosmosdb/item_get_all · Action

List the items in a container, across all partitions.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Return AllbooleanFollow every continuation token until all items are fetched
LimitintegerMaximum items per page — default 50, maximum 1000
Continuation TokenstringResume from an earlier run's Next Continuation — leave blank to start at the first page
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: results, count, request_charge, next_continuation, truncated, tool_result, success, error

Cosmos DB: Patch Item

azure/cosmosdb/item_patch · Action

Partially update an item — change only the named paths (add/set/replace/remove/incr/move, up to 10 operations), leaving the rest of the item untouched.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Item IDstringRequiredThe id of the item to patch
Operations (JSON array)objectRequired[{"op":"set","path":"/status","value":"done"},{"op":"incr","path":"/version","value":1}]
ConditionstringFROM c WHERE c.status = 'open' — only patch when this predicate holds
Partition KeystringThe item's partition-key value — leave blank when the container is partitioned on /id
ETag (If-Match)stringOnly patch if the item still has this _etag — fails cleanly when it changed

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Query Items

azure/cosmosdb/item_query · Action

Run a SQL query against a container, with named @parameters and pagination. Cross-partition by default; set Partition Key to scope to one partition.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
QuerytextRequiredSELECT * FROM c WHERE c.status = @status
Parameters (JSON)object{"@status":"open"} — names map to the @parameters in the query
Partition KeystringScope the query to one partition — leave blank to query all partitions
Return AllbooleanFollow every continuation token until all matching items are fetched
LimitintegerMaximum items per page — default 50, maximum 1000
Continuation TokenstringResume from an earlier run's Next Continuation — the Query must be unchanged
SimplifybooleanStrip Cosmos system properties (_rid, _etag, _ts, …) — on by default

Returns: results, count, request_charge, next_continuation, truncated, tool_result, success, error

Cosmos DB: Replace Item

azure/cosmosdb/item_replace · Action

Replace an item's entire body — properties missing from the new body are REMOVED from the item. Use Patch Item for a partial update.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Item IDstringRequiredThe id of the item to replace
New Item Body (JSON)objectRequired{"status":"closed"} — becomes the item's ENTIRE body
ETag (If-Match)stringOnly replace if the item still has this _etag — fails cleanly when it changed
Partition KeystringThe item's partition-key value — leave blank when it is a property of the body or the container is partitioned on /id

Returns: id, result, request_charge, tool_result, success, error

05Throughput

Cosmos DB: Get Throughput

azure/cosmosdb/throughput_get · Action

Read a container's provisioned throughput — current manual RU/s or autoscale maximum. Containers on shared database throughput or serverless accounts have none.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID

Returns: id, result, request_charge, tool_result, success, error

Cosmos DB: Update Throughput

azure/cosmosdb/throughput_update · Action

Change a container's provisioned throughput — set a new manual RU/s value or a new autoscale maximum. Switching between manual and autoscale modes must be done in the Azure Portal.

FieldTypeDetails
DatabasestringRequiredThe database ID
ContainerstringRequiredThe container ID
Throughput (RU/s)integerNew manual throughput, minimum 400 — for containers already in manual mode
Autoscale Max (RU/s)integerNew autoscale maximum, minimum 1000 — for containers already in autoscale mode

Returns: id, result, request_charge, tool_result, success, error

06Notes & Limitations

Behaviours and constraints worth knowing before you build with these nodes.