Custom API With Lowcode Tools – How to Build an API Using n8n
When you build a service or need to connect your database to external resources, using a custom API built fast can be game-changing. When you’re building a service like Zapier, the end result of your workflow has to push to some place in an app or database. However, with a custom API, you can retrieve and show the specific data of a lookup right in your URL and response.
At Tropic Flare, we specialize in streamlining business processes using powerful, low-code tools. One of our favorite tools is n8n, an open-source workflow automation platform that enables you to create complex automations and custom APIs without writing a single line of code.
In this blog post, we’ll walk you through how to build a custom API using n8n. Specifically, we’ll show you how to:
- Push a specific client to a webhook.
- Look up the client in your database.
- Return the specific info for that client in the response.
Custom API in n8n Example

Whether you’re a small business looking to automate your processes or a tech-savvy professional, this guide is for you.
Steps to Create a Custom API Webhook with Lowcode Tools
Step 1: Set Up a Webhook in n8n
To begin, you’ll need to create a webhook that will act as the entry point for your API. This webhook will receive client data, such as a client ID, from an external source.
- Create a New Workflow: Open n8n and create a new workflow.
- Add a Webhook Node: Drag and drop the Webhook node into the workflow. Configure it to accept POST requests. The webhook will receive client data from external sources, like a website form or another system.
- Configure the Webhook: In the Webhook node settings, define the URL path and parameters. This will serve as your API endpoint.
Set up a webhook receive in n8n that is your first step in the workflow to receive a JSON payload from your webhook service.
Step 2: Lookup the Client in Your Database
Once the webhook receives the JSON package with your client ID, the next step is to look up the client in your database and retrieve their information.
- Add a Database Node: Drag a Database node (e.g., MySQL, PostgreSQL) into your workflow. Connect it to the Webhook node.
- Configure the Database Node: Set up a query that looks up the client based on the ID received by the webhook. In our case, we’re going to lookup the client info in our Google Sheet.
- Test the Query: Ensure that your query is finding the client data in your database correctly by running a test. Run a couple of tests to make sure it’s set up right.
Step 3: Return the Client Info in the Response
The final step is to return the client information as a response to the API request.
- Add a Response Node: Drag and drop the HTTP Response node into your workflow. Connect it to the Database node.
- Configure the Response Node: Set the response format to JSON and map the client data retrieved from the database to the response body.
- Test the Workflow: Send a test request to your webhook URL with a client ID, and you should receive the client’s information in the response.
Use Cases
This custom API can be used in various scenarios:
- Client Portals: Allow clients to retrieve their own information securely.
- Sales CRM: Enable sales teams to pull client data in real-time.
- Customer Support: Automate the lookup process to provide quick responses to client queries.
Conclusion
Building a custom API with n8n is both simple and powerful. By setting up a webhook, querying your database, and returning the necessary data, you can automate processes and enhance the efficiency of your operations.
At Tropic Flare, we’re dedicated to helping businesses unlock their potential with automation. If you need help setting up workflows like this or want to explore more advanced use cases, don’t hesitate to reach out for a free consultation. Let’s turn your automation ideas into reality.
