Skip to main content

Introduction

The Context object (ctx) provides a powerful API for programmatically interacting with your workflow. It allows you to read cell values, navigate between sheets, and orchestrate complex workflows—all from within your column code.

Available APIs

This Row

Get values from the current row

Sheets

Add rows and query data across sheets

Utilities

Helper functions for common data transformations

Workflows

Orchestrate execution with sleep and halt

Webhooks

Receive and process HTTP requests in your workflow

Getting Started

The ctx object is automatically available in all column formulas:

Key Features

  • Row Operations: Read data from the current row or any row in the sheet
  • Cross-Sheet Access: Push data between sheets and query related records
  • Foreign Key Navigation: Use dot notation to traverse relationships (e.g., Companies.Owner.name)
  • Workflow Control: Optimize execution with halt() for early termination signals
  • Type Safety: Column names and sheet names are validated at runtime

Context Properties

The ctx object includes several key properties:
  • ctx.rowId - UUID of the current row
  • ctx.colId - UUID of the current column
  • ctx.thisCell - Helpers for the currently executing cell (not available in webhook columns)
  • ctx.thisRow - Helpers for the current row
  • ctx.thisSheet - Helpers scoped to the current sheet
  • ctx.utils - Utility functions for data transformation

Cell objects (value + status + error)

When you need access to a cell’s execution metadata (not just the value), use a Cell object:
  • Use await ctx.thisRow.cell("Column Name") to get { value, status, error, rowId, colId } for a specific column on the current row.
  • Use ctx.thisCell.get() / ctx.thisCell.set(value) when you specifically mean the currently executing cell.

Low-level: write to any cell with ctx.setCell()

If you need to set a cell that is not the current executing cell, use ctx.setCell({ rowId, colId, value }):

Common Patterns

Qualify Leads and Skip Non-ICP