Back to Templates
Give business users a chat box; get back valid BigQuery SQL and live query results.
The workflow:
INFORMATION_SCHEMA
).Perfect for analysts, customer-success teams, or any stakeholder who needs data without writing SQL.
Import the workflow
Add credentials
Service | Where to create credentials | Node(s) to update |
---|---|---|
OpenAI | <https://platform.openai.com> → Create API key | OpenAI Chat Model |
Google BigQuery | Google Cloud Console → IAM & Admin → Service Account JSON key | Google BigQuery (schema + query) |
Point the schema fetcher to your dataset
SELECT table_name, column_name, data_type
FROM `n8nautomation-453001.email_leads_schema.INFORMATION_SCHEMA.COLUMNS`
n8nautomation-453001.email_leads_schema
with YOUR_PROJECT.YOUR_DATASET
.INFORMATION_SCHEMA
always surfaces table_name
, column_name
, and data_type
.Update the execution node
{{ $json.output.query }}
so it will run whatever the AI returns.(Optional)Embed the chat interface
Test end-to-end
Activate
LIMIT 1000
to every query.