n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
45.7k stars 6.36k forks source link

Excel 365 Node Query option $select error with filter parameter #7415

Open jkirkpatrick opened 11 months ago

jkirkpatrick commented 11 months ago

Describe the bug Query option '$select' was specified more than once, but it must be specified at most once.

To Reproduce Steps to reproduce the behavior:

In the Excel 365 node...

  1. Resource: Workbook
  2. Operation: Get Many
  3. Return All: true / on / enabled
  4. Fields: id

Expected behavior Return a list of workbook ids

Environment (please complete the following information):

Additional context This workflow works fine with previous version 1.6 - error occurs when upgrading to 1.9.1

Stack Error

NodeApiError: Bad request - please check your parameters
    at Object.microsoftApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Excel/v2/transport/index.js:23:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.microsoftApiRequestAllItems (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Excel/v2/transport/index.js:33:24)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Excel/v2/actions/workbook/getAll.operation.js:66:32)
    at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/Excel/v2/actions/router.js:45:26)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:19)
jkirkpatrick commented 11 months ago

Note that Setting Return All to off/false/disabled and removing the Filter works properly

jkirkpatrick commented 11 months ago

Narrowed down the issue - it only occurs when the Filter parameter is enabled; does not matter if there is one field (id) or a comma-delim list of fields (id, parentReference, name, webUrl)

Joffcom commented 11 months ago

Hey @jkirkpatrick,

Thanks for the report, I have just tried to follow your instructions to reproduce this and I have not been able to.

image

I have also tried with multiple items with no luck.

image

Out of interest how many sheets do you have available, Is it over 100? I think this could be a pagination issue.

jkirkpatrick commented 11 months ago

Yes, over 100 sheets - but under 10000.

Joffcom commented 11 months ago

Hey @jkirkpatrick,

Perfect in that case this will be the Pagination issue, I will add this to the internal ticket we have for this with another Microsoft 365 node.