ActionGoogle BigQueryUpdated September 2026

How do I run a SQL query on BigQuery?

Short answer: You can run bigquery sql query in Google BigQuery by hand from its own interface, but it won’t repeat itself. On TinyCommand, add the Google BigQuery Run BigQuery SQL Query action to a workflow, map its 5 inputs from any upstream app, and it runs automatically every time the trigger fires. No code, and a free tier to start.

Run BigQuery SQL Query in Google BigQuery — start free
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 run history shows the failed step with its input and the error message Google BigQuery returned, so you can fix the input and run the workflow again. Automatic retries are built into HTTP steps only, where you can also set your own retry count and delay.
Does Run BigQuery SQL Query support batch operations?
Run Run BigQuery SQL Query inside a loop to process each item in an array. TinyCommand does not throttle calls for you, so for large arrays add a Delay step if you need to stay within Google BigQuery's rate limits.
More actions

Other Google BigQuery actions.

Run BigQuery SQL Query in Google BigQuery — start free