Google BigQuery IK icon

Google BigQuery IK

Consume Google BigQuery API (added support for query operation)

Actions3

Overview

The Google BigQuery IK node's "Record" resource with the "Query Job" operation allows you to execute custom SQL queries against a specified table in a Google BigQuery dataset. This is useful for retrieving, filtering, and aggregating data directly from BigQuery using SQL syntax within your n8n workflows.

Common scenarios:

  • Fetching specific records or analytics from large datasets.
  • Running ad-hoc analysis or reporting queries.
  • Integrating BigQuery results into automated processes (e.g., sending query results via email, updating other systems).

Example use cases:

  • Retrieve all users who signed up in the last 7 days.
  • Aggregate sales data by region and output the summary.
  • Join multiple tables to produce a custom report.

Properties

Name Type Meaning
Authentication options Selects the authentication method: OAuth2 (Recommended) or Service Account.
Project Name or ID options The Google Cloud project containing the dataset. Choose from list or specify an ID/expression.
Dataset Name or ID options The BigQuery dataset to query. Depends on selected project.
Table Name or ID options The BigQuery table to query. Depends on selected project and dataset.
Query string The SQL query to execute. You can write any valid BigQuery SQL here.
Simplify boolean If enabled, returns a simplified version of the response (just row data). If disabled, returns raw data.
Options → Location string (Optional) Specifies the geographic location for the query execution (default: EU).

Output

  • If "Simplify" is enabled:
    The output will be an array of JSON objects, each representing a row returned by your query. Each key corresponds to a column name, and the value is the cell content.

    [
      {
        "column1": "value1",
        "column2": 123,
        ...
      },
      ...
    ]
    
  • If "Simplify" is disabled:
    The output will contain the raw structure as returned by the BigQuery API, which may include metadata and nested fields.

  • Error Handling:
    If an error occurs and "Continue On Fail" is enabled, the output will include an object like:

    { "error": "Error message here" }
    

Dependencies

  • External Services:
    • Requires access to Google BigQuery.
  • Authentication:
    • Either OAuth2 credentials or a Google Service Account key must be configured in n8n.
  • n8n Configuration:
    • Credentials for "Google BigQuery OAuth2 API" or "Google API" (Service Account) must be set up in n8n.

Troubleshooting

Common Issues:

  • Invalid Credentials:
    Errors related to authentication usually mean the OAuth2 or Service Account credentials are missing or misconfigured.
  • Permission Denied:
    The service account or user does not have sufficient permissions on the specified project/dataset/table.
  • Malformed Query:
    Syntax errors in the SQL query will result in error messages from BigQuery.
  • Resource Not Found:
    Specified project, dataset, or table does not exist or is misspelled.

Error Messages:

  • "Request had insufficient authentication scopes": Check that your credentials have the correct scopes.
  • "Not found: Dataset ...": Verify the project and dataset IDs.
  • "Syntax error: ..." : Review your SQL query for mistakes.

Links and References

Discussion