Getdatabase
CosmosDB Plugin – Get Database Action
Summary (SEO Meta Description):
The Get Database Action of the CosmosDB Plugin retrieves a single document from an Azure Cosmos DB container using its unique key.
It allows workflows to quickly fetch and process stored data without writing custom queries.
Overview
The Get Database Action enables your workflow to fetch a specific document from a Cosmos DB container by providing its Partition Key and Document ID.
This is ideal for reading user profiles, fetching transaction details, or retrieving any record by its unique identifier.
Typical Use Cases:
- Retrieve a customer profile by ID for personalization
- Fetch an order’s details for downstream processing
- Access IoT device data or telemetry using a unique identifier
- Get a configuration record to drive dynamic workflow logic
⚙️ Configuration
| Field | Description | Type / Options | 
|---|---|---|
| Label | Custom name for the action | String | 
| Select connection | Choose or create an Azure Cosmos DB database connection | Connection | 
| Partition Key | Partition key value used to locate the target document | String | 
| Container name | Name of the Cosmos DB container (collection) holding the document | String | 
| Document ID | Unique identifier of the document to retrieve | String | 
FAQ
Q: What happens if the specified Document ID does not exist?
A: The action returns an empty result and the workflow continues without error.
Q: Can I retrieve nested fields only?
A: The Get action returns the entire document. You can filter or transform it in downstream workflow steps.
Q: Is schema validation supported?
A: Yes, you can apply a schema in the workflow to validate the structure of the retrieved document.
Keywords: WeHub CosmosDB Plugin, Get Database Action, Retrieve Document, Azure Cosmos DB, NoSQL Workflow Automation