CUSTOM
CosmosDB NoSQL Plugin – Custom Action
Summary (SEO Meta Description):
The Custom Action of the CosmosDB NoSQL Plugin allows you to execute custom SQL queries or operations directly on an Azure Cosmos DB NoSQL container.
Use it to run advanced queries, filters, or aggregations tailored to your workflow needs.
Overview
The Custom Action lets your WeHub workflow run custom SQL-based operations on a Cosmos DB NoSQL container.
This action is ideal when you need flexibility beyond basic CRUD operations and want to leverage Cosmos DB’s SQL API.
Typical Use Cases:
- Running complex multi-condition SQL queries on Cosmos DB
- Retrieving filtered or aggregated results from large datasets
- Performing ad-hoc analytics or dynamic lookups
- Enabling cross-partition queries for distributed data
⚙️ Configuration
| Field | Description | Type / Options | 
|---|---|---|
| Label | Custom name for the action | String | 
| Select connection | Choose or create a secure Azure Cosmos DB connection | Connection | 
| Partition Key | Specify the partition key for targeted queries (leave blank for cross-partition) | String | 
| Container Name | Select the target Cosmos DB container | Dropdown | 
| SQL | SQL query to run on the selected container (e.g., SELECT * FROM c WHERE c.id = '123') | String | 
| Inputs (Manual) | Define dynamic query parameters as input variables | Name + Type (NUMBER, STRING, BYTE, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY) | 
| Outputs (Schema) | Map and validate the query result to a defined schema or enable truncation | Schema | 
FAQ
Q: Can I query across partitions?
A: Yes. If the Partition Key is left blank, cross-partition query mode will be enabled automatically.
Q: Are stored procedures supported in this action?
A: No. Use the Stored Procedure Action for calling predefined Cosmos DB stored procedures.
Q: Does WeHub log query results?
A: No. WeHub only passes the results to the next workflow step and never stores sensitive data.
Keywords: WeHub CosmosDB NoSQL Plugin, Custom Action, Azure Cosmos DB SQL API, Cross-Partition Query, Dynamic Query Parameters