Automation Blog

How to Build a Zap Run Log Using Sub-Zaps and Zapier Tables

How to create a centralized run log for your Zapier automations — using a Sub-Zap as a reusable logging action that any Zap can call, and Zapier Tables as the persistent log store that records what ran, when, what data was processed, and the outcome.

ZapierZapier TablesSub-ZapsLogging

By Troy Tessalone · · 6 minutes

Automation Guide

A practical field guide from Automation Ace.

How to Build a Zap Run Log Using Sub-Zaps and Zapier Tables

Zapier's built-in task history shows every run, but it doesn't let you query or filter across Zaps, attach custom metadata, or build dashboards. A Zap run log built on Zapier Tables gives you a queryable record of every workflow execution — with custom fields for Zap name, the record being processed, the outcome, and any values you want to capture. Using a Sub-Zap as the logging action means you write the log-entry logic once and call it from any Zap without rebuilding it.

Architecture: Three Components

  • Zapier Tables log table — stores one row per Zap run with fields for timestamp, Zap name, record ID, status, and any custom data
  • Logger Sub-Zap — a dedicated Zap with a "Run Sub-Zap" trigger that receives log data as inputs and writes a row to the Tables log table
  • Source Zaps — your existing Zaps that call the Logger Sub-Zap at the end of each run (or at key checkpoints) to record what happened

Step 1: Create the Zapier Tables Log Table

In Zapier Tables, create a new table named something like Zap Run Log with these fields:

  • Run At (Date) — when the Zap ran
  • Zap Name (Text) — name of the calling Zap
  • Record ID (Text) — the primary record being processed (order ID, contact ID, etc.)
  • Status (Single Select) — success, error, skipped
  • Details (Long Text) — any custom message, error description, or summary
  • Extra Data (Text) — optional JSON string for additional structured context

Step 2: Build the Logger Sub-Zap

Create a new Zap. Set the trigger to Sub-Zap by Zapier → Run Sub-Zap. In the Sub-Zap trigger configuration, define the input fields that callers will pass in:

  • zap_name — the name of the calling Zap
  • record_id — the record being processed
  • status — success / error / skipped
  • details — a human-readable message
  • extra_data — optional, any additional context

Add a single action: Zapier Tables → Create Record. Map the Sub-Zap input fields to the log table columns:

  • Run At → use the Zap Meta machine_now field (available in the field mapper's Zap Meta section) for the current timestamp — see Zap Meta timestamps
  • Zap Name → zap_name input
  • Record ID → record_id input
  • Status → status input
  • Details → details input
  • Extra Data → extra_data input

Publish the Logger Sub-Zap. Note its Sub-Zap ID — you'll reference it when calling it from other Zaps.

Step 3: Call the Logger from Source Zaps

In any Zap you want to log, add a Sub-Zap by Zapier → Call Sub-Zap action at the end of the Zap (or at any checkpoint). Select the Logger Sub-Zap and fill in the input fields:

  • zap_name: type the Zap's name as a static value, or use Zap Meta → Zap Name to auto-populate it
  • record_id: map the primary identifier from the trigger (order ID, email, record ID)
  • status: type success as a static value for the happy-path log entry
  • details: a short description of what was done (e.g., "Contact created in HubSpot, email sent")
  • extra_data: optionally, JSON-stringify any useful values from the run

Logging Errors with Zapier's Error Handler

To log failures, use Zapier's Error Handler path (available in multi-step Zaps on paid plans). When a step errors, the Error Handler path runs. Add a Call Sub-Zap step in the error path pointing to the same Logger Sub-Zap, with status = error and details mapped to the error message from the failed step.

Building a Summary Code Step Before Logging

For richer log entries, add a Code step just before the Call Sub-Zap to build the details and extra_data fields:

// Build log entry from Zap run data
const orderId = inputData.order_id;
const itemCount = parseInt(inputData.item_count, 10) || 0;
const total = parseFloat(inputData.order_total) || 0;
const createdRecordId = inputData.created_record_id;

const details = `Order ${orderId} processed: ${itemCount} items, $${total.toFixed(2)}. Record: ${createdRecordId}`;

const extraData = JSON.stringify({
  order_id: orderId,
  item_count: itemCount,
  total: total,
  created_record_id: createdRecordId
});

output = { details, extra_data: extraData };

Querying the Log Table

Zapier Tables supports filtering and sorting in its interface — filter by Status to see all errors, sort by Run At to see the most recent runs, or filter by Zap Name to see the history for one specific Zap. For more advanced querying, connect the Tables table to a Google Sheet via another Zap or use the Zapier Tables API.

Lightweight Alternative: Log to Google Sheets

If you're not on a plan that includes Zapier Tables, the same pattern works with Google Sheets: the Logger Sub-Zap appends a row to a log spreadsheet instead of creating a Tables record. The Sub-Zap input fields and calling pattern are identical — only the logging action changes.

The Sub-Zap logging pattern solves a real operational gap in Zapier: task history is per-Zap and not queryable. Building a Logger Sub-Zap once and calling it from every Zap gives you a unified, searchable run history with custom fields — without rebuilding the log-entry logic in each Zap. The Sub-Zap acts as a reusable function; Zapier Tables acts as the database.

For using Zap Meta fields (including Zap Name and timestamps) in log entries, see Zap Meta timestamps in Zapier. For the sequential queue pattern that also uses Zapier Tables, see sequential queue with Webhooks and Zapier Tables. For help building a monitoring and logging layer for your Zapier automations, talk to Automation Ace.

ZapierZapier TablesSub-ZapsLogging

Disclaimer: This article may include links to apps, products, or services. Some links may be affiliate links, which means Automation Ace may earn a commission at no extra cost to you.

Build Better Systems

Ready to automate with confidence?

Share your tools, process, and goals. Automation Ace can design the workflow, integration, AI assist, or code bridge that fits your business.

Start a Project