NodeApiError: Your request is invalid or could not be processed by the service

Perhaps you can share screenshots of the errors you are seeing? That would make it a lot easier to understand their context.

As for the HTTP Request, perhaps you can try running the workflow below and confirm if this returns any errors (and if so, which)?

As for the basic auth credentials, the username would be your Onfleet API key and the password is blank (an empty string).

{“status”:“rejected”,“reason”:{“message”:“409 - {"code":"InvalidArgument","message":{"error":1900,"message":"One or more parameters required for this request are either missing or have an invalid format.","cause":"Team IDs array missing","request":"eef4ae97-3a86-43e0-933b-ac639e0fae1d","remoteAddress":"20.218.202.73"}}”,“name”:“Error”,“stack”:“Error: Request failed with status code 409\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”}}

I’m not certain I set up the node properly. my parameters looked a bit different than yours



You can just copy the workflow from the forum into n8n (pretty much like you did before, just the other way around). Simply select all nodes from my example, press Ctrl+C and then switch over to your n8n canvas and press Ctrl+V to paste it. It might be best to do this with a blank workflow open.

The example I have provided contains the teams field, so for testing this you’d only need to update the Set node with real values and configure your credentials.

This looks like you’re pretty close to my example but you’d need to use expressions instead of fixed values to actually read the data coming in from the previous node (and obviously a Set node actually setting some testing data which the expressions can the read).

This looks like you’re not setting a Team_ID value in the data passed on to your HTTP Request node. Are you sure you have copied the whole workflow I have shared, including the Set node? This would result in the team id being set like so:

This is the full workflow:

Also keep in mind that I might be using a newer version of n8n than you are (the screenshot from your expression editor would suggest you are using an older version which might not be able to use all features of the HTTP Request node I have shared), as you never confirmed the n8n version you have in use. I am currently using the latest released version of [email protected].

I just updated the teamID and the array pulled properly … I think it ran properly too because it spit out an error: “duplicateKey” , which is because I’ve already added this worker. Im going to try adding a different user to see if the workflow works properly

1 Like

Awesome, that’s great news so far! I’ll be offline shortly, but will check back on this thread tomorrow.

1 Like

booyaa! the automation just ran properly in a test environment with an entirely new teamID. thanks for all the support today :slight_smile:

1 Like

Sweet, glad to hear that! Thanks so much for confirming :slight_smile:

Also realized that you are using the generic http request for this API, there’s actually an official Onfleet node :slightly_smiling_face:

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