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:
-
n8n Instance
Either n8n Cloud or self-hosted n8n. Check your version:
n8n --version -
Community Nodes Enabled
For self-hosted instances, enable community nodes in your environment:
N8N_COMMUNITY_NODES_ENABLED=true -
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:
Trigger Event
New policy created, webhook received, schedule runs
Surplus Lines API Node
Calculate tax, get rates, or fetch state info
Next Action
Update spreadsheet, send email, create invoice
Installation
Option 1: Install via n8n UI (Recommended)
- Open your n8n instance
- Go to Settings → Community Nodes
- Click Install
- Enter package name:
n8n-nodes-surplus-lines-undtec - Click Install and wait for confirmation
Option 2: Install via npm (Self-Hosted)
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
- In n8n, go to Credentials → New
- Search for "Surplus Lines API"
- Enter your API key from app.surpluslinesapi.com
- Click Save
Step 2: Add Node to Workflow
- Create a new workflow or open an existing one
- Click the + button to add a node
- Search for "Surplus Lines API"
- Select the node and choose your credentials
- Configure the operation (Calculate Tax or Get Rate)
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
- Add a Manual Trigger node
- Add the Surplus Lines API node
- Configure:
- Operation: Calculate Tax
- State: Texas
- Premium: 10000
- 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) |
effective_date |
String | Historical date for tax calculation (YYYY-MM-DD). Leave empty for current rates. Automatically falls back if historical data unavailable. |
Historical Tax Calculation
Use the effective_date parameter to calculate taxes using rates that were in effect on a specific date. Perfect for policy audits, backdated policies, or compliance verification.
Example Output
{
"success": true,
"state": "Texas",
"state_code": "TX",
"premium": 10000,
"effective_date": null,
"rates_from": "current",
"breakdown": {
"base_tax": { "rate": "4.85%", "amount": 485 },
"stamping_fee": { "rate": "0.04%", "amount": 4 },
"filing_fee": null,
"service_fee": null,
"surcharge": null,
"regulatory_fee": null,
"fire_marshal_tax": null,
"slas_clearinghouse_fee": null,
"flat_fee": null
},
"total_tax": 489,
"total_due": 10489,
"notes": [],
"legislative_source": "https://statutes.capitol.texas.gov/docs/IN/htm/IN.225.htm",
"rate_period": null,
"account": {
"balance": "0.00",
"free_queries_remaining": 685,
"was_free_query": true
}
}
Operation: Get Rate
Retrieve current or historical tax rates for a specific state. Features automatic fallback to current rates if historical data is unavailable.
Automatic Fallback
When you request historical rates, the API automatically falls back to current rates if historical data isn't available for the requested date. You'll receive a clear indication when fallback occurs.
Required Parameters
| Parameter | Type | Description |
|---|---|---|
state |
Dropdown | Select from 53 U.S. states and territories (e.g., "Texas" or "TX") |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
rateDate |
String | Date for historical rates in YYYY-MM-DD format. Leave empty for current rates. Automatically falls back to current rates if historical data unavailable. |
Parameter Name in n8n
In the n8n node, this parameter appears as "Date" but maps to rateDate in the API request.
Example Output (Current Rate)
{
"success": true,
"state": "Texas",
"state_code": "TX",
"query_date": "2026-02-18",
"rates_from": "current",
"rate": {
"tax_rate": "4.85%",
"stamping_fee": "0.04%",
"filing_fee": "",
"service_fee": "",
"surcharge": "",
"regulatory_fee": "",
"fire_marshal_tax": "",
"slas_clearinghouse_fee": "",
"flat_fee": "",
"rounding_rule": "Not Specified. We use Standard Rounding 50% Up 49.9% Down.",
"effective_from": null,
"effective_to": null,
"legislative_source": "https://statutes.capitol.texas.gov/docs/IN/htm/IN.225.htm",
"confidence": "high",
"data_source": "current_rate",
"field_sources": null
},
"special_notes": null,
"account": {
"balance": "0.00",
"free_queries_remaining": 684,
"was_free_query": true
}
}
Example Output (Historical Rate - Texas)
{
"success": true,
"state": "Texas",
"state_code": "TX",
"query_date": "2024-09-12",
"rates_from": "historical",
"rate": {
"tax_rate": "4.85%",
"stamping_fee": "0.04%",
"filing_fee": "",
"service_fee": "",
"surcharge": "",
"regulatory_fee": "",
"fire_marshal_tax": "",
"slas_clearinghouse_fee": "",
"flat_fee": "",
"rounding_rule": "Not Specified. We use Standard Rounding 50% Up 49.9% Down.",
"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": "high",
"data_source": "initial_migration",
"field_sources": {
"tax_rate": "initial_migration",
"stamping_fee": "initial_migration",
"filing_fee": "initial_migration",
"service_fee": "initial_migration",
"surcharge": "initial_migration",
"regulatory_fee": "initial_migration",
"fire_marshal_tax": "initial_migration",
"slas_clearinghouse_fee": "initial_migration",
"flat_fee": "initial_migration",
"rounding_rule": "initial_migration",
"special_notes": "initial_migration"
}
},
"special_notes": null,
"account": {
"balance": "0.00",
"free_queries_remaining": 683,
"was_free_query": true
}
}
Example Output (Automatic Fallback)
When historical data is unavailable for the requested date, the API automatically falls back to current rates. The rates_from field will return "current" instead of "historical" to indicate the fallback occurred.
{
"success": true,
"state": "Texas",
"state_code": "TX",
"query_date": "2010-01-01",
"rates_from": "current",
"rate": {
"tax_rate": "4.85%",
"stamping_fee": "0.04%",
"filing_fee": "",
"service_fee": "",
"surcharge": "",
"regulatory_fee": "",
"fire_marshal_tax": "",
"slas_clearinghouse_fee": "",
"flat_fee": "",
"rounding_rule": "Not Specified. We use Standard Rounding 50% Up 49.9% Down.",
"effective_from": null,
"effective_to": null,
"legislative_source": "https://statutes.capitol.texas.gov/docs/IN/htm/IN.225.htm",
"confidence": "high",
"data_source": "current_rate",
"field_sources": null
},
"special_notes": null,
"account": {
"balance": "0.00",
"free_queries_remaining": 683,
"was_free_query": true
}
}
Use Cases
- Current Rates — Get today's tax rates for quote generation
- Policy Audits — Verify taxes using rates in effect at policy inception
- Renewals — Compare current vs. prior year rates
- Compliance — Document historical rate information for regulatory filings
- Rate Monitoring — Track rate changes over time (Iowa has scheduled rate reductions through 2027)
Historical Data Available
Currently, only Iowa has true historical data with 4 rate periods (2024-2027+). For all other states, the API returns current rates with a fallback notification if you request historical dates.
Workflow Examples
Common automation patterns using the Surplus Lines API node:
Auto-Calculate Tax on New Policy
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
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
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
Iowa Rate Schedule Tracker
Action 1: Surplus Lines API - Get Rate for Iowa (current)
Action 2: Check rate against schedule (0.975% → 0.9% by 2027)
Action 3: If rate changed → Send email to accounting 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 n8nor 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) |