Skip to main content
Category: Database Type: Data Retrieval Node

Overview

The Fetch Data node allows you to retrieve stored records (also called “documents”) from your database collection. You can fetch all records, a specific record, or simply count how many records exist — all without writing a single line of code. This node is useful when your workflow needs to read, analyze, or display data that already exists in your database, such as user profiles, orders, or product lists.

Description

The Fetch Data node connects your workflow to your chosen database collection and brings back the data you need. It supports three main retrieval modes:
  • Fetch All Documents: Retrieve every record inside a collection.
  • Fetch Specific Document: Retrieve a single record by its ID or other criteria.
  • Count Documents: Get only the total number of records.
This node is perfect for displaying stored information, generating reports, or processing user data inside no-code workflows.

Input Parameters

Node Description
  • Type: Text
  • Description: A short internal note describing what this node does in your workflow.
  • Required: No
Select Action Type
  • Type: Dropdown (Select)
  • Description: Defines what kind of fetch action you want to perform — fetch all, fetch one, or count.
  • Required: Yes
Collection Name
  • Type: Dropdown (Select)
  • Description: The name of the collection (database) where your documents are stored. Example: test3 (production).
  • Required: Yes

Output Parameters

When executed, this node provides a structured JSON output that other nodes can use. Output Fields:
  • tableName: The full collection name (e.g., production:test3).
  • queryId: A unique ID generated for this fetch operation.
  • data: The array of documents that were fetched from the collection.
  • message: A success message describing the result.
  • status: Indicates the result of the operation — usually "success" or "error".

Output Type

The node output is in JSON format, meaning the data is structured into fields and values. This makes it easy for other workflow nodes to read, filter, or use the information directly.

Example Usage

Example 1 — Fetch All Documents

Input:
{
  "Select Action Type": "Fetch All Documents",
  "Collection Name": "test3 (production)"
}
Expected Output:
{
  "output": {
    "tableName": "production:test3",
    "queryId": "6e7b29a3-61a9-4e23-b1cc-9af3b4c8d190",
    "data": [
      {
        "id": "201",
        "name": "Alice Carter",
        "email": "alice.carter@startup.io",
        "bio": "Alice is a UX designer passionate about accessible interfaces and clean visuals.",
        "active": "yes",
        "created_at": "2024-11-05T09:00:00.000Z"
      },
      {
        "id": "202",
        "name": "Brian Thompson",
        "email": "brian.thompson@agency.com",
        "bio": "Brian is a content strategist with a decade of experience in brand storytelling.",
        "active": "no",
        "created_at": "2024-12-10T14:30:00.000Z"
      },
      {
        "id": "203",
        "name": "Chloe Ramirez",
        "email": "chloe.ramirez@techlabs.ai",
        "bio": "Chloe is a data analyst who specializes in predictive modeling and insights reporting.",
        "active": "yes",
        "created_at": "2025-01-15T08:45:00.000Z"
      }
    ],
    "message": "Successfully fetched 3 documents",
    "status": "success"
  }
}

Example 2 — Count Documents

Input:
{
  "Select Action Type": "Count Documents",
  "Collection Name": "test3 (production)"
}
Expected Output:
{
  "output": {
    "tableName": "production:test3",
    "count": 13,
    "message": "Successfully counted documents",
    "status": "success"
  }
}

How to Use in a No-Code Workflow

  1. Add the Node: Drag and drop the Fetch Data node into your workflow canvas.
  2. Open Settings: Click on the node to open its configuration panel.
  3. Add a Description: Optionally describe its purpose (e.g., “Fetch all employee records”).
  4. Select Action Type: Choose one of the three options:
    • Fetch All Documents
    • Fetch Specific Document
    • Count Documents
  5. Choose Collection: Select your database collection such as test3 (production).
  6. Save Changes: Click Save Changes to confirm your setup.
  7. Run the Workflow: When triggered, the node fetches data and passes it to the next node automatically.

Best Practices

  • Always verify that you are fetching from the correct collection.
  • Use Count Documents to check totals before performing actions like filtering or deleting.
  • If you only need specific records, use Fetch Specific Document to avoid unnecessary data load.
  • Combine this node with Filter, Text Generation, or Email Sending nodes for dynamic workflows.
  • Keep the Node Description meaningful so others can easily understand its purpose.

Example Workflow Integration

Here’s an example of how this node might fit into a workflow:
  1. Trigger Node: The workflow begins when an admin clicks “View Records.”
  2. Fetch Data Node: Retrieves all user data from test3 (production).
  3. Text Generation Node: Summarizes the fetched data into a readable format.
  4. Send Email Node: Sends a formatted summary to the admin’s inbox.
This workflow automates the process of pulling, formatting, and sharing database information.

Common Errors

  • Missing Collection Name: The node cannot run without selecting a valid collection.
  • Invalid Action Type: Ensure one of the supported options is chosen.
  • Empty Results: Happens when no records exist in the selected collection.
  • Connection Timeout: Check your database connection or permissions if data fails to load.