Skip to content
ActionGoogle BigQueryUpdated May 2026

How do I run a SQL query on BigQuery?

Short answer: Drop the "Google BigQueryRun BigQuery SQL Query" action anywhere in your workflow, map the inputs from upstream nodes, and publish.

Inputs

The fields this action accepts.

Every field can be mapped from an upstream trigger, AI step, table row, or hard-coded literal.

FieldTypeRequiredDescription
Project ID
project_id
stringRequiredGCP project that billing/quotas apply to.
SQL Query
query
stringRequiredStandard SQL. Use fully-qualified table names: `project.dataset.table`.
Use Legacy SQL
use_legacy_sql
booleanOptionalLeave off for standard SQL (recommended). On only for legacy BQ syntax.
Max Results
max_results
numberOptionalRows per page.
Query Timeout (ms)
timeout_ms
numberOptionalHow long to wait for the query to finish before returning a jobId for async polling.
Sample request
{
"project_id": "my-gcp-project-12345",
"query": "SELECT name, COUNT(*) AS count FROM `bigquery-public-data.usa_names.usa_1910_2013` WHERE state = 'CA' GROUP BY name ORDER BY count DESC LIMIT 10",
"use_legacy_sql": "{{trigger.use_legacy_sql}}",
"max_results": "{{trigger.max_results}}",
"timeout_ms": "{{trigger.timeout_ms}}"
}
Returns
{
"kind": "bigquery#queryResponse",
"rows": [
{
"f": [
{
"v": "John"
},
{
"v": "12345"
}
]
}
],
"schema": {
"fields": [
{
"name": "name",
"type": "STRING"
},
{
"name": "count",
"type": "INTEGER"
}
]
},
"totalRows": "10",
"jobComplete": true,
"jobReference": {
"jobId": "job_abc123",
"projectId": "my-project"
}
}

Use these fields in downstream nodes for routing, logging, or error handling.

Triggered by

Apps that pair well as the trigger for Run BigQuery SQL Query.

Any of these apps can fire this action as part of a workflow.

FAQ

Questions about Run BigQuery SQL Query.

What does the Run BigQuery SQL Query action do in Google BigQuery?
Executes a Standard SQL query and returns the resulting rows. Cost scales with bytes scanned, so tight WHERE clauses on partitioned columns save real money. Use dry_run=true to preview cost before running large queries.
What inputs does Run BigQuery SQL Query require?
Required: Project ID, SQL Query. Every input accepts a static value or a variable from any upstream node in your workflow.
Can I use dynamic inputs from earlier workflow nodes?
Yes. Any field on this action can pull values from upstream nodes, whether that's a form response, a trigger payload, an AI output, or a lookup result.
What happens if Google BigQuery returns an error?
The workflow pauses on the failed node, the error message is captured in the run log, and you can retry the run with one click. Auto-retry policies are configurable per workflow with exponential backoff up to 5 attempts.
Does Run BigQuery SQL Query support batch operations?
Yes. Run Run BigQuery SQL Query inside a Loop node to process arrays. Tiny Command handles Google BigQuery's rate limits automatically so you don't have to throttle manually.
More actions

Other Google BigQuery actions.

Send run bigquery sql query from your workflows.

Triggered by anything in the catalog. Free tier available. No credit card.