I’m a new user with n8n, exploring how to integrate various Google Cloud services like BigQuery and Google Sheets into my workflows. So far, I’ve managed to construct a workflow based on processing data between Google Sheets and BigQuery, but I’ve hit a snag.
Describe the problem/error/question
I’m encountering an error when trying to send the data to BigQuery via an HTTP Request node.
I suspect the issue might be related to how I’m setting up my HTTP Request node, particularly with the URL configuration or perhaps network settings. If anyone has encountered a similar issue or has insights on how to resolve this, your feedback would be greatly appreciated!
What is the error message (if any)?
ERROR: The service refused the connection - perhaps it is offline connect ECONNREFUSED ::1:80
Please share your workflow
Here’s a quick overview of my workflow:
Query BigQuery using the native BigQuery node to fetch user table data.
Use a set node to concatenate first name, last name, and split email.
Another set node to concatenate full name with company name.
Route items based on account language (French or English).
Input data into a Google Sheet.
Wait for 10 minutes (an external script completes the sheet with additional data).
Fetch the updated data from Google Sheet.
Remove duplicates.
Set up to retrieve specific data (LinkedIn URLs, job titles, headlines).
Merge this data with the second set of data ensuring the fetched data matches the correct IDs and other key fields from the query.
A custom script node to create SQL Update queries.
Attempt to send these updates to BigQuery via an HTTP Request node.
@David_Lopes , it doesn’t look like you are utilizing the API endpoint correctly. Judging by the URL in the node you are using jobs.insert API which meant for updating jobs meta-data only. This endpoint accepts POST data corresponding to Job object. However, the object structure you submit does not seem to correspond to the expected format.
Is it the correct endpoint in the first place? Did you mean to update some table records instead? Unfortunately, I’m not familiar with BigQuery API to provide a definitive solution. The documentation though is here.
I discovered the solution to my issue: the URL endpoint I’m using is correct. The key was to create body content in raw format with a JSON content type and implement a function containing my specific query before making the HTTP request.
This approach is effective, though occasionally I encounter empty responses, which account for less than 5% of the total data retrieved.
I plan to investigate this minor issue further at a later time, but for now, it’s a significant progress