Get Todo Workflow
This guide shows how to build a Get Todo API that fetches a single todo item using a query parameter, built entirely with DotPortion’s visual workflow builder.What We’re Building
Endpoint:Retrieve a single todo item by its ID using query parameters (not path params).
Before You Start
Make sure you have:- Created the Todo Project
- Defined the Todo Schema
- Inserted at least one todo
- Selected a database (Platform DB or MongoDB)
Step 1: Create a New Workflow
- Open your project
- Click New Workflow
- Name it:
get-todo
🖼️ Workflow Creation (UI Reference)
Step 2: Configure API Start Node
Select the API Start Node and configure:- Method:
GET - Path:
/todo
🖼️ API Start Node Configuration
Step 3: Add Parameter Node (Query)
Add a Parameter Node to extract values from the query string. Configure the field:| Field | Source | Type | Required |
|---|---|---|---|
| id | Query | String | Yes |
🖼️ Query Parameter Configuration
Step 4: Add Database Node
Add a Database Node to fetch the todo. Configure:- Database: Platform DB or MongoDB
- Collection:
todos - Operation:
findOne - Filter:
🖼️ Database Find Configuration
Step 5: Add Response Node
Add a Response Node to return the todo data. Configure:- Status Code:
200 - Response Body:
🖼️ Response Node Configuration
Step 6: Connect the Nodes
Connect the nodes in this order:🖼️ Final Workflow Graph
Step 7: Deploy the Workflow
Click Deploy to make the API live.Testing the Workflow
Call the API using:- Provide the query value
- Watch database execution
- Inspect returned data
🖼️ Realtime Executor View