# How to monitor API workflow execution in Bubble.io: Step-by-Step Guide

- Tool: Bubble
- Difficulty: Intermediate
- Time required: 15-20 min
- Compatibility: Growth plan+ (for backend workflows)
- Last updated: March 2026

## TL;DR

Monitoring API workflow execution in Bubble involves using the Scheduler tab to view queued and completed workflows, logging start and end times in a WorkflowLog data type, tracking success and failure status, and setting up alerts for failed executions. This tutorial covers building a comprehensive workflow monitoring system.

## Overview: Monitoring API Workflow Execution in Bubble

Backend workflows run silently in the background. Without monitoring, failures go undetected. This tutorial shows how to build visibility into your workflow execution.

## Before you start

- A Bubble app with backend API workflows
- Growth plan or higher for backend workflow access
- Basic understanding of Data Types and Workflows
- Admin page for viewing logs

## Step-by-step guide

### 1. Use the built-in Scheduler tab

Go to the Logs tab in your Bubble editor. Click the Scheduler sub-tab. This shows all scheduled API workflows: queued, currently running, and recently completed. You can see the workflow name, scheduled time, parameters, and status. Use this for quick checks. Note that server log retention varies by plan (6 hours on Free, longer on paid plans).

**Expected result:** You can view scheduled and recent workflow executions in the Scheduler tab.

### 2. Create a custom WorkflowLog data type

Create WorkflowLog: workflow_name (text), status (text: Started/Completed/Failed), started_at (date), completed_at (date), duration_ms (number), input_params (text), error_message (text), records_processed (number). At the start of each backend workflow, create a WorkflowLog (status=Started). At the end, update it (status=Completed, duration calculated). In error handlers, update with status=Failed and error details.

**Expected result:** Custom logging captures execution details for every backend workflow run.

### 3. Build the monitoring dashboard

Create an admin page showing WorkflowLogs in a Repeating Group sorted by started_at descending. Add filters for workflow_name, status, and date range. Display summary stats: total runs today, success rate, average duration, failed count. Color-code status badges: green=Completed, red=Failed, yellow=Started (still running). For workflows started more than 10 minutes ago still in Started status, flag as potentially stuck.

> Pro tip: For enterprise-grade monitoring with real-time dashboards and automated recovery, RapidDev can help build comprehensive observability systems.

**Expected result:** An admin dashboard provides visibility into all workflow executions.

### 4. Set up failure alerts

In your backend workflow error handling, when status = Failed, trigger an alert. Send an email to the admin with the workflow name, error message, and timestamp. For critical workflows, also post to a Slack channel via the API Connector. Create a notification in the app's admin notification system. Review failed workflows daily and resolve the underlying issues.

**Expected result:** Failed workflows trigger immediate notifications to the admin team.

### 5. Add performance tracking

Calculate duration_ms as the difference between completed_at and started_at in milliseconds. Track average durations per workflow over time. If a workflow's average duration increases by more than 50%, flag it for investigation. Store records_processed to track throughput. Use these metrics to identify bottlenecks and optimize slow workflows.

**Expected result:** Performance trends are tracked and anomalies flagged for investigation.

## Complete code example

File: `Workflow summary`

```text
WORKFLOW MONITORING SUMMARY
============================

DATA: WorkflowLog (workflow_name, status, started_at,
  completed_at, duration_ms, input_params, error_message)

PATTERN (in each backend workflow):
  Step 1: Create WorkflowLog (Started)
  Step 2-N: Actual workflow actions
  Final: Update WorkflowLog (Completed, duration)
  Error: Update WorkflowLog (Failed, error_message)
  Alert: Send email/Slack if failed

DASHBOARD:
  Filters: name, status, date range
  Stats: runs today, success rate, avg duration
  Alerts: failed workflows flagged red
  Stuck: Started > 10 min ago flagged yellow
```

## Common mistakes

- **Not logging workflow starts, only completions** — If a workflow fails before reaching the completion log, you have no record it ever ran Fix: Always create a WorkflowLog record at the START of the workflow, then update it at completion or failure.
- **Relying solely on Bubble's built-in Scheduler tab** — Bubble's log retention is limited (6 hours on Free plan) and does not provide historical trends or alerting Fix: Build a custom WorkflowLog system that retains data indefinitely and supports dashboards and alerts.
- **Not calculating execution duration** — Without duration tracking, you cannot detect performance degradation until workflows start timing out Fix: Record started_at and completed_at, then calculate duration. Alert when durations exceed normal thresholds.

## Best practices

- Log workflow start AND completion for complete visibility
- Track execution duration to detect performance degradation
- Set up immediate alerts for failed workflows
- Color-code status for quick dashboard scanning
- Flag workflows stuck in Started status as potentially hung
- Archive old logs to keep the monitoring dashboard responsive
- Review failed workflows daily and resolve root causes

## Frequently asked questions

### How long does Bubble retain server logs?

Free plan: 6 hours. Paid plans retain longer (check your plan details). Custom WorkflowLog records persist indefinitely in your database.

### Can I monitor workflows in real time?

Yes. Your monitoring dashboard's Repeating Group auto-updates via Bubble's WebSocket connection. New WorkflowLog entries appear automatically.

### How do I detect stuck workflows?

Flag WorkflowLog records where status = Started AND started_at is more than 10 minutes ago. These likely encountered an unlogged error.

### Will logging consume significant workload units?

Each WorkflowLog creation and update adds ~1 WU per workflow execution. For most apps this is negligible compared to the workflow's own WU cost.

### Can I export workflow logs?

Yes. Go to Data tab → App data → WorkflowLog → Export to download logs as CSV for external analysis.

### Can RapidDev help build monitoring systems?

Yes. RapidDev can build comprehensive observability including real-time dashboards, automated recovery, performance optimization, and integration with external monitoring tools.

---

Source: https://www.rapidevelopers.com/bubble-tutorial/monitor-api-workflow-execution-bubble
© RapidDev — https://www.rapidevelopers.com/bubble-tutorial/monitor-api-workflow-execution-bubble
