INSERT
CosmosDB NoSQL Plugin – Insert Action
Summary (SEO Meta Description):
The Insert Action of the CosmosDB NoSQL Plugin adds new documents into an Azure Cosmos DB NoSQL container.
Use it to create records, store application data, or insert events into scalable cloud storage.
Overview
The Insert Action enables WeHub workflows to add new JSON documents into a Cosmos DB NoSQL container.
Ideal for workflows that need to store dynamic data, such as application logs, user records, or IoT events.
Typical Use Cases:
- Storing new user profiles or session data
- Capturing IoT device readings or telemetry
- Logging workflow output or analytics events
- Populating new datasets for analytics or machine learning
⚙️ 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 value for the document | String | 
| Container Name | Select the Cosmos DB container where the document will be inserted | Dropdown | 
| Inputs (Manual) | Define the fields and types of data to insert | Name + Type (NUMBER, STRING, BYTE, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY) | 
| Schema | (Optional) Attach a schema or enable Truncate Fields to auto-trim fields | Schema | 
FAQ
Q: Can I insert multiple documents at once?
A: Yes, you can configure the workflow payload to include multiple documents if your Cosmos DB connection supports batch inserts.
Q: What happens if the document already exists?
A: The Insert Action will fail if a document with the same ID already exists. Use Upsert for insert-or-update behavior.
Q: Does WeHub log the document content?
A: No. WeHub only passes the data to Cosmos DB and never stores it.
Keywords: WeHub CosmosDB NoSQL Plugin, Insert Action, Azure Cosmos DB, Create Document, JSON Insert, Cloud Database