Excel upsert Bad request - please check your parameters

I am trying to use the Microsoft Excel 365 node to append or update into an Excel workbook. When I use the Append operation it adds new records. When I change to using the Append or Update I get a “Bad request - please check your parameters” error message. I am trying to match on an email field from a form. The email field is populated.

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

{
“nodes”: [
{
“parameters”: {
“resource”: “worksheet”,
“operation”: “upsert”,
“workbook”: {
“__rl”: true,
“value”: “01YR5XPQFCTSA55AN2GRGLUGHJ6YG3UEU7”,
“mode”: “list”,
“cachedResultName”: “n8ntest”,
“cachedResultUrl”: “Sign in to your account
},
“worksheet”: {
“__rl”: true,
“value”: “{00000000-0001-0000-0000-000000000000}”,
“mode”: “list”,
“cachedResultName”: “n8n1”,
“cachedResultUrl”: “https://calstewart-my.sharepoint.com/personal/peter_sinclair_calderstewart_co_nz/_layouts/15/Doc.aspx?sourcedoc={DE819CA2-BA81-4C34-BA18-E9F60DBA129F}&file=n8ntest.xlsx&action=default&mobileredirect=true&DefaultItemOpen=1&activeCell=n8n1!A1
},
“columnToMatchOn”: “email”,
“valueToMatchOn”: “={{ $json.email }}”,
“fieldsUi”: {
“values”: [
{
“column”: “First Name”,
“fieldValue”: “={{ $json[‘First Name’] }}”
},
{
“column”: “Last Name”,
“fieldValue”: “={{ $json[‘Last Name’] }}”
},
{
“column”: “Budget”,
“fieldValue”: “={{ $json.Budget }}”
},
{
“column”: “Message”,
“fieldValue”: “={{ $json.Message }}”
},
{
“column”: “Date”,
“fieldValue”: “={{ $json.submittedAt }}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.microsoftExcel”,
“typeVersion”: 2.1,
“position”: [
200,
0
],
“id”: “a10d58da-54e0-4069-9060-656a4b623dc3”,
“name”: “Microsoft Excel 365”,
“credentials”: {
“microsoftExcelOAuth2Api”: {
“id”: “QwfbeAqtEKEsPB0s”,
“name”: “Microsoft Excel account”
}
}
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “15e692d478da56387439a49727c02a9218e8856a6cb084795bb580fea4a4d533”
}
}

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

This error suggests that the amount of data parameters you’re sending into the excel doc is not aligning with the amount of columns you have defined in the excel doc. For example if you have columns in your excel for "name | email | phone" but your sending in "name, email, phone, address", this will break, especially if you have the node configured to Automatically set fields with the “Auto-Map Input Data to Columns”. To get around this either fix your data you send into the node or change the Data Mode option to manually setting the fields

Thanks very much for your response. The issue is when you select the Append or Update you are asked which field to map for the Update process, this mapping field is used to identify which record to update. I am using the email field from my form to map, this email field is then not available in the list of form fields to map to columns in Excel


You will need to have the email field as a column on your excel document. The annoying thing I have noticed with Google sheets and Im sure it works the same on excel, is that if you want to later on add more columns to the document, you’ll have to select auto then back to manual and remap all columns again so that the node can pick up the new column from the excel sheet. Its kinda finiky and you need to make sure your excel docuemnt has all columns you need from the start