This integration uses curl to call a workflow in n8n to validate a patient E-Mail using the neutrino API (https://www.neutrinoapi.com/). The result will be returned as POPUP.
Requirements
Open Dental API with Comm permissions for POPUP), tested with Version 24.1.46.0
Curl (Included in Windows 10/11)
n8n, tested with Version 1.50.1
n8n Neutrino API costum node, tested with Version 0.9.1 (https://community.n8n.io/t/custom-node- ... -api/39715)
Neutrino API subscription (free for testing/low volume)
Open Dental EMail Verify V1.0
Code: Select all
{
"meta": {
"instanceId": "c5bbe0e4dd0c2a71ee01ba0477f0fe876e4ef1ddb06022d07739fda528d4f9f1"
},
"nodes": [
{
"parameters": {},
"id": "299f6648-9949-45fd-bfb3-66144eed83d6",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-20,
400
]
},
{
"parameters": {
"values": {
"string": [
{
"name": "OD_API_IP_Port",
"value": "192.168.1.60:30223"
},
{
"name": "Workflow Version",
"value": "0.1"
},
{
"name": "PatNum",
"value": "={{ $json.query.PatNum }}"
}
]
},
"options": {
"dotNotation": true
}
},
"id": "93c29b55-428e-4c37-bb8b-feb80310853c",
"name": "Config",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
320,
220
]
},
{
"parameters": {
"jsCode": "return [{json:{\n\t\"headers\": {\n\t\t\"host\": \"192.168.1.60:5679\",\n\t\t\"user-agent\": \"curl/7.86.0\",\n\t\t\"accept\": \"*/*\"\n\t},\n\t\"params\": {\n\t},\n\t\"query\": {\n\t\t\"PatNum\": \"11\"\n\t},\n\t\t\"body\": {\n\t}\n }\n}]\n"
},
"id": "b4646cc2-779f-4782-8df9-31828f03c70f",
"name": "Test Data",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
160,
400
]
},
{
"parameters": {
"resource": "security_networking",
"operation": "email_verify",
"email": "={{ $json.Email }}"
},
"id": "d359bde6-695b-4991-9452-d674fb7c0834",
"name": "Neutrino Api",
"type": "n8n-nodes-neutrino.neutrino",
"typeVersion": 1,
"position": [
920,
220
],
"credentials": {
"neutrino": {
"id": "icB7bbrZjpZjowRv",
"name": "Neutrino account"
}
}
},
{
"parameters": {
"authentication": "headerAuth",
"url": "=http://{{$node[\"Config\"].json[\"OD_API_IP_Port\"]}}/api/v1/patients/{{ $json.query.PatNum }}",
"options": {
"splitIntoItems": false
}
},
"name": "OD Get E-Mail by ID",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
520,
220
],
"alwaysOutputData": false,
"id": "dc22237a-bd93-4877-bc59-2e2b610224b6",
"credentials": {
"httpHeaderAuth": {
"id": "c8ZCHq07tFc7C8sw",
"name": "Header Auth account KL Office"
}
}
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"id": "30c1d814-d12b-48bc-b058-b9a04aa8bedd",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 3,
"position": [
1160,
240
]
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"id": "5116c630-e076-46d1-a92d-ad185a0cc42d",
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"typeVersion": 3,
"position": [
700,
440
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "b94f36f2-511f-4e8a-b718-452e9fe2420f",
"leftValue": "={{ $json[\"typos-fixed\"] }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
},
{
"id": "ccc4b8da-7a86-4276-8213-82833eac5848",
"leftValue": "={{ $json.valid }}",
"rightValue": false,
"operator": {
"type": "boolean",
"operation": "equals"
}
},
{
"id": "9a7e70e6-31d5-4c4b-9777-d21ceda94998",
"leftValue": "={{ $json['smtp-status'] }}",
"rightValue": "ok",
"operator": {
"type": "string",
"operation": "notEquals"
}
}
],
"combinator": "or"
},
"options": {}
},
"id": "2051f001-70d3-46c1-9481-a652e317fcd1",
"name": "If",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
1340,
240
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "EmailVerify",
"responseMode": "lastNode",
"options": {}
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-20,
220
],
"webhookId": "db437850-0e90-4eb7-b383-f8438ea1bd66",
"typeVersion": 1,
"id": "c0f821d6-695c-4d8d-b9c5-eaec83e89b9f",
"notes": "Setup Program Link in Opendental to trigger.\n\nPath of File to open:\ncurl.exe\n\nOptional command line arguments:\n-X POST http://[n8n-ip]:5678/webhook/EmailAptConfirmation?PatNum=[PatNum]\n"
},
{
"parameters": {
"authentication": "headerAuth",
"requestMethod": "POST",
"url": "=http://{{$node[\"Config\"].json[\"OD_API_IP_Port\"]}}/api/v1/popups",
"options": {
"splitIntoItems": false
},
"bodyParametersUi": {
"parameter": [
{
"name": "PatNum",
"value": "={{ $json[\"PatNum\"]}}"
},
{
"name": "Description",
"value": "=E-Mail Verifation SUCCESS: {{ $json.InputEmail }}"
},
{
"name": "PopupLevel",
"value": "Patient"
}
]
}
},
"name": "OD Post Success",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1560,
340
],
"alwaysOutputData": false,
"id": "ad27c7bf-43f9-4201-8b3c-f5e605de142b",
"credentials": {
"httpHeaderAuth": {
"id": "c8ZCHq07tFc7C8sw",
"name": "Header Auth account KL Office"
}
}
},
{
"parameters": {
"authentication": "headerAuth",
"requestMethod": "POST",
"url": "=http://{{$node[\"Config\"].json[\"OD_API_IP_Port\"]}}/api/v1/popups",
"options": {
"splitIntoItems": false
},
"bodyParametersUi": {
"parameter": [
{
"name": "PatNum",
"value": "={{ $json[\"PatNum\"]}}"
},
{
"name": "Description",
"value": "=CHECK E-Mail\n\nOriginal E-Mail: {{ $json.InputEmail }}\nCorrected E-Mail: {{ $json[\"email\"]}}\nvalid: {{ $json[\"valid\"]}}\ntypos-fixed: {{ $json[\"typos-fixed\"]}} \nis-freemail: {{ $json[\"is-freemail\"] }}\nis-disposable: {{ $json[\"is-disposable\"] }}\nis-deliverable: {{ $json[\"smtp-status\"]}}"
},
{
"name": "PopupLevel",
"value": "Patient"
}
]
}
},
"name": "OD Post Fail",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1560,
140
],
"alwaysOutputData": false,
"id": "6acf5e84-04cb-494c-bff8-dcaa29891d11",
"credentials": {
"httpHeaderAuth": {
"id": "c8ZCHq07tFc7C8sw",
"name": "Header Auth account KL Office"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "2f0cff5f-e7b4-44f5-a616-5f60b9b70fa0",
"name": "InputEmail",
"value": "={{ $json.Email }}",
"type": "string"
},
{
"id": "511eac1e-9800-4290-8f67-61049153703b",
"name": "PatNum",
"value": "={{ $json.PatNum }}",
"type": "string"
}
]
},
"options": {}
},
"id": "2ee9fe70-fb49-41b6-ab6e-782cd0d9e701",
"name": "Rename E-Mail to InputEMail, Save PatNum",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
920,
440
]
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Test Data",
"type": "main",
"index": 0
}
]
]
},
"Config": {
"main": [
[
{
"node": "OD Get E-Mail by ID",
"type": "main",
"index": 0
},
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Test Data": {
"main": [
[
{
"node": "Config",
"type": "main",
"index": 0
}
]
]
},
"Neutrino Api": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"OD Get E-Mail by ID": {
"main": [
[
{
"node": "Neutrino Api",
"type": "main",
"index": 0
},
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Merge1": {
"main": [
[
{
"node": "Rename E-Mail to InputEMail, Save PatNum",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "OD Post Fail",
"type": "main",
"index": 0
}
],
[
{
"node": "OD Post Success",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Config",
"type": "main",
"index": 0
}
]
]
},
"Rename E-Mail to InputEMail, Save PatNum": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
}
},
"pinData": {}
}
Joerg