How to Build an Admin Dashboard in Retool From Scratch

October 28, 2026

Retool is a low-code builder for internal tools. You drag a table, write a SQL query, and get a working admin panel in an afternoon — the thing that otherwise takes a week of Django or Next.js scaffolding. The free plan supports up to 5 users and 500 workflow runs a month.

Below is a real build: a customer lookup screen with search, pagination, a detail view and a safe way to change a plan tier. It assumes Postgres, but the pattern works with any of the 40+ supported databases.

What do you need before you start?

A Retool account, a database you don’t mind pointing an app at, and a read-only credential if you can make one. That last item is the difference between a demo and something you’d let a support rep use.

Steps:

  1. Sign up at retool.com, choose the free plan.
  2. Create an organisation. The name becomes part of every app URL, so pick it once.
  3. Resources → Create new → Postgres and paste the connection string.
  4. Tick Use prepared statements. Retool defaults to this but it’s worth confirming — it’s the difference between safe parameter binding and string concatenation into your SQL.

Retool’s IP allowlist matters if your database sits behind a firewall. The app connects from Retool’s servers, not from the browser, so you need to allow Retool’s outbound ranges or use the self-hosted edition. This blocks more first attempts than anything else.

How do you write the first query?

Open a new app, then the Code panel. Add a query resource and name it getCustomers. Names become the JS references, so use something you can type without checking.

SELECT id, email, plan, created_at, mrr
FROM customers
WHERE ({{ !searchInput.value }} OR email ILIKE '%' || {{ searchInput.value }} || '%')
  AND ({{ !planSelect.value }} OR plan = {{ planSelect.value }})
ORDER BY created_at DESC
LIMIT {{ table1.pageSize }}
OFFSET {{ table1.paginationOffset }};

The {{ }} blocks are Retool’s bindings. They compile to parameters, which is why this is safe from injection as long as you keep them as values and don’t concatenate them into a string yourself.

Hit Run. The first run shows a preview of 20 rows. If it errors with “column does not exist”, Retool cached the schema from a different schema — re-sync on the resource page.

How do you wire up search, filters and pagination?

Drop a Table component on the canvas, a Text Input called searchInput, and a Select called planSelect. Then in getCustomers, open Advanced → Run query only when manually triggered and untick it, so the query re-runs when inputs change.

Set the text input’s Default debounce to 300ms. Without it, every keystroke fires a query and a support rep typing an email address generates 24 database round trips. This is the single most common performance mistake in Retool apps.

For pagination, the table’s paginationOffset updates automatically when you click next. Bind it in the query as shown, and set the table’s Total row count to a second query:

SELECT count(*) AS total FROM customers
WHERE ({{ !searchInput.value }} OR email ILIKE '%' || {{ searchInput.value }} || '%')
  AND ({{ !planSelect.value }} OR plan = {{ planSelect.value }});

Point the table’s row count at {{ countCustomers.data[0].total }} and the page numbers work.

How do you add an edit that can’t corrupt data?

This is where internal tools go wrong. A support person editing plan directly in an editable table column can set anything the enum allows, and you have no record of who did it.

Better pattern: a modal form with a confirmation step and an audit insert.

  1. Add a Button to the table’s row actions, opens formModal.
  2. In the modal, a Select bound to {{ table1.selectedRow.data.plan }}.
  3. An updatePlan query:
UPDATE customers SET plan = {{ planSelect2.value }} WHERE id = {{ table1.selectedRow.data.id }};
  1. A second query logChange inserting (actor, customer_id, old_plan, new_plan, now()) into an audit_log table.
  2. Set updatePlan‘s On success handler to run logChange and getCustomers.

Retool’s built-in Audit Logs exist but are a Business-tier feature ($50/user/month). A table you write yourself costs nothing and is queryable.

For anything destructive — refunds, deletions — use the Confirmation setting on the button and type the customer email as confirmation. It sounds like theatre until someone deletes the wrong row.

What does Retool cost and when is it too expensive?

Per-user pricing is the trap. Retool starts at $10/user/month for Standard (5-20 users) and jumps to $50/user/month for Business, which is where SSO, audit logs and granular permissions live.

For a support team of 8, that’s $400/month on Business. Compare with a weekend of internal React work or a $20/month hosting bill — the break-even is roughly 6 months of coding time.

Where Retool earns its price: tools used by 3-20 people, changing weekly, on top of databases you already have. Where it doesn’t: a tool for 200 field staff (per-user pricing kills it), or a tool that hasn’t changed in a year (you’re now paying rent on something static).

Retool also supports “external users” at $5/user on some plans for embedding. Read the limits carefully, they change.

Quick Summary

  • Retool builds internal tools against your existing database; free plan is 5 users, 500 workflow runs.
  • Always connect with prepared statements and, ideally, a read-only credential.
  • Set a 300ms debounce on search inputs or you’ll flood the database per keystroke.
  • Pair every write query with an explicit audit insert — built-in audit logs are Business-tier.
  • $10/user standard, $50/user business; it pays off for 3-20 monthly active internal users, not large field teams.”}