Delete Data
Overview
The Delete Data Node allows you to remove specific records from your connected database automatically. It is used in workflows where you want to clean up data, delete user information, or remove outdated entries — all without writing any SQL code.
By defining simple query conditions, the node identifies matching records and deletes them permanently from the selected table.
Description
Remove records from your database.
This node deletes records from a database table based on matching criteria you define through Query Fields. For example, if you specify the field name as your condition, the node will remove any records where the name matches the provided input.
Production Environment
Delete data from your live production tables. Use with caution.
Development Environment
Delete data from development tables for testing cleanup and resetting state.
It’s particularly useful when you need to handle data removal as part of automated workflows — such as account deletion requests, cleanup operations, or resetting test data.
Input Parameters
The Delete Data node accepts the target collection name and query fields to identify records.
collectionNamestringRequired"production:users"Query FieldsobjectRequired{"id": "12345"}Dynamic Values: You can use variables from previous nodes in your Query Fields:
Query: { "email": "{{form.email}}" }
Warning: If multiple records match the query, ALL matching records will be deleted.
Output Parameters
The node returns a structured JSON object containing the results of the delete operation.
tableNamestringOptional"production:users"queryIdstringOptional"3b9ac2cb-..."deletedCountnumberOptional1messagestringOptional"Successfully deleted 1 record(s)"statusstringOptional"success"Access output values in your workflow using:
{{delete-data.output.deletedCount}}
{{delete-data.output.status}}
Output Type
Output Type: JSON
The output is returned in JSON format, containing structured information about the delete action. This output can be used by other nodes for logging, confirmation messages, or audit tracking.
Example Usage
Example 1: Delete User by ID
Remove a specific user account.
{ "collectionName": "production:users", "Query Fields": { "id": "10" }}
{ "tableName": "production:users", "queryId": "3b9ac2cb-...", "deletedCount": 1, "message": "Successfully deleted 1 record(s)", "status": "success"}
Example 2: Delete Outdated Records
Remove records created before a certain date.
{ "collectionName": "development:logs", "Query Fields": { "created_at": { "$lt": "2024-01-01" } }}
{ "tableName": "development:logs", "queryId": "88a77b66-...", "deletedCount": 50, "message": "Successfully deleted 50 record(s)", "status": "success"}
How to Use in a No-Code Workflow
Add the Node
Add the Delete Data Node to your workflow from the Database category.
Select Table
Choose the correct table or collection where the data should be removed (e.g., production:users).
Define Query
Under Query Fields, specify the condition that will identify which record(s) to delete. Example: id = {{input.user_id}}.
Run Workflow
Save your settings and run the workflow.
Check Result
After execution, check the deletedCount output to confirm how many records were removed.
Best Practices
- Always use a unique or specific query condition (like
id) to prevent accidental deletion of multiple records. - Test your workflow in a staging environment (development tables) before using it in production.
- Log the output message for tracking and debugging purposes.
Do / Don’t
- ✔️ Implement a confirmation step (e.g., email approval) before critical deletions.
- ✔️ Use specific IDs whenever possible.
- ✔️ Check
deletedCountto verify the operation.
- ❌ Don’t use overly broad filters (like deleting all records without conditions).
- ❌ Don’t delete from production without a backup strategy.
- ❌ Don’t assume deletion is instant; always check the status.
Common Errors
Successfully deleted 0 record(s)WarningOptionalTable not foundErrorOptionalMissing required fieldErrorOptionalPermission deniedErrorOptionalExample Workflow Integration
Use Case 1: Account Deletion Request
Allow users to delete their own account.
- User Request: User submits "Delete Account" form.
- Validation Node: Verify user password or confirmation token.
- Delete Data Node: Remove record from
production:userswhereidmatches. - Success Notification: Email user confirming deletion.
Workflow Data Flow:
{{form.user_id}} → {{deleteData.query.id}}
{{deleteData.status}} → {{emailNode.trigger}}
Use Case 2: Cleanup Job
Remove temporary files or logs older than 30 days.
- Schedule Trigger: Run every Sunday at midnight.
- Delete Data Node: Delete from
development:temp_fileswherecreated_at < 30_days_ago. - Slack Node: Report number of deleted files (
deletedCount).
Workflow Data Flow:
{{schedule.date_threshold}} → {{deleteData.query.created_at}}
{{deleteData.deletedCount}} → {{slack.message}}
