Deletedatabase
CosmosDB Plugin – Delete Database Action
Summary (SEO Meta Description):
The Delete Database Action of the CosmosDB Plugin permanently removes a document from an Azure Cosmos DB container.
It streamlines data lifecycle management by allowing workflows to delete obsolete or unnecessary records safely.
Overview
Use the Delete Database Action to delete a single document from a specified Cosmos DB container using its Partition Key and Document ID.
This action is essential for workflows that require regular data cleanup, secure removal of sensitive information, or compliance-driven data purging.
Typical Use Cases:
- Remove user records after account deactivation
- Delete expired session tokens or temporary data
- Purge outdated product or inventory information
- Clean up test or staging data after deployments
⚙️ 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 be deleted | String | 
FAQ
Q: What happens if the specified Document ID doesn’t exist?
A: The action completes without error, but no document is removed.
Q: Can multiple documents be deleted at once?
A: No. The Delete Database Action removes only one document per execution.
For bulk deletion, combine the Query Database Action with multiple Delete steps.
Q: Is the deletion reversible?
A: No. Once the document is deleted, it cannot be recovered unless you have a backup.
Keywords: WeHub CosmosDB Plugin, Delete Database Action, Remove Document, Azure Cosmos DB, NoSQL Workflow Automation