Hi,
I can’t understand why I have the error “ERROR: Google Drive error response [400]: The emailAddress field is required for permissions of type ‘user’ or ‘group’.” when I try to share a file with Google Drive.
In fact, if I write my email adress myself, it works fine but I can’t pass this email through a webhook called by an HTTP Request
Here is my code:
{
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
180,
100
],
“disabled”: true
},
{
“parameters”: {
“operation”: “delete”,
“sheetId”: “”,
“toDelete”: {
“columns”: ,
“rows”: [
{
“sheetId”: 0,
“startIndex”: 1,
“amount”: 100
}
]
}
},
“name”: “Google Sheets”,
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 1,
“position”: [
540,
300
],
“credentials”: {
“googleApi”: “n8n”
}
},
{
“parameters”: {
“operation”: “executeQuery”,
“query”: “SELECT *\nFROM multisources”
},
“name”: “MySQL”,
“type”: “n8n-nodes-base.mySql”,
“typeVersion”: 1,
“position”: [
760,
300
],
“credentials”: {
“mySql”: “Demo”
}
},
{
“parameters”: {
“operation”: “append”,
“sheetId”: “={{$node["Google Sheets"].parameter["sheetId"]}}”,
“options”: {}
},
“name”: “Google Sheets1”,
“type”: “n8n-nodes-base.googleSheets”,
“typeVersion”: 1,
“position”: [
950,
300
],
“credentials”: {
“googleApi”: “n8n”
}
},
{
“parameters”: {
“operation”: “share”,
“fileId”: “={{$node["Google Sheets1"].parameter["sheetId"]}}”,
“permissionsUi”: {
“permissionsValues”: {
“role”: “writer”,
“type”: “user”,
“emailAddress”: “={{$node["Webhook"].json["query"]["emailAddress"]}}”
}
},
“options”: {
“sendNotificationEmail”: false,
“transferOwnership”: false
}
},
“name”: “Google Drive1”,
“type”: “n8n-nodes-base.googleDrive”,
“typeVersion”: 1,
“position”: [
1120,
300
],
“credentials”: {
“googleApi”: “n8n”
}
},
{
“parameters”: {
“path”: “1fed946a-d286-4059-a0c3-a2a077d283e3”,
“options”: {}
},
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
110,
300
],
“webhookId”: “1fed946a-d286-4059-a0c3-a2a077d283e3”
}
],
“connections”: {
“Google Sheets”: {
“main”: [
[
{
“node”: “MySQL”,
“type”: “main”,
“index”: 0
}
]
]
},
“MySQL”: {
“main”: [
[
{
“node”: “Google Sheets1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Sheets1”: {
“main”: [
[
{
“node”: “Google Drive1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Webhook”: {
“main”: [
[
{
“node”: “Google Sheets”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}
And my HTTP request
{
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
250,
300
]
},
{
“parameters”: {
“url”: “”,
“options”: {},
“queryParametersUi”: {
“parameter”: [
{
“name”: “Email”,
“value”: “”
}
]
}
},
“name”: “HTTP Request”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 1,
“position”: [
430,
300
]
}
],
“connections”: {
“Start”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}