Database

Add New Data

Category
Database
Node Type
Action Node

Overview

The Add New Data Node allows you to insert new records into your existing database tables or collections. It is used in no-code workflows to automatically store user input, API results, or processed data without writing any code.

The node validates your input, maps the values to the correct columns, and returns detailed feedback about whether the record was successfully inserted or if any errors occurred.

Description

Insert new records into your database.

Use this node whenever you need to add data to your connected database. It supports operations in both development and production environments, ensuring safe testing and deployment.

Production Environment

Write data to your live production tables. Use this for real user data.

Development Environment

Write data to development tables for testing and validation without affecting live data.

You can specify the target table and provide column-value pairs for each field. The node supports dynamic variables, allowing data to flow automatically from previous nodes into your database.

Input Parameters

The Add New Data node accepts the target collection name and dynamic fields representing your table columns.

collectionNamestringRequired
The name of the target table or collection. Must be in the format 'environment:tableName'.
Example
"production:users" or "development:orders"
Dynamic Column FieldsanyOptional
Each column in your database table appears as a parameter. Provide values to insert into the new record.
Example
{"name": "John", "age": 30}
Instructions

Variable References: You can use variables from previous nodes using double curly braces:

{{form.input.name}}
{{api.output.email}}

Note: Arrays can be written as comma-separated strings or JSON arrays. Data types are automatically validated.

Output Parameters

The node returns a structured JSON object containing the results of the insertion process.

tableNamestringOptional
Name of the table where the record was inserted.
Example
"users"
queryIdstringOptional
A unique identifier assigned to the insert operation.
Example
"q12345"
statusstringOptional
The outcome of the operation: 'success' or 'error'.
Example
"success"
messagestringOptional
Human-readable status message.
Example
"Record added successfully"
errorTypestringOptional
The type of error if the operation failed (e.g., 'validation_error').
Example
"validation_error"
errorCodestringOptional
Specific code representing the error.
Example
"ERR_MISSING_FIELD"
missingColumnstringOptional
Name of any missing required column if validation fails.
Example
"email"
Accessing Data

Access output values in your workflow using:

{{add-data.output.status}}
{{add-data.output.queryId}}

Output Type

Output Type: JSON

The node’s output is always a JSON object containing the fields described above. It can be passed directly into subsequent nodes for logging or conditional checks.

Example Usage

Example 1: Basic Record Insertion

Insert a new user into the production database.

{  "collectionName": "production:users",  "name": "John Doe",  "email": "john@example.com",  "age": "25"}
{  "tableName": "users",  "queryId": "q12345",  "message": "Record added successfully",  "status": "success",  "errorType": null,  "errorCode": null,  "missingColumn": null}

Example 2: Handling Validation Errors

Attempting to insert data with a missing required field.

{  "collectionName": "development:employees",  "email": "employee@example.com"  // Missing 'name' field}
{  "tableName": "employees",  "queryId": null,  "message": "Missing required column: name",  "status": "error",  "errorType": "validation_error",  "errorCode": "ERR_MISSING_FIELD",  "missingColumn": "name"}

How to Use in a No-Code Workflow

1

Add the Node

Drag the Add New Data node onto your workflow canvas.

2

Select Table

Open Node Settings and select or create the database table where you want to store data.

3

Map Data

Click Add Data to define column names and values. Enter static values or use {{...}} variables.

4

Save and Connect

Save changes and connect the node to previous steps (e.g., Form Submission).

5

Run Workflow

Run the workflow. The node will attempt to insert the record and return the status.

Best Practices

  • Always double-check your collectionName format ("environment:tableName").
  • Ensure column names exactly match your database schema (case-sensitive).
  • Use the "development" environment for testing before writing to production.
  • Use the status output to trigger conditional logic (e.g., send email only on success).

Do / Don’t

Do
  • ✔️ Use descriptive table names.
  • ✔️ Validate input data in previous nodes if possible.
  • ✔️ Handle potential errors (like duplicate keys) in your workflow logic.
Don’t
  • ❌ Don’t use spaces or special characters in column names.
  • ❌ Don’t mix environments (e.g., writing test data to production).
  • ❌ Don’t ignore the error output; always check status before proceeding.

Common Errors

Missing required columnErrorOptional
A required column was not provided. Add the missing column in the node parameters.
Invalid collectionName formatErrorOptional
The collection name format is incorrect. Use 'environment:tableName'.
Permission deniedErrorOptional
The workflow lacks permission to write to this table. Check credentials.
Duplicate keyErrorOptional
Attempted to insert a record with a duplicate unique value (e.g., email). Ensure unique keys are respected.

Example Workflow Integration

Use Case 1: User Registration

Capture user details from a form and save them to the database.

  1. Form Submission Node: Captures user input (name, email).
  2. Add New Data Node: Inserts data into production:users.
  3. Send Email Node: Sends a welcome email if insertion is successful.

Workflow Data Flow:

{{form.input.name}}           →  {{addData.input.name}}
{{addData.output.status}}     →  {{emailNode.input.triggerCondition}}

Use Case 2: Order Processing

Log order details automatically after a successful payment.

  1. Stripe Trigger: Receives a "Payment Success" event.
  2. Add New Data Node: Inserts order ID, amount, and customer email into production:orders.
  3. Slack Node: Notifies the sales team about the new order.

Workflow Data Flow:

{{stripe.output.amount}}      →  {{addData.input.amount}}
{{stripe.output.customer}}    →  {{addData.input.customer_email}}

Use Case 3: Feedback Collection & Analysis

Store user feedback along with an AI-generated sentiment score.

  1. Typeform Trigger: Receives new survey response.
  2. Text Analysis Node: Analyzes the sentiment of the feedback (Positive/Negative).
  3. Add New Data Node: Stores the feedback text and the sentiment score in production:feedback.

Workflow Data Flow:

{{typeform.output.response}}  →  {{addData.input.feedback_text}}
{{ai.output.sentiment}}       →  {{addData.input.sentiment_score}}

Use Case 4: Error Logging

Automatically log workflow errors for debugging.

  1. Logic Node (Catch Error): Catches an error from a failed API call.
  2. Add New Data Node: Logs the error message, timestamp, and workflow ID to development:error_logs.

Workflow Data Flow:

{{apiNode.output.errorMessage}} →  {{addData.input.error_message}}
{{workflow.timestamp}}          →  {{addData.input.timestamp}}