Data not available after merge

I’m on n8n cloud on the latest version. Here’s my full workflow. I’m basically checking based on email and a string passed in if a contact and account exist in salesforce. Whether they do or don’t it pushes through the flow and ends up in the Merge Account Contact node.

That data looks like this:

 [
  {
    "accountId": "0016e00003YnWB2AAN"
  },
  {
    "contactId": "0036e00004UpLTNAA3"
  }
]

The net result is that when I try my final salesforce node to assign the account to the contact, the contact data isn’t available with the structure I expected:

I’ve tried lots of things in there (like:
{{ $('Merge Account Contact').item[0].json.accountId }}) and nothing seems to work.

I’m not sure what the issue is or if I’ve not set up my workflow to pull the data together correctly. Maybe there’s a better way to structure the flow and I have too many merges going on.

Any advice is appreciated.

Thanks,
JMR

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Maybe a broader question about n8n is why my workflow doesn’t complete the “Contact Id” before moving onto the nodes that try to use but the “Account Id” and “Contact Id” I assumed this was possible, but I also tried putting the merge in (see original post).

And even this is undefined…I’m highly confused.

I think I sorted this out…the general problem was that if I search for an account or contact on Salesforce, it would return the ID as id. When I created an account or contact, it would return with the ID as Id. So depending on the combination of new/existing account and new/existing contact, the filters and merges I had wouldn’t work correctly.

1 Like

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