Salesforce fields are truncated when adding to Campaign

When trying to add members to a Campaign in Salesforce, the it’s not passing the full ID and truncates the last three digits from the ID on the second line down and stalls the insert.

The list that is created is correct, but when passing to the Salesforce node, it omits the last three digits of the ContactID, therefore causing the entire process to stop.

Error Message

{“message”:“400 - [{“message”:“Attempted to add a campaign member where either the member id ‘0035Y00003zvFAh’ or the campaign id ‘null’ is null.”,“errorCode”:“REQUIRED_FIELD_MISSING”,“fields”:[]},{“message”:“Attempted to add a campaign member where either the member id ‘0035Y00003zvFAh’ or the campaign id ‘null’ is null.”,“errorCode”:“REQU


IRED_FIELD_MISSING”,“fields”:[]}]”,“name”:“Error”,“stack”:“Error: Request failed with status code 400\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:539:35)\n at endReadableNT (node:internal/streams/readable:1345:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”}

Please share the workflow

Share the output returned by the last node

n8n setup

  • 0.183.0
  • Running n8n via Docker

Does it show correctly if you do a console.log()? I’m curious if it errors on the first record or only after that?