Skip to main content

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

FieldDescriptionType / Options
LabelCustom name for the actionString
Select connectionChoose or create an Azure Cosmos DB database connectionConnection
Partition KeyPartition key value used to locate the target documentString
Container nameName of the Cosmos DB container (collection) holding the documentString
Document IDUnique identifier of the document to be deletedString

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