DEV Community

Thesius Code
Thesius Code

Posted on • Originally published at datanest-stores.pages.dev

Retool Internal Tool Templates

Retool Internal Tool Templates

8 production-ready Retool dashboard templates for building internal tools fast. Includes admin panels, order management systems, user analytics dashboards, support ticket systems, inventory managers, and more — with pre-built SQL queries, JavaScript transformers, and responsive layouts.

Key Features

  • 8 complete dashboard templates with queries, components, and transformers
  • Pre-written SQL queries — parameterized, paginated, and optimized
  • JavaScript transformers — data shaping, formatting, and aggregation logic
  • Role-based access patterns — admin, manager, and viewer permission templates
  • Responsive layouts — configured for desktop and tablet use
  • Alert rules — pre-configured monitoring thresholds for key metrics
  • Environment-aware — development and production configurations with variable swapping

What's Included

# Template Components Queries Transformers
1 Admin Panel 24 8 4
2 Order Management 18 10 5
3 User Analytics 15 6 6
4 Support Ticket System 20 9 4
5 Inventory Manager 16 7 3
6 Content Moderation 14 6 3
7 Financial Dashboard 12 8 5
8 Employee Directory 10 4 2
retool-dashboard-templates/
├── README.md
├── configs/
│   ├── development.yaml       # Dev database connections
│   └── production.yaml        # Production settings
├── dashboards/
│   └── main.json              # Dashboard export bundle
├── alerts/
│   └── rules.yml              # Alert threshold rules
└── LICENSE
Enter fullscreen mode Exit fullscreen mode

Quick Start

  1. Log in to Retool and navigate to your workspace
  2. Create a new app — click "Create new" → "App"
  3. Import the template — use the JSON from dashboards/main.json as reference
  4. Connect your data source — add your PostgreSQL, MySQL, or API resource
  5. Update queries — replace placeholder table names with your actual schema
  6. Configure permissions — set user group access per the role-based patterns
  7. Deploy — publish the app and share with your team

Example: Order Management Queries

-- Query: get_orders (paginated, filterable)
SELECT o.id AS order_id, o.created_at, c.name AS customer_name,
  c.email, o.total_amount, o.status, o.shipping_status,
  COUNT(oi.id) AS item_count
FROM orders o
JOIN customers c ON c.id = o.customer_id
LEFT JOIN order_items oi ON oi.order_id = o.id
WHERE 1=1
  {{ statusFilter.value ? "AND o.status = '" + statusFilter.value + "'" : "" }}
  {{ searchInput.value ? "AND c.name ILIKE '%" + searchInput.value + "%'" : "" }}
  {{ dateRange.value.start ? "AND o.created_at >= '" + dateRange.value.start + "'" : "" }}
GROUP BY o.id, c.name, c.email
ORDER BY o.created_at DESC
LIMIT {{ pagination.pageSize }} OFFSET {{ pagination.offset }};

-- Query: update_order_status
UPDATE orders SET status = {{ statusSelect.value }}, updated_at = NOW()
WHERE id = {{ ordersTable.selectedRow.order_id }} RETURNING *;
Enter fullscreen mode Exit fullscreen mode

Example: JavaScript Transformer

// Transformer: formatOrderMetrics — aggregates data for summary cards
const orders = {{ get_orders.data }};
const total = orders.reduce((sum, o) => sum + parseFloat(o.total_amount), 0);
const count = orders.length;
const breakdown = {};
orders.forEach(o => { breakdown[o.status] = (breakdown[o.status] || 0) + 1; });

return {
  revenue: `$${total.toLocaleString('en-US', {minimumFractionDigits: 2})}`,
  orders: count.toLocaleString(),
  aov: `$${(count > 0 ? total / count : 0).toFixed(2)}`,
  pending: breakdown['pending'] || 0,
  fulfilled: breakdown['fulfilled'] || 0,
  refunded: breakdown['refunded'] || 0
};
Enter fullscreen mode Exit fullscreen mode

Configuration

# configs/production.yaml
retool:
  workspace: "your-workspace"
  environment: "production"

  # Database connection (configured in Retool Resources)
  database:
    resource_name: "Production PostgreSQL"
    host: "db.example.com"
    port: 5432
    database: "app_production"
    username: "retool_readonly"
    password: "YOUR_DB_PASSWORD"
    ssl: true

  # Alert thresholds
  alerts:
    # Order alerts
    pending_orders_threshold: 50     # Alert if pending > 50
    refund_rate_threshold: 5.0       # Alert if refund rate > 5%
    # Performance alerts
    query_timeout_ms: 5000           # Alert if queries exceed 5s
    # Usage alerts
    daily_active_users_min: 10       # Alert if DAU drops below 10

  # Permission groups
  permissions:
    admin:
      - read_all
      - write_all
      - delete
      - export
    manager:
      - read_all
      - write_own
      - export
    viewer:
      - read_own
Enter fullscreen mode Exit fullscreen mode

Alert Rules

# alerts/rules.yml
alerts:
  - name: "High Pending Orders"
    query: "SELECT COUNT(*) FROM orders WHERE status = 'pending' AND created_at > NOW() - INTERVAL '24h'"
    condition: "result > 50"
    severity: warning
  - name: "Refund Spike"
    query: "SELECT COUNT(*)::float / NULLIF(...) * 100 FROM orders WHERE status='refunded' AND created_at > NOW()-'7d'"
    condition: "result > 5.0"
    severity: critical
  - name: "Slow Query Detected"
    condition: "query_execution_time_ms > 5000"
    severity: warning
Enter fullscreen mode Exit fullscreen mode

Best Practices

  1. Use parameterized queries — never concatenate user input directly into SQL
  2. Create a read-only database user for Retool — don't use the admin account
  3. Paginate all tables — loading 10K+ rows kills performance and UX
  4. Use Transformers for data formatting — keep SQL clean, do display logic in JS
  5. Set up resource environments — separate dev/staging/prod database connections
  6. Cache infrequently changing queries — user lists, product catalogs, config tables
  7. Test with realistic data volumes — a dashboard that works with 100 rows may break at 100K

Troubleshooting

Issue Solution
Query returns empty despite data existing Check that the connected resource points to the correct database/schema
Table component not updating after write Add the read query to the write query's "On Success" trigger to refresh
Slow dashboard load Identify the slowest query in Retool's debugger; add indexes or pagination
Permission errors for viewers Verify the user group is assigned to the app and query permissions are set
JavaScript transformer errors Check browser console for detailed error; Retool's error messages can be vague
Export to CSV missing columns Ensure all columns are visible (not hidden) in the table component settings

This is 1 of 11 resources in the No-Code Builder Pro toolkit. Get the complete [Retool Internal Tool Templates] with all files, templates, and documentation for $39.

Get the Full Kit →

Or grab the entire No-Code Builder Pro bundle (11 products) for $129 — save 30%.

Get the Complete Bundle →


Related Articles

Top comments (0)