Mautic node search struggles

Describe the issue/error/question

I am trying to search all the contacts in mautic to see if a record exists before I create a new record. I have the Mautic Node is connected via Oauth2. Contacts, get all, return all. I am using the search option with expression

{
"csa_no": "{{$json["Paddler 1 CSA"]}}"
}

csa_no is a mautic custom field and I have made sure there is a record in Mautic that is has the Paddler 1 CSA / csa_no field populated with the results of the data query. But the search returns no data.

Am I searching Mautic correctly? I have tried to search via email as well for a known email with the same no data result.

Please share the workflow

Share the output returned by the last node

No data

Information on your n8n setup

  • n8n version: 1.0
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via : desktop app

the custom field is type?

Try it like this: csa_no:valueyouarelookingfor. Do not use an expression. Also, if you want to do multiple conditions using spaces. For example: csa_no:123 active:true

Thanks @RicardoE105 and thanks for all your work bringing Mautic into n8n. Appreciated.

The mautic custom field is a number.

That worked. I added in the

csa_no:{{$json["Paddler 1 CSA"]}}

and that search was successful.

Great that t worked. Have fun.

But…

There are 10 items being fed into the mautic node but the search only happens for item 1.

How can I search for all 10 items? That would 10 different csa_no’s

For me, it executes for many inputs it has. Can you share the whole workflow?

yes, I see that, but it’s returning them as a single item I think and so I was not seeing them. I think I need to split them into items to be able to keep working with the data? Busy struggling with that step. I am learning 1 node and 1 set at a time.

Workflow is incomplete but here is as far as I have gotten.

Hi @RicardoE105

Is it possible to use the Mautic get all function to retrieve all the contacts in a segment? If so how, what would the search syntax be?

Alternatively search for all contacts with a particular tag.

Have not tested it but you can use the filters below in the search field.

is:anonymous
is:unowned
is:mine
email:*
segment:{segment_alias}
name:*
company:*
owner:*
ip:*
ids:ID1,ID2 (comma separated IDs, no spaces)
common:{segment_alias} + {segment_alias} + ...
tag:*
stage:*
email_sent:EMAIL_ID
email_read:EMAIL_ID
email_queued:EMAIL_ID
email_pending:EMAIL_ID

Success! thanks again.