{
  "id": "uSJ9r9d6T4QifJnC",
  "meta": {
    "templateId": "12601",
    "templateCredsSetupCompleted": true
  },
  "name": "Vet new Form.io leads with ZeroBounce and sync qualified contacts to Pipedrive",
  "tags": [],
  "nodes": [
    {
      "id": "11256547-02c1-4214-a855-6fd3f6b9deb5",
      "name": "Validate email",
      "type": "@zerobounce/n8n-nodes-zerobounce.zeroBounce",
      "position": [
        1536,
        880
      ],
      "parameters": {
        "email": "={{ $('Form.io Trigger').item.json.email }}",
        "addOptions": {
          "timeout": 10
        }
      },
      "credentials": {
        "zeroBounceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e7d4fc54-fa39-4933-947e-c119d837b300",
      "name": "Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1760,
        864
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Valid",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "468015f8-26f2-4e72-be62-cb7a801b1e5d",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "valid"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Catch-all",
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ee6eb4c7-2d0e-4645-9454-5d63d863d355",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.status }}",
                    "rightValue": "catch-all"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Other"
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "18a314b9-40f9-4152-b72f-60c347844d5a",
      "name": "Has email?",
      "type": "n8n-nodes-base.if",
      "position": [
        1088,
        1168
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7287ef71-fd0e-4283-a029-d56939120766",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.email }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "d5ad7bb1-e25e-46cc-8d62-6c8c30e89bed",
      "name": "Filter by score",
      "type": "n8n-nodes-base.switch",
      "position": [
        2432,
        672
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "high",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "47aa6c56-2c5a-41ac-8f5c-5b7f183d898b",
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.score }}",
                    "rightValue": 9
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "medium",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "b1bdb574-a04c-4086-86a3-899e53ccda07",
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.score }}",
                    "rightValue": 3
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "low",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "5c624f71-1acc-4ce8-92d3-821fe2d4f83b",
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "leftValue": "={{ $json.score }}",
                    "rightValue": 3
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": 2
        },
        "looseTypeValidation": true
      },
      "typeVersion": 3.3
    },
    {
      "id": "7231efa6-5b5f-40e6-9055-db00c6f44a56",
      "name": "Score email",
      "type": "@zerobounce/n8n-nodes-zerobounce.zeroBounce",
      "position": [
        2208,
        688
      ],
      "parameters": {
        "email": "={{ $('Form.io Trigger').item.json.email }}",
        "resource": "scoring"
      },
      "credentials": {
        "zeroBounceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "846b980e-491f-4e61-ab3d-9cc64ce8d803",
      "name": "Not valid",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        1264
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Not valid"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e8d7a287-9ea7-472d-915a-c5a0cb929d53",
      "name": "Not enough credits for scoring",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        1072
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Not enough credits for scoring"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "31e50d8a-4737-4374-bb3a-7d0322a93b58",
      "name": "Not enough credits for validation",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        1456
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Not enough credits for validation"
            },
            {
              "id": "f4a379fb-7d3e-465d-b5f1-c618731e9dfe",
              "name": "email_override",
              "type": "string",
              "value": "={{ $('Form.io Trigger').item.json.email }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7b7f1507-4e98-435c-adc7-f5d6afa9b32d",
      "name": "Email missing",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        1648
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Email missing"
            },
            {
              "id": "6314c6a3-d17a-444c-b0b6-d813c300d392",
              "name": "email_override",
              "type": "string",
              "value": "={{ $('Form.io Trigger').item.json.name }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e15c5cf9-2f01-423a-842a-25440f59d641",
      "name": "Check credits for validation",
      "type": "@zerobounce/n8n-nodes-zerobounce.zeroBounce",
      "onError": "continueErrorOutput",
      "position": [
        1312,
        1072
      ],
      "parameters": {
        "resource": "account",
        "addOptions": {
          "creditsRequired": 1
        }
      },
      "credentials": {
        "zeroBounceApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "7e5f42ca-197a-4ae5-bb19-cfcb1442cd56",
      "name": "Check credits for scoring",
      "type": "@zerobounce/n8n-nodes-zerobounce.zeroBounce",
      "onError": "continueErrorOutput",
      "position": [
        1984,
        880
      ],
      "parameters": {
        "resource": "account",
        "addOptions": {
          "creditsRequired": 1
        }
      },
      "credentials": {
        "zeroBounceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cb5a122d-4c28-4c06-8a89-7878e4463970",
      "name": "Medium score",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        688
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Medium score"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c6063dc5-5db3-4f21-be4f-e19232e15194",
      "name": "Low score",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Low score"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6f302b51-85af-4245-8c1d-c1faa289110b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        240
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "content": "## Form.io to Pipedrive: Advanced ZeroBounce Lead Vetting\n\n**This workflow automates the transition of new Form.io submissions into Pipedrive, using [ZeroBounce](https://www.zerobounce.net) for multi-layer validation (Validation + AI Scoring).**\n\n**Results are also output to Google Sheets for review.**"
      },
      "typeVersion": 1
    },
    {
      "id": "509463b3-e835-442f-aff0-c03ebd651394",
      "name": "Add to Accepted",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2880,
        400
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $('Form.io Trigger').item.json.name }}",
            "Email": "={{ $('Form.io Trigger').item.json.email }}",
            "ZB Score": "={{ $node[\"Score email\"] ? $('Score email').item.json.score : \"\" }}",
            "ZB Domain": "={{ $('Validate email').item.json.domain }}",
            "ZB Status": "={{ $('Validate email').item.json.status }}",
            "ZB Account": "={{ $('Validate email').item.json.account }}",
            "Accepted At": "={{ $now }}",
            "ZB MX Found": "={{ $('Validate email').item.json.mx_found }}",
            "ZB MX Record": "={{ $('Validate email').item.json.mx_record }}",
            "ZB Free Email": "={{ $('Validate email').item.json.free_email }}",
            "ZB Sub Status": "={{ $('Validate email').item.json.sub_status }}",
            "Accepted Reason": "={{ $json.reason }}",
            "ZB Did You Mean": "={{ $('Validate email').item.json.did_you_mean }}",
            "ZB SMTP Provider": "={{ $('Validate email').item.json.smtp_provider }}",
            "ZB Domain Age Days": "={{ $('Validate email').item.json.domain_age_days }}"
          },
          "schema": [
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Accepted At",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Accepted At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Accepted Reason",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Accepted Reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Sub Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB Sub Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Free Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB Free Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Did You Mean",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB Did You Mean",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Account",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Account",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Domain",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Domain Age Days",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB Domain Age Days",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB SMTP Provider",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB SMTP Provider",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB MX Found",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB MX Found",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB MX Record",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB MX Record",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ZB Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 490801678,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ/edit#gid=490801678",
          "cachedResultName": "Accepted"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ/edit?usp=drivesdk",
          "cachedResultName": "ZeroBounce Form.io Pipedrive"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "b00bf525-0738-4f05-a8c3-dc08635ebc10",
      "name": "Add to Rejected",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2880,
        992
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $('Form.io Trigger').item.json.name }}",
            "Email": "={{ $('Form.io Trigger').item.json.email }}",
            "ZB Score": "={{ $node[\"Score email\"] ? $('Score email').item.json.score : \"\" }}",
            "ZB Domain": "={{ $('Validate email').item.json.domain }}",
            "ZB Status": "={{ $('Validate email').item.json.status }}",
            "ZB Account": "={{ $('Validate email').item.json.account }}",
            "Rejected At": "={{ $now }}",
            "ZB MX Found": "={{ $('Validate email').item.json.mx_found }}",
            "ZB MX Record": "={{ $('Validate email').item.json.mx_record }}",
            "Reject Reason": "={{ $json.reason }}",
            "ZB Free Email": "={{ $('Validate email').item.json.free_email }}",
            "ZB Sub Status": "={{ $('Validate email').item.json.sub_status }}",
            "ZB Did You Mean": "={{ $node[\"Validate email\"] ? $('Validate email').item.json.did_you_mean : \"\" }}",
            "ZB SMTP Provider": "={{ $('Validate email').item.json.smtp_provider }}",
            "ZB Domain Age Days": "={{ $('Validate email').item.json.domain_age_days }}"
          },
          "schema": [
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Rejected At",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Rejected At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reject Reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reject Reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Sub Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Sub Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Free Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Free Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Did You Mean",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Did You Mean",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Account",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Account",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Domain",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Domain Age Days",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Domain Age Days",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB SMTP Provider",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB SMTP Provider",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB MX Found",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB MX Found",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB MX Record",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB MX Record",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ZB Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ/edit#gid=0",
          "cachedResultName": "Rejected"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ/edit?usp=drivesdk",
          "cachedResultName": "ZeroBounce Form.io Pipedrive"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a5bae3f5-aec2-444c-ab78-68d27589d38e",
      "name": "High score",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        496
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "High score"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "18c9012d-8336-44e3-beae-904598415279",
      "name": "Valid",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        304
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "760f0ae8-a358-4875-9607-37f2d827bafe",
              "name": "reason",
              "type": "string",
              "value": "Valid"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "03f598ee-596e-401a-9534-6cc14dde9a90",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        1120
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 208,
        "content": "## \u26a1 Trigger & Verification"
      },
      "typeVersion": 1
    },
    {
      "id": "65cdd0da-e64f-43db-b75e-d1e09f36f4f1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        784
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 448,
        "content": "## \u2714\ufe0f Stage 1: Email Validation"
      },
      "typeVersion": 1
    },
    {
      "id": "b4698a90-6ebb-4479-beab-3795149b9576",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        608
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 432,
        "content": "## \ud83c\udfaf Stage 2: AI Email Scoring"
      },
      "typeVersion": 1
    },
    {
      "id": "efeb85cb-ccee-4dea-b810-c5ffa29873c2",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2608,
        240
      ],
      "parameters": {
        "color": 7,
        "width": 656,
        "height": 1568,
        "content": "## \ud83d\udce4 Output Results\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fe74a7ea-2bd0-4ff1-b5ff-b0592d348d75",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        240
      ],
      "parameters": {
        "color": 7,
        "width": 518,
        "height": 288,
        "content": "![ZeroBounce Logo](https://raw.githubusercontent.com/zerobounce/n8n-nodes-zerobounce/main/icons/zb-logo-purple.svg)"
      },
      "typeVersion": 1
    },
    {
      "id": "44049448-5159-4956-9ad5-a96913e06678",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        1376
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 432,
        "content": "### \ud83d\udccb Setup Requirements\n- **Form.io:** Connect via credentials to receive \"Form Submission\" events.\n- **ZeroBounce:** Connect via API Key. *[Create one here](https://www.zerobounce.net/members/API)*.\n- **Pipedrive:** Connect via API Key to create/update people for high-quality leads.\n- **Google Sheets:** Connect via OAuth2 to append/update rows in a Google Sheets worksheet. Alternatively, swap these nodes out with any other data storage node e.g. **n8n Data Table** or **Microsoft Excel**. The sheets/tables can be created with the headers:\n    - *Accepted* columns:\n`Email,Name,Accepted At,Accepted Reason,ZB Status,ZB Sub Status,ZB Free Email,ZB Did You Mean,ZB Account,ZB Domain,ZB Domain Age Days,ZB SMTP Provider,ZB MX Found,ZB MX Record,ZB Score`\n    - *Rejected* columns\n`Email,Name,Rejected At,Rejected Reason,ZB Status,ZB Sub Status,ZB Free Email,ZB Did You Mean,ZB Account,ZB Domain,ZB Domain Age Days,ZB SMTP Provider,ZB MX Found,ZB MX Record,ZB Score`"
      },
      "typeVersion": 1
    },
    {
      "id": "e99f8635-eda2-46d3-aee8-dc5e1f619651",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        944
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 128,
        "content": "### \ud83d\udca1 Key Benefits\n- **\u2728 Zero-Waste Sync:** Only \"Valid\" or \"High-Scoring\" leads reach your CRM.\n- **\ud83d\udee1\ufe0f Credit Safety:** Internal checks ensure you never trigger an API call without credits.\n- **\ud83d\udcca Detailed Suppressions:** Every rejected lead is categorized by reason (e.g. Email Missing, Invalid, Low Score, or Insufficient credits)."
      },
      "typeVersion": 1
    },
    {
      "id": "8317c715-9552-419f-a909-588f67d4237e",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        1120
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 208,
        "content": "### \ud83e\udde9 Nodes used in this workflow\n- [ZeroBounce](https://n8n.io/integrations/zerobounce)\n- [Form.io Trigger](https://n8n.io/integrations/formio-trigger)\n- [Pipedrive](https://n8n.io/integrations/pipedrive)\n- [Google Sheets](https://n8n.io/integrations/google-sheets) (or alternative e.g. [Data Table](https://n8n.io/integrations/data-table))"
      },
      "typeVersion": 1
    },
    {
      "id": "bbd7f704-055a-4ebb-a1bf-576e5715f06c",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        448
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 448,
        "content": "### \ud83d\ude80 How it Works\n1. **\u26a1 Trigger & Verification:** Activates on new **Form.io** submissions and first checks if an email address is provided.\n    - **Email present:** Proceeds to credit check and validation\n    - **Email missing:** Customer details are added to *Rejected* output for review with reason `'Email missing'`.\n2. **\ud83d\udcb3 Credit Management:** Before each ZeroBounce call, the workflow checks your account for sufficient credits to prevent node failures. \n    - **Success:** Proceeds to Stage 1 (Validation).\n    - **Failure:** Customer details are added to *Rejected* output for retry with reason `'Not enough credits'`.\n3. **\u2714\ufe0f Stage 1: Email Validation:** Validates the email address with ZeroBounce. \n    - **Valid:** Adds the result to *Accepted* output and creates a person in **Pipedrive**.\n    - **Invalid:** Logs to a **Google Sheet** with the validation results and a reason for rejection for review.\n    - **Catch-all:** Proceeds to Stage 2 (Scoring).\n4.  **\ud83c\udfaf Stage 2: AI Email Scoring:** For \"Catch-all\" emails, the workflow requests **ZeroBounce AI Scoring**.\n    - **High Score (>=9):** Syncs to **Pipedrive**.\n    - **Medium/Low Score:** Suppressed and added to a **Google Sheet** with the assigned score for review.\n5. **\ud83d\udce4 Output Results:**\n    - **Accepted:** Output validation and scoring results to *Accepted* and **Pipedrive**\n    - **Rejected** Output validation and scoring results to *Rejected*."
      },
      "typeVersion": 1
    },
    {
      "id": "9ed17a4d-0f2d-49b3-a7d5-05cdabd04c7e",
      "name": "Add to Rejected not validated",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2880,
        1552
      ],
      "parameters": {
        "columns": {
          "value": {
            "Name": "={{ $('Form.io Trigger').item.json.name }}",
            "Email": "={{ $json.email_override }}",
            "Rejected At": "={{ $now }}",
            "Reject Reason": "={{ $json.reason }}"
          },
          "schema": [
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Rejected At",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Rejected At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Reject Reason",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Reject Reason",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Sub Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Sub Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Free Email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Free Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Did You Mean",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Did You Mean",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Account",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Account",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Domain",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Domain Age Days",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Domain Age Days",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB SMTP Provider",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB SMTP Provider",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB MX Found",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB MX Found",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB MX Record",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB MX Record",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ZB Score",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ZB Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ/edit#gid=0",
          "cachedResultName": "Rejected"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1C-V2jrev3Ep7G532VHIrEbFlBF9rLeVgyhV-SXA4-GQ/edit?usp=drivesdk",
          "cachedResultName": "ZeroBounce Form.io Pipedrive"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a2cdc313-83d7-4a4c-a186-503005e032b4",
      "name": "Form.io Trigger",
      "type": "n8n-nodes-base.formIoTrigger",
      "position": [
        864,
        1168
      ],
      "parameters": {
        "events": [
          "create"
        ],
        "formId": "696513d375f70a96eef5dd2a",
        "projectId": "6965134b4e1fa06a10411955"
      },
      "credentials": {
        "formIoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b0854c33-5ea0-461f-9ead-7575e900b802",
      "name": "Create a person in Pipedrive",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        3104,
        400
      ],
      "parameters": {
        "name": "={{ $('Form.io Trigger').item.json.name }}",
        "resource": "person",
        "additionalFields": {
          "email": [
            "={{ $('Form.io Trigger').item.json.email }}"
          ]
        }
      },
      "credentials": {
        "pipedriveApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "ee96fe14-f05d-4883-820f-8af5068e1036",
  "connections": {
    "Valid": {
      "main": [
        [
          {
            "node": "Add to Accepted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status": {
      "main": [
        [
          {
            "node": "Valid",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check credits for scoring",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Not valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Low score": {
      "main": [
        [
          {
            "node": "Add to Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Not valid": {
      "main": [
        [
          {
            "node": "Add to Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has email?": {
      "main": [
        [
          {
            "node": "Check credits for validation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email missing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High score": {
      "main": [
        [
          {
            "node": "Add to Accepted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score email": {
      "main": [
        [
          {
            "node": "Filter by score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Medium score": {
      "main": [
        [
          {
            "node": "Add to Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email missing": {
      "main": [
        [
          {
            "node": "Add to Rejected not validated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate email": {
      "main": [
        [
          {
            "node": "Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to Accepted": {
      "main": [
        [
          {
            "node": "Create a person in Pipedrive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by score": {
      "main": [
        [
          {
            "node": "High score",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Medium score",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Low score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form.io Trigger": {
      "main": [
        [
          {
            "node": "Has email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check credits for scoring": {
      "main": [
        [
          {
            "node": "Score email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Not enough credits for scoring",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check credits for validation": {
      "main": [
        [
          {
            "node": "Validate email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Not enough credits for validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a person in Pipedrive": {
      "main": [
        []
      ]
    },
    "Not enough credits for scoring": {
      "main": [
        [
          {
            "node": "Add to Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Not enough credits for validation": {
      "main": [
        [
          {
            "node": "Add to Rejected not validated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}