Unable to connect to google

i am new to n8n and am having problem connecting my google consol to n8n , when i try and connet to google concol it gives me this screen,i have alredy put the orath and secret but still not but still get this

{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
0,
0
],
“id”: “86c492b6-053d-49d1-a613-8f8011c0ce24”,
“name”: “When clicking ‘Execute workflow’”
},
{
“parameters”: {
“documentId”: {
“__rl”: true,
“mode”: “list”,
“value”: “”
},
“sheetName”: {
“__rl”: true,
“mode”: “list”,
“value”: “”
}
},
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 4.6,
“position”: [
220,
0
],
“id”: “da4e0e48-d7fc-47ba-9525-32c121b8c590”,
“name”: “Get row(s) in sheet”,
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “iRdonwyCfjNGlknk”,
“name”: “Google Sheets account”
}
}
},
{
“parameters”: {
“resource”: “agent”,
“requestOptions”: {}
},
“type”: “n8n-nodes-aiscraper.aiScraper”,
“typeVersion”: 1,
“position”: [
440,
0
],
“id”: “b2115cf8-0615-4aff-a478-28238cac6899”,
“name”: “Scrape with agent”
},
{
“parameters”: {
“operation”: “update”,
“documentId”: {
“__rl”: true,
“mode”: “list”,
“value”: “”
},
“sheetName”: {
“__rl”: true,
“mode”: “list”,
“value”: “”
}
},
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 4.6,
“position”: [
660,
0
],
“id”: “a3c2103a-6505-4b5c-a6a5-794b86f66cce”,
“name”: “Update row in sheet”,
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “iRdonwyCfjNGlknk”,
“name”: “Google Sheets account”
}
}
}
],
“connections”: {
“When clicking ‘Execute workflow’”: {
“main”: [
[
{
“node”: “Get row(s) in sheet”,
“type”: “main”,
“index”: 0
}
]
]
},
“Get row(s) in sheet”: {
“main”: [
[
{
“node”: “Scrape with agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Scrape with agent”: {
“main”: [
[
{
“node”: “Update row in sheet”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “41e2dd7f3e143fb502db6be631aeb4b14a185126abc6b37324a7747587b33b19”
}
}
``
i am using this workflow to get things conected

Information on your n8n setup

n8n version is 1.99.1
Running n8n via Docker
windows 11

Your problem comes likely from using localhost for redirect url. You can’t, google cannot redirect to localhost. Google needs to redirect back to your n8n instance. For this you need to specify WEBHOOK_URL for your n8n instance.

If using docker compose:

i am running n8n on a windows laptop and dont understand what a webhook is can you pls explain

A webhook url here is URL that Google needs to call to reach your instance during the OAuth process. If you need to get a public IP with HTTPs to provide to Google for the redurect url, you can use NGROK for that:

i did as the video said and have set up ngrok and made new n8n contaner, but when i add the redirect link in the google consol redirect address it give me an error “Invalid Redirect: must contain a domain.“ here is the redirect link

I just tried your url in my console and it worked without any issues:

https://pig-saved-wolf.ngrok-free.app/rest/oauth2-credential/callback

I guess you found your mistake - a missing slash symbol after the schema.

yes i did and thanks for the help

You are very welcome. If that answer is correct, please also mark it as Solution just for the sake of completeness. Thanks you.

Cheers!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.