I’m trying to use a Mautic search companies node to return companies which dont have a valid email.
The issue I have is with the Mautic’s node, where Im trying to use the search option to only return companies which have no email address populated.
The search field is working, because I can for example put;
companyemail@[email protected] and it will return 1 valid company.
If I put companyemail:%@% it returns all companies who have an email set. Great
What I cant get it to do is return companies with no email set. I have tried’
companyemail:””
companyemail:
companyemail:”null”
companyemail:null
companyemail:!%@%
But nothing works. It always returns either companies with an email, or no results…. I cant get it to return the companies without a companyemail set.
Anyone any ideas? note:using a filter node isnt a viable workaround.
{ “name”: “Pop Mautic With Valid Emails”, “nodes”: [ { “parameters”: {}, “type”: “n8n-nodes-base.manualTrigger”, “typeVersion”: 1, “position”: [ 1152, 784 ], “id”: “db5d6a54-79f9-4008-b66d-71345779e21e”, “name”: “When clicking ‘Execute workflow’” }, { “parameters”: { “fieldToSplitOut”: “Email”, “options”: {} }, “id”: “0d3e9da5-cba8-415a-9c39-739c1576c7d3”, “name”: “Split Out”, “type”: “n8n-nodes-base.splitOut”, “position”: [ 2336, 784 ], “typeVersion”: 1 }, { “parameters”: {}, “id”: “4aeb5128-2133-401c-9bb5-7abbd67ca820”, “name”: “Remove Duplicates”, “type”: “n8n-nodes-base.removeDuplicates”, “position”: [ 2768, 720 ], “retryOnFail”: true, “typeVersion”: 1, “onError”: “continueRegularOutput” }, { “parameters”: { “content”: “\n* Scraping emails from websites using an api”, “height”: 309.99889350400827, “width”: 1764.2311804548722, “color”: 4 }, “id”: “3cf95e32-ab01-48ca-a1c9-3b458a6530d0”, “name”: “Sticky Note”, “type”: “n8n-nodes-base.stickyNote”, “position”: [ 1104, 688 ], “typeVersion”: 1 }, { “parameters”: { “url”: “={{ $json.companywebsite }}”, “options”: {} }, “id”: “6976c947-14a7-499a-bc15-725ae9f4adfd”, “name”: “Get the website data”, “type”: “n8n-nodes-base.httpRequest”, “position”: [ 1808, 784 ], “retryOnFail”: true, “typeVersion”: 4.1, “onError”: “continueRegularOutput” }, { “parameters”: { “assignments”: { “assignments”: [ { “id”: “80a8a8ec-9ac7-4545-beab-390732218548”, “name”: “Email”, “type”: “array”, “value”: “={{$json.data.match(/(?:[A-Za-z0-9._%±]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})/g)}}” } ] }, “options”: {} }, “id”: “8480e9d4-66d7-4e24-b9b3-c4b316e7df46”, “name”: “Extract the emails found”, “type”: “n8n-nodes-base.set”, “position”: [ 2016, 784 ], “typeVersion”: 3.3 }, { “parameters”: { “conditions”: { “options”: { “caseSensitive”: true, “leftValue”: “”, “typeValidation”: “strict”, “version”: 1 }, “conditions”: [ { “id”: “701ead8f-02ba-4689-8054-9e40d9b9f770”, “operator”: { “type”: “string”, “operation”: “notEmpty”, “singleValue”: true }, “leftValue”: “={{ $json.Email }}”, “rightValue”: “” } ], “combinator”: “and” }, “options”: {} }, “id”: “0904ad06-843e-4f0a-90d3-a8d5f6ef5fbc”, “name”: “If contains email”, “type”: “n8n-nodes-base.if”, “position”: [ 2528, 784 ], “typeVersion”: 2 }, { “parameters”: { “resource”: “company”, “operation”: “update”, “companyId”: “={{ $(‘get companies from mautic’).item.json.id }}”, “updateFields”: { “companyEmail”: “={{ $json.Email }}” } }, “type”: “n8n-nodes-base.mautic”, “typeVersion”: 1, “position”: [ 2928, 720 ], “id”: “3c93a9da-e60e-45d3-8696-7755013d00ce”, “name”: “Mautic Update”, “credentials”: { “mauticApi”: { “id”: “p3GNXung0M737tfa”, “name”: “Mautic account” } } }, { “parameters”: { “resource”: “company”, “operation”: “getAll”, “additionalFields”: {} }, “type”: “n8n-nodes-base.mautic”, “typeVersion”: 1, “position”: [ 1376, 784 ], “id”: “8e4fc244-050a-4f54-b279-0ce82e100bc0”, “name”: “get companies from mautic”, “credentials”: { “mauticApi”: { “id”: “p3GNXung0M737tfa”, “name”: “Mautic account” } } } ], “pinData”: {}, “connections”: { “When clicking ‘Execute workflow’”: { “main”: [ [ { “node”: “get companies from mautic”, “type”: “main”, “index”: 0 } ] ] }, “Split Out”: { “main”: [ [ { “node”: “If contains email”, “type”: “main”, “index”: 0 } ] ] }, “If contains email”: { “main”: [ [ { “node”: “Remove Duplicates”, “type”: “main”, “index”: 0 } ] ] }, “Remove Duplicates”: { “main”: [ [ { “node”: “Mautic Update”, “type”: “main”, “index”: 0 } ] ] }, “Get the website data”: { “main”: [ [ { “node”: “Extract the emails found”, “type”: “main”, “index”: 0 } ] ] }, “Extract the emails found”: { “main”: [ [ { “node”: “Split Out”, “type”: “main”, “index”: 0 } ] ] }, “Mautic Update”: { “main”: [ ] }, “get companies from mautic”: { “main”: [ [ { “node”: “Get the website data”, “type”: “main”, “index”: 0 } ] ] } }, “active”: false, “settings”: { “executionOrder”: “v1” }, “versionId”: “f6d179d9-afa9-4b6b-8a0e-782aff1de310”, “meta”: { “templateCredsSetupCompleted”: true, “instanceId”: “74943b140dd4a4ea8488871dc1bdeccbd3ada594d650cb98f9cd46f10c1f9d16” }, “id”: “CHgvEul2PfGKfzhL”, “tags”: }
Describe the problem/error/question
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
