Database

Delete Data

Category
Database
Node Type
Delete Node

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
The name of the target table or collection. Format: 'environment:tableName'.
Example
"production:users"
Query FieldsobjectRequired
Key-value pairs used to find the specific record(s) to delete. Acts like a 'WHERE' clause.
Example
{"id": "12345"}
Instructions

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
The name of the database table where the deletion occurred.
Example
"production:users"
queryIdstringOptional
A unique identifier automatically generated for the delete query.
Example
"3b9ac2cb-..."
deletedCountnumberOptional
The number of records successfully deleted from the database.
Example
1
messagestringOptional
A brief summary describing the operation result.
Example
"Successfully deleted 1 record(s)"
statusstringOptional
Indicates whether the deletion was successful or not.
Example
"success"
Accessing Data

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

1

Add the Node

Add the Delete Data Node to your workflow from the Database category.

2

Select Table

Choose the correct table or collection where the data should be removed (e.g., production:users).

3

Define Query

Under Query Fields, specify the condition that will identify which record(s) to delete. Example: id = {{input.user_id}}.

4

Run Workflow

Save your settings and run the workflow.

5

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

Do
  • ✔️ Implement a confirmation step (e.g., email approval) before critical deletions.
  • ✔️ Use specific IDs whenever possible.
  • ✔️ Check deletedCount to verify the operation.
Don’t
  • ❌ 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)WarningOptional
No record matched the query condition. Check your input values.
Table not foundErrorOptional
The table name or environment is incorrect.
Missing required fieldErrorOptional
A required query parameter wasn't provided.
Permission deniedErrorOptional
Insufficient permissions to delete from the table.

Example Workflow Integration

Use Case 1: Account Deletion Request

Allow users to delete their own account.

  1. User Request: User submits "Delete Account" form.
  2. Validation Node: Verify user password or confirmation token.
  3. Delete Data Node: Remove record from production:users where id matches.
  4. 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.

  1. Schedule Trigger: Run every Sunday at midnight.
  2. Delete Data Node: Delete from development:temp_files where created_at < 30_days_ago.
  3. Slack Node: Report number of deleted files (deletedCount).

Workflow Data Flow:

{{schedule.date_threshold}} →  {{deleteData.query.created_at}}
{{deleteData.deletedCount}} →  {{slack.message}}