Hi all,
i’m able to append data to an existing sheet but
I don’t understand how to create a google sheet and add some row.
I use google create for the spreadsheet, it’s OK
retrieve data from postgres, it’s ok
but how to create column header key to append data in this new spreadsheet ??
I miss something somewhere ?
Thanks
{
"nodes": [
{
"parameters": {
"authentication": "oAuth2",
"resource": "spreadsheet",
"title": "testn8n",
"sheetsUi": {
"sheetValues": [
{
"propertiesUi": {
"title": "feuillfeuill"
}
}
]
},
"options": {}
},
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
300,
300
],
"credentials": {
"googleSheetsOAuth2Api": "n8n project"
}
},
{
"parameters": {
"authentication": "oAuth2",
"operation": "append",
"sheetId": "={{$node[\"Google Sheets\"].json[\"spreadsheetId\"]}}",
"options": {
"valueInputMode": "RAW"
}
},
"name": "Google Sheets1",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
720,
300
],
"credentials": {
"googleSheetsOAuth2Api": "n8n project"
}
},
{
"parameters": {
"operation": "executeQuery",
"query": "select id, filter_name, user_email\nfrom product_user_filter"
},
"name": "Postgres",
"type": "n8n-nodes-base.postgres",
"typeVersion": 1,
"position": [
510,
300
],
"credentials": {
"postgres": "postgres"
}
}
],
"connections": {
"Google Sheets": {
"main": [
[
{
"node": "Postgres",
"type": "main",
"index": 0
}
]
]
},
"Postgres": {
"main": [
[
{
"node": "Google Sheets1",
"type": "main",
"index": 0
}
]
]
}
}
}