Upsert
CosmosDB Table Plugin – Upsert Action
Summary (SEO Meta Description):
The Upsert Action of the CosmosDB Table Plugin inserts or updates a record in Azure Cosmos DB Table depending on whether it already exists.
Use it to ensure data is always current without manually checking for existing records.
Overview
The Upsert Action automatically creates a new record if it does not exist or updates the record if it already exists in a Cosmos DB Table.
It simplifies workflows that need to maintain synchronized data without complex logic.
Typical Use Cases:
- Syncing user profiles or settings across multiple systems
- Maintaining up-to-date product inventory records
- Automatically updating IoT device states or sensor data
- Handling dynamic configuration updates in real-time
⚙️ Configuration
| Field | Description | Type / Options | 
|---|---|---|
| Label | Custom name for the action | String | 
| Select connection | Choose or create a secure Azure Cosmos DB connection | Connection | 
| Table name | Name of the table where the record will be inserted or updated | String | 
(The Row Key, Partition Key, and the data fields to insert or update must be provided through the workflow input payload.)
FAQ
Q: What happens if the record already exists?
A: The action updates the existing record with the new values provided.
Q: Can I use Upsert for bulk operations?
A: No. Each Upsert Action handles one record at a time. For multiple records, loop the action within your workflow.
Q: Is the operation idempotent?
A: Yes. Running the same Upsert multiple times will not create duplicates—it will simply ensure the record reflects the latest data.
Keywords: WeHub CosmosDB Table Plugin, Upsert Action, Azure Table Storage, Insert or Update Record, Cosmos DB Integrations