Fetch Data
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
Retrieve data from your database.
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. Useful for lists and exports.
Fetch Specific Document
Retrieve a single record by its ID. Best for detailed views.
Count Documents
Get only the total number of records. Ideal for statistics and checks.
This node is perfect for displaying stored information, generating reports, or processing user data inside no-code workflows.
Input Parameters
The Fetch Data node accepts the following settings to define what data to retrieve.
Select Action TypestringRequired"Fetch All Documents"Collection NamestringRequired"production:users"Node DescriptionstringOptional"Fetch all active users"Output Parameters
When executed, this node provides a structured JSON output that other nodes can use.
tableNamestringOptional"production:users"queryIdstringOptional"6e7b29a3-..."dataarrayOptional[{"id": "1", "name": "Alice"}, ...]countnumberOptional13messagestringOptional"Successfully fetched 3 documents"statusstringOptional"success"Access the results in your workflow using:
{{fetch-data.output.data}}
{{fetch-data.output.count}}
Output Type
Output Type: JSON
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
Retrieve all user records.
{ "Select Action Type": "Fetch All Documents", "Collection Name": "production:users"}
{ "tableName": "production:users", "queryId": "6e7b29a3-...", "data": [ { "id": "201", "name": "Alice Carter", "active": "yes", "created_at": "2024-11-05T09:00:00.000Z" }, { "id": "202", "name": "Brian Thompson", "active": "no", "created_at": "2024-12-10T14:30:00.000Z" } ], "message": "Successfully fetched 2 documents", "status": "success"}
Example 2: Count Documents
Count total number of orders.
{ "Select Action Type": "Count Documents", "Collection Name": "production:orders"}
{ "tableName": "production:orders", "count": 150, "message": "Successfully counted documents", "status": "success"}
How to Use in a No-Code Workflow
Add the Node
Drag and drop the Fetch Data node into your workflow canvas.
Open Settings
Click on the node to open its configuration panel.
Select Action
Choose one of the three options: "Fetch All Documents", "Fetch Specific Document", or "Count Documents".
Choose Collection
Select your database collection such as production:users.
Run Workflow
Save changes and run the workflow. The node will fetch data and pass it to the next node.
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.
Do / Don’t
- ✔️ Use meaningful Node Descriptions.
- ✔️ Combine with Filter nodes to refine "Fetch All" results.
- ✔️ Handle empty data arrays gracefully in downstream nodes.
- ❌ Don’t fetch all documents from a massive table unless necessary (use Query Data with limit instead).
- ❌ Don’t ignore the
statusfield; check for errors. - ❌ Don’t confuse "Fetch All" with "Query Data" (Query allows server-side filtering).
Common Errors
Missing Collection NameErrorOptionalInvalid Action TypeErrorOptionalEmpty ResultsWarningOptionalConnection TimeoutErrorOptionalExample Workflow Integration
Use Case 1: Admin Dashboard
Display a list of all users.
- Trigger Node: Admin clicks "View Users".
- Fetch Data Node: Retrieves all user data from
production:users. - Display Node: Renders the user list in a table.
Workflow Data Flow:
{{fetchData.data}} → {{displayTable.input.rows}}
Use Case 2: Inventory Check
Check if products are in stock before processing an order.
- Fetch Data Node: Count documents in
production:inventory. - Logic Node: If
count > 0, proceed to checkout; else, show "Out of Stock".
Workflow Data Flow:
{{fetchData.count}} → {{logicNode.input.value}}
