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
Thectx 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
Thectx object includes several key properties:
ctx.rowId- UUID of the current rowctx.colId- UUID of the current columnctx.thisCell- Helpers for the currently executing cell (not available in webhook columns)ctx.thisRow- Helpers for the current rowctx.thisSheet- Helpers scoped to the current sheetctx.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 }):