n8n Integration

Automate U.S. surplus lines tax calculations in your n8n workflows. Connect the Surplus Lines Tax API to hundreds of other apps without writing code.

What is n8n?

n8n is a powerful, open-source workflow automation platform that lets you connect apps and automate tasks—without writing code. With n8n, you can build complex integrations using a visual interface.

Why Use n8n Integration?

  • No Code Required — Build automations with a visual workflow builder
  • 500+ Integrations — Connect to Google Sheets, Slack, Airtable, and more
  • Self-Hosted or Cloud — Run on your infrastructure or use n8n Cloud
  • Automatic Calculations — Calculate taxes whenever a policy is created
  • Batch Processing — Process multiple policies in one workflow

Prerequisites

Before installing the n8n integration, ensure you have:

  1. n8n Instance

    Either n8n Cloud or self-hosted n8n. Check your version:

    n8n --version
  2. Community Nodes Enabled

    For self-hosted instances, enable community nodes in your environment:

    N8N_COMMUNITY_NODES_ENABLED=true
  3. API Key

    Get your API key at app.surpluslinesapi.com. New accounts include 100 free queries.

How It Works

The n8n node connects your workflows to the Surplus Lines Tax API:

1

Trigger Event
New policy created, webhook received, schedule runs

2

Surplus Lines API Node
Calculate tax, get rates, or fetch state info

3

Next Action
Update spreadsheet, send email, create invoice

Installation

Option 1: Install via n8n UI (Recommended)

  1. Open your n8n instance
  2. Go to SettingsCommunity Nodes
  3. Click Install
  4. Enter package name: n8n-nodes-surplus-lines-undtec
  5. Click Install and wait for confirmation

Option 2: Install via npm (Self-Hosted)

Terminal
npm install n8n-nodes-surplus-lines-undtec

Then restart your n8n instance.

The package is available on npm at npmjs.com/package/n8n-nodes-surplus-lines-undtec

Configuration

Step 1: Create API Credentials

  1. In n8n, go to CredentialsNew
  2. Search for "Surplus Lines API"
  3. Enter your API key from app.surpluslinesapi.com
  4. Click Save

Step 2: Add Node to Workflow

  1. Create a new workflow or open an existing one
  2. Click the + button to add a node
  3. Search for "Surplus Lines API"
  4. Select the node and choose your credentials
  5. Configure the operation (Calculate Tax, Get Rates, or Get States)

Keep Your API Key Secure

Never share your API key publicly or commit it to version control. n8n encrypts credentials in the database.

Testing the Integration

Quick Test Workflow

  1. Add a Manual Trigger node
  2. Add the Surplus Lines API node
  3. Configure:
    • Operation: Calculate Tax
    • State: Texas
    • Premium: 10000
  4. Click Execute Node

Expected Result: You should see tax calculation with state tax ($485), stamping fee ($18), and grand total ($10,503).

Operation: Calculate Tax

Calculate surplus lines tax for any U.S. state and premium amount with detailed breakdowns.

Required Parameters

Parameter Type Description
state Dropdown Select from 53 U.S. states and territories. You can also use 2-letter state codes (e.g., "TX" or "Texas")
premium Number Premium amount in USD (must be positive)

Additional Options

Parameter Type Description
wet_marine Boolean Wet marine coverage (affects Alaska)
fire_insurance Boolean Fire insurance (affects SD, MT)
electronic_filing Boolean Electronic filing (affects MT stamping fee)
fire_marshal_rate Number Fire marshal tax rate 0-1% (Illinois only)
medical_malpractice Boolean Medical malpractice (exempt in PR)
workers_comp Boolean Workers compensation (exempt in VA)
year Number Tax year (affects Iowa rates 2024-2027)
new_business Boolean New vs renewal policy (affects Oregon $10 fee)

Example Output

[
  {
    "success": true,
    "state": "Texas",
    "state_code": "TX",
    "premium": 10000,
    "total_tax": 503,
    "total_due": 10503,
    "account": {
      "balance": "9.62",
      "free_queries_remaining": 99,
      "was_free_query": false
    }
  }
]

Operation: Get Rates

Retrieve current tax rates for all states or filter by a specific state.

Optional Parameters

Parameter Type Description
stateFilter String Filter rates for a specific state (e.g., "Texas" or "TX"). Leave empty for all states.

Example Output

{
  "success": true,
  "request_id": "req-1770111587080-zv53yfmdb",
  "count": 53,
  "data": [
    {
      "state": "Alabama",
      "state_code": "AL",
      "tax_rate": "6%",
      "stamping_fee": null,
      "filing_fee": null,
      "service_fee": null,
      "surcharge": null,
      "regulatory_fee": null,
      "fire_marshal_tax": null,
      "slas_clearinghouse_fee": null,
      "flat_fee": null,
      "special_notes": null,
      "payment_frequency": "Annually",
      "legislative_source": "https://law.justia.com/codes/alabama/..."
    },
    {
      "state": "Texas",
      "state_code": "TX",
      "tax_rate": "4.85%",
      "stamping_fee": "0.04%",
      "filing_fee": null,
      "service_fee": null,
      "surcharge": null,
      "regulatory_fee": null,
      "fire_marshal_tax": null,
      "slas_clearinghouse_fee": null,
      "flat_fee": null,
      "special_notes": null,
      "payment_frequency": null,
      "legislative_source": "https://statutes.capitol.texas.gov/..."
    }
    // ... remaining 51 states
  ],
  "account": {
    "balance": "9.62",
    "free_queries_remaining": 0,
    "was_free_query": false
  }
}

Operation: Get States

Get a list of all supported U.S. states and territories as 2-letter postal codes.

Parameters

None required.

Returns

Array of 2-letter postal codes for all 50 states plus District of Columbia, Puerto Rico, and U.S. Virgin Islands.

Example Output

[
  "AL",
  "AK",
  "AZ",
  ...
  "TX",
  ...
  "WY"
]

Operation: Get Historical Tax Rate

Look up tax rates that were in effect on a specific date. Perfect for policy audits, renewals, and historical compliance verification.

New Feature

Historical rates allow you to calculate taxes using the rates that were in effect at a specific point in time—essential for policy audits and retroactive calculations.

Parameters

Parameter Type Required Description
state Dropdown Yes Select from 53 U.S. states and territories. You can also use 2-letter state codes (e.g., "IA" or "Iowa")
date Date No The date for which to retrieve historical rates (YYYY-MM-DD format). Defaults to today's date if not provided.

Example Output

[
  {
    "success": true,
    "state": "Texas",
    "state_code": "TX",
    "query_date": "2024-01-02",
    "rate": {
      "tax_rate": "0.0485",
      "stamping_fee": "0.0004",
      "filing_fee": "0.0000",
      "service_fee": "0.0000",
      "surcharge": "0.0000",
      "regulatory_fee": "0.0000",
      "fire_marshal_tax": "0.0000",
      "slas_clearinghouse_fee": "0.0000",
      "flat_fee": "0.00",
      "effective_from": "2024-01-01T00:00:00.000Z",
      "effective_to": null,
      "legislative_source": "https://statutes.capitol.texas.gov/docs/IN/htm/IN.225.htm",
      "confidence": "unknown"
    },
    "account": {
      "balance": "0.00",
      "free_queries_remaining": 408,
      "was_free_query": true
    }
  }
]

Use Cases

  • Policy Audits — Verify taxes were calculated correctly using rates in effect at policy inception
  • Renewals — Compare current rates to prior year rates for renewal quotes
  • Compliance — Document historical rate information for regulatory filings
  • Retroactive Calculations — Calculate taxes for backdated policies

Workflow Examples

Common automation patterns using the Surplus Lines API node:

Auto-Calculate Tax on New Policy

Trigger: Webhook receives new policy data

Action 1: Surplus Lines API - Calculate Tax
Action 2: Google Sheets - Add row with policy + tax
Action 3: Slack - Send notification with total

Batch Process Policies from Spreadsheet

Trigger: Schedule (daily at 9 AM)

Action 1: Google Sheets - Read all pending policies
Action 2: Surplus Lines API - Calculate Tax (loop)
Action 3: Google Sheets - Update with calculations
Action 4: Email - Send daily summary report

Multi-State Quote Comparison

Trigger: Manual trigger or form submission

Action 1: Set node - Define states array [Texas, California, New York]
Action 2: Surplus Lines API - Calculate Tax (loop through states)
Action 3: Function node - Find lowest total
Action 4: Email - Send comparison table to client

Rate Change Monitor

Trigger: Schedule (weekly)

Action 1: Surplus Lines API - Get Rates
Action 2: Compare with previous week's data
Action 3: If changed → Slack notification to compliance team

Troubleshooting

"Node not found" after installation

Restart your n8n instance after installing the community node package.

"Authentication failed" error

Your API key is invalid or expired. Verify your key at app.surpluslinesapi.com.

"Insufficient balance" error

Your account balance is depleted. Add funds at app.surpluslinesapi.com.

Node not appearing in node list

  • Verify community nodes are enabled: N8N_COMMUNITY_NODES_ENABLED=true
  • Check installation: npm list n8n-nodes-surplus-lines-undtec
  • Restart n8n: pm2 restart n8n or restart Docker container

Getting Help

Contact us at support@undtec.com for assistance.

Pricing

n8n integration usage follows the same pricing as the REST API:

Free Tier 100 free queries for new accounts
Per Query $0.38 per calculation
Monthly Minimum $18/month (after free tier)
Initial Deposit $50 (credited to your balance)

Get Your API Key View Full Documentation