Skip to main content
n8n is a workflow automation platform that connects applications and automates business processes. This guide shows how to integrate DNCScrub APIs into n8n workflows for automated compliance checking.

Prerequisites

  • n8n instance (cloud or self-hosted)
  • DNCScrub account with API access
  • Your DNCScrub API key (loginId)

Setting Up Authentication

DNCScrub APIs authenticate via the loginId header.

Create a Credential

  1. In n8n, go to CredentialsAdd Credential
  2. Select Header Auth
  3. Configure:
    • Name: DNCScrub API
    • Header Name: loginId
    • Header Value: Your DNCScrub API key
n8n Header Auth credential setup

Common Workflow Patterns

Pre-Dial Compliance Check

Scrub phone numbers before dialing to ensure compliance using Salesforce trigger. n8x can work with multiple tools but this example uses Salesforce.
1

Add Trigger

Use a Salesforce Trigger for new leads, a Webhook for real-time requests, or a Schedule Trigger for batch processing.
2

Add HTTP Request Node

Configure the DNCScrub Scrub API call:
  • Method: GET
  • URL: https://www.dncscrub.com/app/main/rpc/scrub
  • Authentication: Select your DNCScrub API credential
  • Query Parameters:
    • phoneList: {{ $json.phone }}
    • projId: YOUR_PROJECT_ID (optional)
3

Add IF Node

Check the scrub result:
  • Condition: {{ $json.results[0].Status }} equals Ok
  • True branch: Proceed to dial
  • False branch: Skip or update CRM
4

Update CRM

Use the Salesforce Node to update the lead status based on scrub results.

Add Contact to Internal DNC

Add to Internal DNC list. when requested by the contact.
HTTP Request Configuration:
━━━━━━━━━━━━━━━━━━━━━━━━━━
Method: GET
URL: https://www.dncscrub.com/app/main/rpc/pdnc

Query Parameters:
  phoneList: {{ $json.phone }}
  action: add
  projId: YOUR_PROJECT_ID

Workflow JSON

You can import this workflow directly into n8n:
{
  "nodes": [
    {
      "name": "Salesforce Trigger",
      "type": "n8n-nodes-base.salesforceTrigger",
      "position": [250, 300]
    },
    {
      "name": "DNCScrub",
      "type": "n8n-nodes-base.httpRequest",
      "position": [450, 300],
      "parameters": {
        "method": "GET",
        "url": "https://www.dncscrub.com/app/main/rpc/scrub",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "phoneList",
              "value": "={{ $json.Phone }}"
            },
            {
              "name": "projId",
              "value": "YOUR_PROJECT_ID"
            }
          ]
        }
      }
    },
    {
      "name": "Check Result",
      "type": "n8n-nodes-base.if",
      "position": [650, 300],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.results[0].Status }}",
              "value2": "Ok"
            }
          ]
        }
      }
    }
  ]
}

Error Handling

Add error handling to your workflows:
  1. Set “Continue On Fail” on HTTP Request nodes to handle API errors gracefully
  2. Add an IF node after each API call to check for success
  3. Log failures to a Google Sheet, database, or notification system

Batch Processing Tips

When processing large lists:
  1. Use the Loop Over Items node to process records individually
  2. Add a Wait node (100-200ms) between requests to avoid rate limits
  3. Use POST endpoints for batches over 10 numbers

Support