Add New Data
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"production:users" or "development:orders"Dynamic Column FieldsanyOptional{"name": "John", "age": 30}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"users"queryIdstringOptional"q12345"statusstringOptional"success"messagestringOptional"Record added successfully"errorTypestringOptional"validation_error"errorCodestringOptional"ERR_MISSING_FIELD"missingColumnstringOptional"email"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
Add the Node
Drag the Add New Data node onto your workflow canvas.
Select Table
Open Node Settings and select or create the database table where you want to store data.
Map Data
Click Add Data to define column names and values. Enter static values or use {{...}} variables.
Save and Connect
Save changes and connect the node to previous steps (e.g., Form Submission).
Run Workflow
Run the workflow. The node will attempt to insert the record and return the status.
Best Practices
- Always double-check your
collectionNameformat ("environment:tableName"). - Ensure column names exactly match your database schema (case-sensitive).
- Use the
"development"environment for testing before writing to production. - Use the
statusoutput to trigger conditional logic (e.g., send email only on success).
Do / Don’t
- ✔️ Use descriptive table names.
- ✔️ Validate input data in previous nodes if possible.
- ✔️ Handle potential errors (like duplicate keys) in your workflow logic.
- ❌ 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
statusbefore proceeding.
Common Errors
Missing required columnErrorOptionalInvalid collectionName formatErrorOptionalPermission deniedErrorOptionalDuplicate keyErrorOptionalExample Workflow Integration
Use Case 1: User Registration
Capture user details from a form and save them to the database.
- Form Submission Node: Captures user input (name, email).
- Add New Data Node: Inserts data into
production:users. - 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.
- Stripe Trigger: Receives a "Payment Success" event.
- Add New Data Node: Inserts order ID, amount, and customer email into
production:orders. - 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.
- Typeform Trigger: Receives new survey response.
- Text Analysis Node: Analyzes the sentiment of the feedback (Positive/Negative).
- 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.
- Logic Node (Catch Error): Catches an error from a failed API call.
- 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}}
