Automating Charitable Intelligence: Building Powerful Workflows with n8n and OrgHunter API
Complete guide to automating nonprofit intelligence with n8n workflow automation and OrgHunter's 2.5M+ charity database. Build Slack bots, donation trackers, research reports, and CSR programs. Includes 5 production-ready workflows with code. Self-hostable, 400+ integrations, unlimited executions.
Introduction
Imagine automating your entire charitable giving workflow—from discovering nonprofits to analyzing their financials, coordinating donations, and tracking impact—all without writing a single line of backend code. With n8n's visual workflow automation platform and OrgHunter's comprehensive charity database, you can build sophisticated nonprofit intelligence systems that run on autopilot.
In this comprehensive guide, you'll learn how to:
- Connect n8n to OrgHunter's 2.5M+ charity database
- Build automated workflows for charity discovery and vetting
- Create intelligent notification systems for nonprofit opportunities
- Automate corporate giving programs and CSR initiatives
- Integrate charity data across your business tools (Slack, Google Sheets, CRM, etc.)
- Deploy production-ready automations in hours, not weeks
What You'll Build: Real-world automation workflows including automated charity research assistants, donation tracking systems, CSR program management, and intelligent nonprofit discovery engines—all using n8n's powerful visual interface.
Difficulty Level: Beginner to Intermediate (no coding required, but JSON knowledge helpful)
Time Required: 30 minutes to 2 hours depending on complexity
Why n8n + OrgHunter?
The Power of Visual Workflow Automation
n8n (pronounced "n-eight-n" or "nodemation") is the world's most popular open-source workflow automation platform, with over 161,000 GitHub stars and 200,000+ active community members. Unlike proprietary tools like Zapier, n8n gives you:
Key Advantages:
- Self-Hostable: Deploy on-premises for complete data control
- Fair-Code License: Free for self-hosting, scalable cloud option available
- 400+ Integrations: Connect to virtually any service
- Custom Code Support: JavaScript/Python when you need it
- AI-Native: Built-in LLM nodes and agent capabilities
- Visual Development: See your workflows as you build them
- No Per-Task Fees: Process unlimited executions when self-hosted
OrgHunter's Comprehensive Data
OrgHunter provides the infrastructure for charitable intelligence:
- 2.5M+ U.S. Charities: Daily updates ensure freshness
- 87K+ Canadian Nonprofits: Cross-border coverage
- Real-Time Verification: Instant 501(c)(3) status checks
- Financial Transparency: Complete Form 990 data
- Geographic Data: Location-based discovery
- RESTful API: Easy integration with any platform
Together, they enable automation workflows that were previously only possible for large enterprises with dedicated development teams.
Understanding n8n Workflows
The Node-Based Approach
n8n uses a visual, node-based system where each node represents an action or trigger:
Trigger Node → Action Node → Processing Node → Output Node
Common Node Types:
- Trigger Nodes: Webhooks, schedules (cron), manual triggers, app events
- Action Nodes: HTTP requests, database queries, API calls, file operations
- Logic Nodes: IF conditions, switches, loops, filters
- Function Nodes: JavaScript/Python code execution
- Integration Nodes: Pre-built connectors (Slack, Gmail, Sheets, etc.)
- AI Nodes: LLM agents, embeddings, vector stores
Workflow Execution Models
1. Trigger-Based (Event-Driven)
- Runs automatically when an event occurs
- Examples: Webhook receives data, schedule time reached, email received
2. Manual
- Triggered by clicking "Execute Workflow" button
- Great for testing and on-demand operations
3. Webhook
- Exposed URL that external services can call
- Enables integration from any system
Prerequisites
Required Accounts
- n8n Access (choose one):
- Self-Hosted (Free): Docker or npm installation
- n8n Cloud (Free trial, then paid): https://n8n.io/
- OrgHunter API:
- Sign up: https://orghunter.3scale.net/
- Get API key from dashboard
- Free tier available via affiliate program
- Optional Integrations:
- Slack (for notifications)
- Google Workspace (Sheets, Docs, Gmail)
- Airtable or other database
- CRM system (Salesforce, HubSpot, etc.)
Installation Options
Option 1: Docker (Recommended)
# Create a volume for data persistence
docker volume create n8n_data
# Run n8n
docker run -d \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
# Access at http://localhost:5678
Option 2: npm
# Install globally
npm install -g n8n
# Start n8n
n8n start
# Access at http://localhost:5678
Option 3: n8n Cloud
- Visit https://n8n.io/
- Sign up for free trial
- No installation needed
Part 1: Your First OrgHunter Workflow
Let's start simple: a workflow that searches for charities and sends the results to Slack.
Step 1: Create New Workflow
- Open n8n (http://localhost:5678 or cloud dashboard)
- Click "Create new workflow"
- Name it: "Charity Search to Slack"
- Save the workflow
Step 2: Add Manual Trigger
- Click the "+" button on the canvas
- Select "On clicking 'Test workflow'" under "Manually"
- This creates a manual trigger node
- Rename node (optional): "Start Search"
Step 3: Add HTTP Request Node for OrgHunter
- Click "+" after the trigger node
- Search for "HTTP Request" and select it
- Configure the node: Authentication: Query Parameters: Headers: Replace
YOUR_ORGHUNTER_API_KEYwith your actual key- Method:
GET - URL:
https://orghunter.3scale.net/v1/charitysearch - Click "Add Parameter"
- Name:
category - Value:
C(Environment category) - Click "Add Parameter"
- Name:
state - Value:
CA(California) - Click "Add Parameter"
- Name:
eligible - Value:
1(Only eligible organizations) - Click "Add Parameter"
- Name:
rows - Value:
10(Limit results) - Click "Add Header"
- Name:
Authorization - Value:
Bearer YOUR_ORGHUNTER_API_KEY
- Method:
- Rename node: "Search OrgHunter"
Step 4: Test the API Call
- Click "Execute Node" button
- View Results: You should see JSON response with charity data
- Verify: Check that you received charity records
Sample Response Structure:
{
"data": [
{
"ein": "12-3456789",
"charityName": "Sample Environmental Org",
"city": "San Francisco",
"state": "CA",
"nteeCode": "C32",
"mission": "Protecting water resources..."
}
]
}
Step 5: Process the Data
We need to format the charity data before sending to Slack.
- Add "Code" node after HTTP Request
- Select JavaScript as language
- Add this code:
// Get charities from previous node
const charities = $input.item.json.data;
// Format for Slack
const formattedResults = charities.map((charity, index) => {
return {
number: index + 1,
name: charity.charityName,
ein: charity.ein,
location: `${charity.city}, ${charity.state}`,
category: charity.nteeCode,
mission: charity.mission || 'No mission statement available'
};
});
// Create Slack message
const slackMessage = {
text: `🌿 Found ${charities.length} Environmental Charities in California`,
blocks: [
{
type: "header",
text: {
type: "plain_text",
text: "🌿 Environmental Charities Search Results"
}
},
{
type: "section",
text: {
type: "mrkdwn",
text: `Found *${charities.length}* eligible organizations in California:`
}
}
]
};
// Add each charity as a block
formattedResults.forEach(charity => {
slackMessage.blocks.push({
type: "section",
text: {
type: "mrkdwn",
text: `*${charity.number}. ${charity.name}*\n` +
`📍 ${charity.location}\n` +
`🔢 EIN: ${charity.ein}\n` +
`📊 Category: ${charity.category}\n` +
`📝 ${charity.mission.substring(0, 150)}...`
}
});
slackMessage.blocks.push({
type: "divider"
});
});
return [{ json: slackMessage }];
- Execute Node to test formatting
Step 6: Add Slack Node
- Add "Slack" node after Code node
- Create Credentials:
- Click "Create New Credential"
- Select authentication method (OAuth2 or Access Token)
- Follow Slack app setup instructions
- Authorize n8n to access your Slack workspace
- Configure Node:
- Resource:
Message - Operation:
Post - Channel: Select your channel (e.g.,
#charity-research) - Text:
={{ $json.text }} - Attachments/Blocks:
={{ JSON.stringify($json.blocks) }}
- Resource:
- Execute Node: Check your Slack channel for the message!
Step 7: Save and Test Complete Workflow
- Click "Save" in top right
- Click "Execute Workflow" button
- Verify:
- HTTP Request retrieved charity data ✓
- Code node formatted it ✓
- Slack received beautiful message ✓
Congratulations! You've built your first OrgHunter + n8n workflow! 🎉
Part 2: Advanced Workflows
Now let's build more sophisticated automations.
Workflow 1: Scheduled Charity Research Report
Use Case: Automatically research and email a weekly report of new charities in specific categories.
Workflow Design:
Schedule Trigger → Search OrgHunter → Get Financials →
Analyze Data → Create Report → Email to Team
Implementation:
- Cron Trigger Node:
- Mode:
Every Week - Hour:
9 - Day:
Monday - This runs every Monday at 9 AM
- Mode:
- HTTP Request Node (Search):
GET https://orghunter.3scale.net/v1/charitysearch
Parameters:
{
"category": "E", // Health
"state": "NY",
"eligible": 1,
"rows": 20
}
- Split In Batches Node:
- Batch Size:
5 - This processes charities in groups to avoid rate limits
- Batch Size:
- HTTP Request Node (Get Financials):
GET https://orghunter.3scale.net/v1/charityfinancial/{{ $json.ein }}
- Uses EIN from previous node
- Code Node (Calculate Efficiency):
const charity = $input.item.json;
const financial = charity.data || charity;
// Calculate program expense ratio
const totalExpenses = parseFloat(financial.totalExpenses || 0);
const programExpenses = parseFloat(financial.programExpenses || 0);
let efficiency = 0;
let rating = 'Unknown';
if (totalExpenses > 0) {
efficiency = (programExpenses / totalExpenses * 100).toFixed(2);
if (efficiency >= 75) rating = 'Excellent ⭐⭐⭐';
else if (efficiency >= 65) rating = 'Good ⭐⭐';
else if (efficiency >= 50) rating = 'Fair ⭐';
else rating = 'Poor';
}
return [{
json: {
name: financial.charityName,
ein: financial.ein,
efficiency: efficiency,
rating: rating,
totalRevenue: financial.totalRevenue,
programExpenses: financial.programExpenses,
adminExpenses: financial.adminExpenses
}
}];
- Aggregate Node:
- This collects all processed charities back together
- Use "Item Lists" → "Aggregate"
- Code Node (Create HTML Report):
const charities = $input.all().map(item => item.json);
const html = `
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
h1 { color: #2563eb; }
table { border-collapse: collapse; width: 100%; margin-top: 20px; }
th { background: #3b82f6; color: white; padding: 12px; text-align: left; }
td { border: 1px solid #ddd; padding: 12px; }
tr:nth-child(even) { background: #f9fafb; }
.excellent { color: #059669; font-weight: bold; }
.good { color: #3b82f6; }
.fair { color: #f59e0b; }
.poor { color: #ef4444; }
</style>
</head>
<body>
<h1>📊 Weekly Charity Research Report</h1>
<p><strong>Category:</strong> Health Organizations in New York</p>
<p><strong>Date:</strong> ${new Date().toLocaleDateString()}</p>
<p><strong>Organizations Analyzed:</strong> ${charities.length}</p>
<table>
<thead>
<tr>
<th>Organization</th>
<th>EIN</th>
<th>Efficiency</th>
<th>Rating</th>
<th>Total Revenue</th>
</tr>
</thead>
<tbody>
`;
let tableRows = '';
charities.forEach(charity => {
const ratingClass = charity.rating.includes('Excellent') ? 'excellent' :
charity.rating.includes('Good') ? 'good' :
charity.rating.includes('Fair') ? 'fair' : 'poor';
tableRows += `
<tr>
<td><strong>${charity.name}</strong></td>
<td>${charity.ein}</td>
<td>${charity.efficiency}%</td>
<td class="${ratingClass}">${charity.rating}</td>
<td>$${parseInt(charity.totalRevenue || 0).toLocaleString()}</td>
</tr>
`;
});
const fullHtml = html + tableRows + `
</tbody>
</table>
<h2>Key Insights</h2>
<ul>
<li>Average Efficiency: ${(charities.reduce((sum, c) => sum + parseFloat(c.efficiency), 0) / charities.length).toFixed(2)}%</li>
<li>Excellent Rated: ${charities.filter(c => c.rating.includes('Excellent')).length}</li>
<li>Total Combined Revenue: $${charities.reduce((sum, c) => sum + parseInt(c.totalRevenue || 0), 0).toLocaleString()}</li>
</ul>
<p><em>Report generated by n8n + OrgHunter</em></p>
</body>
</html>
`;
return [{ json: { html: fullHtml, subject: `Weekly Charity Report - ${new Date().toLocaleDateString()}` } }];
- Gmail Node (Send Email):
- Operation:
Send - To:
team@yourcompany.com - Subject:
={{ $json.subject }} - Email Type:
HTML - Message:
={{ $json.html }}
- Operation:
Result: Every Monday morning, your team receives a beautiful HTML report analyzing health charities in New York with efficiency metrics!
Workflow 2: Charity Verification Bot for Slack
Use Case: Team members ask in Slack if a charity is legitimate, bot automatically verifies and responds.
Workflow Design:
Slack Trigger → Extract Charity Name → Search OrgHunter →
Verify 501(c)(3) → Get Financials → Post Detailed Response
Implementation:
- Slack Trigger Node:
- Trigger:
On App Mention - This triggers when someone @mentions the bot
- Trigger:
- Code Node (Extract Charity Name):
const slackText = $input.item.json.text;
// Remove @bot mention and clean text
const charityName = slackText
.replace(/<@.*?>/g, '') // Remove mentions
.replace(/verify|check|lookup/gi, '') // Remove command words
.trim();
return [{ json: { charityName: charityName } }];
- HTTP Request Node (Search):
GET https://orghunter.3scale.net/v1/charitysearch
Parameters:
{
"charityName": "={{ $json.charityName }}",
"eligible": 1,
"rows": 3
}
- IF Node (Check if found):
- Condition:
{{ $json.data.length }} > 0 - Route based on whether charities were found
- Condition:
- HTTP Request Node (Get Financials for top result):
GET https://orghunter.3scale.net/v1/charityfinancial/{{ $json.data[0].ein }}
- Code Node (Format Response):
const searchResult = $('HTTP Request').item.json.data[0];
const financial = $input.item.json.data;
// Calculate metrics
const programRatio = (financial.programExpenses / financial.totalExpenses * 100).toFixed(2);
const verified = searchResult.eligible === 1;
const response = {
channel: $('Slack Trigger').item.json.channel,
text: verified ? "✅ Charity Verified" : "⚠️ Charity Not Verified",
blocks: [
{
type: "header",
text: {
type: "plain_text",
text: verified ? "✅ Verified Charity" : "⚠️ Verification Results"
}
},
{
type: "section",
fields: [
{ type: "mrkdwn", text: `*Name:*\n${searchResult.charityName}` },
{ type: "mrkdwn", text: `*EIN:*\n${searchResult.ein}` },
{ type: "mrkdwn", text: `*Location:*\n${searchResult.city}, ${searchResult.state}` },
{ type: "mrkdwn", text: `*Status:*\n${verified ? 'Eligible 501(c)(3)' : 'Not Eligible'}` }
]
},
{
type: "section",
text: {
type: "mrkdwn",
text: `*Financial Health*\n` +
`💰 Total Revenue: $${parseInt(financial.totalRevenue).toLocaleString()}\n` +
`📊 Program Expense Ratio: ${programRatio}%\n` +
`⭐ Rating: ${programRatio >= 75 ? 'Excellent' : programRatio >= 65 ? 'Good' : 'Fair'}`
}
}
]
};
return [{ json: response }];
- Slack Node (Post Response):
- Operation:
Post Message - Channel:
={{ $json.channel }} - Message Text:
={{ $json.text }} - Blocks:
={{ JSON.stringify($json.blocks) }}
- Operation:
Usage: Team member types @CharityBot verify American Red Cross in Slack, bot instantly responds with verification and financial analysis!
Workflow 3: Corporate Donation Matching Automation
Use Case: When employees submit donation receipts, automatically verify charity, match donation, and update tracking spreadsheet.
Workflow Design:
Form Submission → Verify Charity → Calculate Match →
Update Google Sheet → Send Confirmation Email → Notify HR
Implementation:
- Webhook Trigger:
- Creates a URL that receives form submissions
- Your donation form posts to this URL
- Code Node (Parse Submission):
const submission = $input.item.json.body;
return [{
json: {
employeeName: submission.employee_name,
employeeEmail: submission.employee_email,
charityName: submission.charity_name,
charityEIN: submission.charity_ein,
donationAmount: parseFloat(submission.amount),
receiptUrl: submission.receipt_url,
submissionDate: new Date().toISOString()
}
}];
- HTTP Request Node (Verify Charity):
GET https://orghunter.3scale.net/v1/charityfinancial/{{ $json.charityEIN.replace(/-/g, '') }}
- IF Node (Check Eligibility):
- Condition:
{{ $json.data }} !== undefined - True = Charity found, False = Not found
- Condition:
- Code Node (Calculate Match):
const donation = $('Code').item.json;
const charity = $input.item.json.data;
// Company policy: Match up to $1000 per donation
const matchAmount = Math.min(donation.donationAmount, 1000);
const totalImpact = donation.donationAmount + matchAmount;
return [{
json: {
...donation,
charityVerified: true,
charityName: charity.charityName,
matchAmount: matchAmount,
totalImpact: totalImpact,
status: 'Approved'
}
}];
- Google Sheets Node (Update Tracker):
- Operation:
Append Row - Spreadsheet: Select your tracking sheet
- Columns to Map:
- Employee Name:
={{ $json.employeeName }} - Charity:
={{ $json.charityName }} - EIN:
={{ $json.charityEIN }} - Employee Donation:
={{ $json.donationAmount }} - Company Match:
={{ $json.matchAmount }} - Total Impact:
={{ $json.totalImpact }} - Date:
={{ $json.submissionDate }} - Status:
={{ $json.status }}
- Employee Name:
- Operation:
- Gmail Node (Confirmation to Employee):
- To:
={{ $json.employeeEmail }} - Subject:
Your Donation Match is Approved! 🎉 - Message:
- To:
Hi {{ $json.employeeName }},
Great news! Your donation to {{ $json.charityName }} has been verified and approved for matching.
📊 Donation Details:
• Your Donation: ${{ $json.donationAmount }}
• Company Match: ${{ $json.matchAmount }}
• Total Impact: ${{ $json.totalImpact }}
The matched funds will be processed within 5 business days.
Thank you for making a difference!
Corporate Giving Team
- Slack Node (Notify HR):
- Channel:
#hr-giving - Message:
- Channel:
New donation match processed:
👤 {{ $json.employeeName }}
🏛️ {{ $json.charityName }}
💰 Match: ${{ $json.matchAmount }}
Result: Complete automation of corporate donation matching program with zero manual verification!
Workflow 4: Grant Application Intake System
Use Case: Nonprofits submit grant applications via form, system automatically verifies eligibility and scores applications.
Components:
- Webhook receives application
- Verify 501(c)(3) status via OrgHunter
- Check financial health
- Calculate eligibility score
- Add to Airtable database
- Notify grant committee for high-scoring applications
Workflow 5: Fundraising Event Coordinator
Use Case: Coordinate fundraising events by finding local charities, checking their event needs, and managing invitations.
Features:
- Geographic search for local nonprofits
- Integration with calendar (Google Calendar)
- Automated email invitations
- RSVP tracking
- Post-event impact reporting
Part 3: Building Blocks - Reusable Sub-Workflows
Create modular components for complex workflows.
Sub-Workflow 1: Charity Validator
Purpose: Verify charity and return standardized result.
Inputs:
- Charity Name OR EIN
Processing:
- Search OrgHunter
- Verify 501(c)(3) status
- Return structured data
Outputs:
{
"valid": true,
"ein": "12-3456789",
"name": "Charity Name",
"eligible": true,
"location": "City, ST",
"category": "C32"
}
How to Create:
- Build the workflow as normal
- Add "Execute Workflow" trigger
- Add "Respond to Webhook" node at end
- Call from other workflows using "Execute Workflow" node
Sub-Workflow 2: Financial Analyzer
Purpose: Get and analyze charity financials.
Processing:
- Fetch financial data
- Calculate efficiency ratios
- Generate rating
- Return analysis
Reuse: Any workflow needing financial analysis
Part 4: Advanced Techniques
Error Handling
Add proper error handling to production workflows:
Error Trigger Node:
// In Code node with "On Error" branch
const error = $input.item.json.error;
return [{
json: {
alert: "Workflow Error Detected",
workflow: "{{ $workflow.name }}",
error: error.message,
timestamp: new Date().toISOString()
}
}];
Then Send Alert:
- Email to admin
- Post to Slack #errors channel
- Log to monitoring system
Rate Limiting
Respect OrgHunter API rate limits:
Add Wait Node:
- Place between repeated API calls
- Wait Amount:
500msto1000ms - Prevents hitting rate limits
Batch Processing:
// Split large operations
const items = $input.all();
const batchSize = 10;
for (let i = 0; i < items.length; i += batchSize) {
const batch = items.slice(i, i + batchSize);
// Process batch
await new Promise(resolve => setTimeout(resolve, 1000));
}
Caching Results
Cache frequently accessed charity data:
Using Redis:
- Add Redis node
- Check cache before API call
- Store results after API call
- Set TTL (Time To Live)
Simple Caching in Code:
// Check if we've seen this EIN recently
const cache = $workflow.staticData.charityCache || {};
const ein = $json.ein;
if (cache[ein] && (Date.now() - cache[ein].timestamp < 3600000)) {
// Use cached data (less than 1 hour old)
return [{ json: cache[ein].data }];
}
// Otherwise fetch fresh data and cache it
const freshData = await fetchCharityData(ein);
cache[ein] = {
data: freshData,
timestamp: Date.now()
};
$workflow.staticData.charityCache = cache;
return [{ json: freshData }];
Logging and Monitoring
Implement comprehensive logging:
- Add Postgres/MySQL Node for logs:
INSERT INTO workflow_logs
(workflow_name, execution_id, step, data, timestamp)
VALUES ($1, $2, $3, $4, NOW())
- Send to External Logger:
- Datadog
- Sentry
- CloudWatch
- Custom logging service
- Execution History:
- n8n automatically keeps execution history
- Access via UI: Executions tab
- Can export for analysis
Part 5: Production Deployment
Self-Hosting Best Practices
1. Use Docker Compose:
version: '3.8'
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=${N8N_PASSWORD}
- WEBHOOK_URL=https://n8n.yourdomain.com/
- GENERIC_TIMEZONE=America/New_York
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=${DB_PASSWORD}
volumes:
- n8n_data:/home/node/.n8n
depends_on:
- postgres
postgres:
image: postgres:15
restart: always
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=n8n
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
n8n_data:
postgres_data:
2. Enable HTTPS:
- Use reverse proxy (Nginx, Traefik, Caddy)
- SSL certificate (Let's Encrypt)
- Secure webhook endpoints
3. Configure Backups:
# Backup workflows
docker exec n8n n8n export:workflow --all --output=/backup/workflows.json
# Backup database
docker exec postgres pg_dump -U n8n n8n > backup.sql
4. Set Up Monitoring:
- Health check endpoint:
http://localhost:5678/healthz - Monitor execution success rates
- Track API usage and costs
- Alert on failures
Environment Variables
Store credentials securely:
# .env file
ORGHUNTER_API_KEY=your_key_here
SLACK_TOKEN=xoxb-your-token
GMAIL_CLIENT_ID=your_id
GMAIL_CLIENT_SECRET=your_secret
DB_PASSWORD=strong_password
N8N_PASSWORD=another_strong_password
Load in n8n:
- Settings → Variables
- Reference as
{{ $env.ORGHUNTER_API_KEY }}
Scaling
For high-volume workflows:
Queue Mode:
environment:
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
Multiple Workers:
n8n-worker-1:
image: docker.n8n.io/n8nio/n8n
command: worker
n8n-worker-2:
image: docker.n8n.io/n8nio/n8n
command: worker
Part 6: Real-World Use Cases
Use Case 1: Nonprofit Marketplace
Scenario: Build a searchable directory of verified nonprofits.
Implementation:
- Daily Sync Workflow:
- Cron trigger (daily)
- Fetch categories from OrgHunter
- Get top charities per category
- Update Airtable database
- API Endpoint Workflow:
- Webhook trigger
- Accept search parameters
- Query Airtable (fast) + OrgHunter (comprehensive)
- Return results
- Website Integration:
- Frontend calls n8n webhook
- Displays charity cards with data
- Real-time search and filtering
Use Case 2: Impact Investor Research
Scenario: Automatically research nonprofits for potential investment/partnership.
Features:
- Financial trend analysis (multi-year)
- Leadership stability checks
- Program effectiveness scoring
- Competitive landscape analysis
- Automated reports to investment committee
Use Case 3: Charity Newsletter Automation
Scenario: Curate and send monthly newsletter highlighting notable nonprofits.
Workflow:
- Search trending causes (based on keywords)
- Find high-rated charities in those areas
- Get success stories (from news sources)
- Design email using template
- Send to subscriber list (Mailchimp/SendGrid)
Use Case 4: Compliance Monitoring
Scenario: Monitor charitable partners for compliance issues.
Monitoring:
- 501(c)(3) status changes
- Failed Form 990 filings
- Significant financial changes
- Leadership turnover
- Negative news mentions
Alerts:
- Email compliance team
- Update risk dashboard
- Flag for review
Part 7: Integration Recipes
Connecting Popular Tools
Airtable Integration:
OrgHunter → n8n → Airtable
Purpose: Maintain searchable charity database
Trigger: Schedule or webhook
Actions: Create/update records
Salesforce Integration:
Donation Form → n8n → Verify via OrgHunter → Create in Salesforce
Purpose: Validate charitable donations for CRM
Google Sheets Integration:
OrgHunter → n8n → Process → Google Sheets
Purpose: Collaborative charity research
Auto-update: Daily sync of charity data
Slack Integration:
Team Mention → n8n → OrgHunter → Slack Response
Purpose: Instant charity lookup bot
Commands: verify, search, analyze
WordPress Integration:
OrgHunter → n8n → Format → WordPress Post
Purpose: Auto-publish charity profiles
Frequency: Weekly featured charity
API Integration Patterns
Pattern 1: Search → Enrich
User Input → Search OrgHunter → Get Financials → Combine → Output
Pattern 2: Bulk Processing
Load EIN List → For Each EIN → Get Data → Aggregate → Report
Pattern 3: Event-Driven
External Event → Trigger Workflow → OrgHunter Lookup → Action
Part 8: Optimization Tips
Performance Optimization
1. Minimize API Calls:
// Bad: Call API for each item
for (const item of items) {
await callOrgHunter(item.ein);
}
// Good: Batch process and cache
const cachedResults = getCached(items);
const needFetch = items.filter(i => !cachedResults[i.ein]);
const newResults = await batchFetch(needFetch);
2. Use Parallel Execution:
- Enable in node settings when possible
- Be mindful of rate limits
- Monitor execution times
3. Optimize Data Transfer:
// Only pass needed fields between nodes
return [{
json: {
ein: charity.ein,
name: charity.charityName,
// Don't include full response if not needed
}
}];
Cost Optimization
n8n Cloud Pricing:
- Starter: 2,500 executions/month
- Pro: 10,000 executions/month
- Self-hosted: Unlimited (infrastructure costs only)
OrgHunter API:
- Cache frequently accessed data
- Use appropriate tier for volume
- Batch requests when possible
Reduce Execution Count:
- Combine workflows where logical
- Use IF nodes to skip unnecessary steps
- Implement smart caching
Part 9: Security Best Practices
API Key Management
Never Hardcode Keys:
// Bad
const apiKey = "abc123xyz";
// Good
const apiKey = $env.ORGHUNTER_API_KEY;
Use Credentials System:
- Create credential in n8n
- Select credential in nodes
- Encrypted at rest
- Per-user access control
Webhook Security
Add Authentication:
// In webhook node, add header check
const authHeader = $('Webhook').item.json.headers.authorization;
const expectedToken = $env.WEBHOOK_SECRET;
if (authHeader !== `Bearer ${expectedToken}`) {
return { error: 'Unauthorized' };
}
Rate Limiting:
- Implement request throttling
- Use API gateway if public
- Monitor for abuse
Data Privacy
GDPR Compliance:
- Don't log personal data
- Implement data retention policies
- Allow data deletion
- Document data flows
Encryption:
- Use HTTPS for all connections
- Encrypt sensitive data at rest
- Secure credential storage
Part 10: Troubleshooting Guide
Common Issues
Issue: "API Key Invalid"
Solution:
1. Check key in OrgHunter dashboard
2. Verify header format: "Bearer YOUR_KEY"
3. Check for extra spaces/characters
4. Regenerate key if needed
Issue: "No Data Returned"
Debugging:
1. Check HTTP Request node execution
2. View raw response in JSON tab
3. Verify query parameters
4. Check OrgHunter API status
5. Ensure EIN format (no dashes for financials)
Issue: "Workflow Timeout"
Solutions:
1. Increase timeout in workflow settings
2. Split into smaller batches
3. Add wait nodes between API calls
4. Check for infinite loops
Issue: "Memory Errors"
Solutions:
1. Process data in smaller chunks
2. Clear unnecessary data between nodes
3. Increase container memory limit
4. Use queue mode for large workflows
Debugging Techniques
1. Use Sticky Notes:
- Document complex logic
- Note API requirements
- Add TODO markers
2. Execute Nodes Individually:
- Test each step separately
- View output JSON
- Verify data structure
3. Enable Debug Mode:
// Add console logging
console.log('Debug:', JSON.stringify($input.item.json, null, 2));
4. Check Execution History:
- View past executions
- Compare successful vs failed
- Identify patterns
Workflow Templates Library
Quick Start Templates
Template 1: Simple Charity Lookup
Manual Trigger → HTTP Request (Search) → Format → Display
Time: 5 minutes
Use: Quick charity verification
Template 2: Financial Report Generator
Schedule → Search → Get Financials → Analyze → Email
Time: 15 minutes
Use: Regular charity monitoring
Template 3: Slack Bot
Slack Trigger → Parse → Search → Verify → Respond
Time: 20 minutes
Use: Team charity questions
Template 4: Donation Tracker
Webhook → Verify → Google Sheets → Email → Slack
Time: 30 minutes
Use: Corporate giving program
Template 5: Research Pipeline
Airtable Trigger → Enrich via OrgHunter → Update → Notify
Time: 25 minutes
Use: Prospect research automation
Download Ready-Made Templates
Visit n8n community: https://n8n.io/workflows/ Search for "charity" or "nonprofit" Import JSON directly into your n8n instance
Resources & Next Steps
Documentation
n8n Resources:
- Docs: https://docs.n8n.io/
- Community Forum: https://community.n8n.io/
- GitHub: https://github.com/n8n-io/n8n
- YouTube: https://www.youtube.com/@n8n-io
OrgHunter Resources:
- API Docs: https://charityapi.com/docs-introduction
- Testing Center: https://orghunter.3scale.net/docs
- Support: support@orghunter.com
Community & Support
Get Help:
- n8n Discord: Active community
- Forum: Search existing questions
- GitHub Issues: Report bugs
- Stack Overflow: Tag with [n8n]
Share Your Workflows:
- Submit to n8n template library
- Earn via affiliate program
- Help others in community
Advanced Learning
Next Topics:
- AI agents with n8n
- Custom node development
- Advanced error handling
- Microservices architecture
- Multi-tenant deployments
Courses:
- freeCodeCamp n8n course
- n8n Academy (official)
- YouTube tutorials
Conclusion
You've now learned how to build powerful charity intelligence automation workflows using n8n and OrgHunter API. From simple charity lookups to sophisticated corporate giving programs, you can automate virtually any nonprofit-related process.
Key Takeaways:
✅ Visual Development: Build complex workflows without backend coding ✅ 400+ Integrations: Connect OrgHunter to any tool in your stack ✅ Self-Hostable: Full control over data and deployments ✅ Production-Ready: Scale from prototype to enterprise ✅ Cost-Effective: Unlimited executions when self-hosted ✅ Community-Driven: Templates and support from 200K+ users
What You Can Build:
- Automated charity verification systems
- Corporate giving program management
- Nonprofit research pipelines
- Impact tracking dashboards
- Compliance monitoring systems
- Fundraising event coordinators
- Grant application processors
- And much more!
Your Next Steps:
- Install n8n (Docker recommended)
- Get your OrgHunter API key
- Start with Template 1 (Simple Lookup)
- Build your first custom workflow
- Share your creation with the community
The combination of n8n's flexibility and OrgHunter's comprehensive data opens up endless possibilities for charitable innovation. Whether you're automating corporate CSR programs, building nonprofit marketplaces, or creating charity research tools—you now have the knowledge to make it happen.
Ready to automate charitable intelligence? Your first workflow awaits!
Appendix
Complete HTTP Request Examples
Search by Category and State:
Method: GET
URL: https://orghunter.3scale.net/v1/charitysearch
Headers:
Authorization: Bearer YOUR_API_KEY
Parameters:
category: E
state: TX
eligible: 1
rows: 20
Get Charity Financials:
Method: GET
URL: https://orghunter.3scale.net/v1/charityfinancial/943456789
Headers:
Authorization: Bearer YOUR_API_KEY
Note: EIN without dashes
Geographic Search:
Method: GET
URL: https://orghunter.3scale.net/v1/charitygeo
Headers:
Authorization: Bearer YOUR_API_KEY
Parameters:
city: Seattle
state: WA
rows: 50
Sample Responses
Search Response:
{
"data": [
{
"ein": "94-1156200",
"charityName": "Silicon Valley Community Foundation",
"city": "Mountain View",
"state": "CA",
"zipCode": "94041",
"nteeCode": "T31",
"category": "Philanthropy",
"mission": "Supporting community needs...",
"websiteURL": "https://www.siliconvalleycf.org/"
}
]
}
Financial Response:
{
"data": {
"ein": "941156200",
"charityName": "Silicon Valley Community Foundation",
"totalRevenue": "5234567890",
"totalExpenses": "3456789012",
"programExpenses": "2987654321",
"adminExpenses": "234567891",
"fundraisingExpenses": "234567890",
"totalAssets": "12345678901",
"totalLiabilities": "987654321",
"taxYear": "2023"
}
}
NTEE Category Quick Reference
Code Category A Arts, Culture & Humanities B Education C Environment D Animal-Related E Health F Mental Health K Food, Agriculture L Housing & Shelter P Human Services Q International Affairs T Philanthropy
Workflow JSON Export Example
{
"name": "Charity Search to Slack",
"nodes": [
{
"parameters": {},
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [250, 300]
},
{
"parameters": {
"url": "https://orghunter.3scale.net/v1/charitysearch",
"options": {
"headers": {
"Authorization": "Bearer ={{ $env.ORGHUNTER_API_KEY }}"
},
"queryParameters": {
"category": "C",
"state": "CA",
"eligible": "1",
"rows": "10"
}
}
},
"name": "Search OrgHunter",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [450, 300]
}
],
"connections": {
"Manual Trigger": {
"main": [[{ "node": "Search OrgHunter", "type": "main", "index": 0 }]]
}
}
}
Built with ❤️ using n8n and OrgHunter Charity API
Questions or want to share your workflows?
- n8n Community: https://community.n8n.io/
- OrgHunter Support: support@orghunter.com
- Twitter: Share with #n8n #CharityTech