Credits Left
Checks the number of API credits remaining in your Dropcontact account.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Options
- API Key - Dropcontact API key for authentication (credential type).
Output
- credits - A numeric value representing the number of API credits remaining in your account.
How It Works
The Credits Left node queries your Dropcontact account to check remaining credits. When executed, the node:
- Constructs a minimal POST request to the Dropcontact batch API
- Sends a dummy payload with an empty data object
- Adds authentication headers with the API key
- Sends the request to
https://api.dropcontact.io/batch - Parses the response to extract the
credits_leftfield - Returns the credit count as a numeric value
Requirements
- A valid Dropcontact account with API access
- API key configured in credentials
Error Handling
The node will return specific errors in the following cases:
ErrCredentials- Failed to retrieve API key from credentialsErrInternal- Failed to create HTTP requestErrRuntime- Failed to send request, parse response, or credits_left field not found in response
Usage Notes
- This node does not consume credits when checking the balance
- Use this node before large batch operations to ensure sufficient credits
- Credits are only consumed when emails are found or verified
- One credit equals one successfully found or verified email
- The node makes a lightweight API call that returns credit information
- Credits are shared across all API operations on your account
Credit System
Dropcontact's credit model:
- 1 credit = 1 email found or verified
- Credits are NOT charged for:
- Contacts that don't match (no email found)
- Phone number enrichment
- Company information enrichment
- Name normalization
- Credits ARE charged for:
- Email addresses discovered
- Email addresses verified
- Each verified email in the response
Example: Check Credits Before Batch
Flow Setup:
- Credits Left node - Check available credits
- Decision node - Verify sufficient credits available
- If yes → Continue with Batch Post
- If no → Send notification and stop
Output:
credits: 1250
Decision Logic:
// Check if we have enough credits for the batch
let creditsNeeded = 250; // Planning to process 250 contacts
let creditsAvailable = $.credits;
if (creditsAvailable < creditsNeeded) {
throw new Error(`Insufficient credits. Need ${creditsNeeded}, have ${creditsAvailable}`);
}
Example: Credit Monitoring Flow
This example monitors credits and sends alerts when running low:
- Trigger - Schedule to run daily
- Credits Left - Check current credit balance
- JavaScript - Evaluate credit threshold:
let threshold = 500; // Alert threshold
let credits = $.credits;
return {
credits: credits,
isLow: credits < threshold,
urgency: credits < 100 ? "critical" : credits < threshold ? "warning" : "ok"
};
- Condition - If credits are low
- Mail - Send alert email to admin
- Slack - Post notification to team channel
Alert Message Template:
Warning: Dropcontact credits running low
Current balance: {credits}
Threshold: {threshold}
Action required: Purchase additional credits
Example: Dynamic Batch Sizing
Adjust batch size based on available credits:
- Credits Left - Get available credits
- Read CSV - Load contacts to process
- JavaScript - Calculate optimal batch size:
let maxBatchSize = 250;
let availableCredits = $.credits;
let reserveCredits = 100; // Keep some in reserve
// Calculate safe batch size (assuming 50% match rate)
let estimatedNeeded = maxBatchSize * 0.5;
let safeBatchSize = maxBatchSize;
if (availableCredits - reserveCredits < estimatedNeeded) {
safeBatchSize = Math.floor((availableCredits - reserveCredits) / 0.5);
safeBatchSize = Math.max(1, safeBatchSize); // At least 1
}
return {
batchSize: safeBatchSize,
canProceed: safeBatchSize >= 1
};
- Loop - Process contacts in calculated batch size
- Batch Post - Submit limited batch
Example: Credit Usage Tracking
Track credit consumption across batch operations:
- Credits Left - Get initial credit count (before_credits)
- Store - Save to variable:
before_credits - Batch Post - Submit contacts for enrichment
- Delay - Wait for processing
- Batch Result - Retrieve enriched data
- Credits Left - Get final credit count (after_credits)
- JavaScript - Calculate credits consumed:
let consumed = $.before_credits - $.after_credits;
let contactsProcessed = $.result.total_count;
let successRate = (consumed / contactsProcessed * 100).toFixed(2);
return {
credits_consumed: consumed,
contacts_processed: contactsProcessed,
success_rate: successRate + "%",
avg_cost_per_contact: (consumed / contactsProcessed).toFixed(2)
};
- Log - Record usage metrics
- Excel - Append to usage report
Example: Pre-flight Credit Check
Validate sufficient credits before starting automation:
// Pre-flight credit check function
async function validateCredits(requiredCredits) {
let available = $.credits;
let safetyMargin = 50; // Keep 50 credits as buffer
if (available < requiredCredits + safetyMargin) {
return {
canProceed: false,
message: `Insufficient credits. Required: ${requiredCredits}, Available: ${available}`,
shortage: (requiredCredits + safetyMargin) - available
};
}
return {
canProceed: true,
message: `Credit check passed. Available: ${available}`,
remaining: available - requiredCredits
};
}
// Usage
let contactCount = 500;
let estimatedCost = Math.ceil(contactCount * 0.6); // Assume 60% match rate
let check = await validateCredits(estimatedCost);
if (!check.canProceed) {
throw new Error(check.message);
}
console.log(check.message);
Common Errors and Solutions
Error: "Failed to get API key"
Cause: API key credential is not configured or invalid Solution:
- Verify the Dropcontact API Key credential exists in vault
- Ensure the credential is properly selected in the node options
- Check that the API key is active in your Dropcontact account
Error: "credits_left not found in response"
Cause: API response doesn't contain the credits_left field Solution:
- Verify your API key is valid and active
- Check Dropcontact service status
- Ensure you have an active subscription with Dropcontact
Error: "Failed to send request"
Cause: Network connectivity issues or API endpoint unreachable Solution:
- Check internet connectivity
- Verify firewall settings allow HTTPS to dropcontact.io
- Retry after a brief delay
Negative or unexpected credit values
Cause: Account may have expired or been suspended Solution:
- Log in to your Dropcontact account to verify status
- Check if your subscription is active
- Contact Dropcontact support if the issue persists
Best Practices
- Regular Monitoring: Check credits before large batch operations
- Alerting: Set up automated alerts when credits drop below thresholds
- Budget Management: Track credit consumption per workflow for cost analysis
- Safety Margins: Always maintain a buffer of credits for critical operations
- Batch Sizing: Dynamically adjust batch sizes based on available credits
- Usage Reporting: Log credit usage with timestamps for billing reconciliation
- Error Handling: Enable Continue On Error for non-critical credit checks
- Estimation: Assume 50-70% match rate when estimating credit needs
- Pre-validation: Always check credits before starting large automation jobs
- Credit Recovery: Build retry logic that waits for credit renewal if running low
Credit Optimization Tips
Maximize Credit Efficiency:
-
Data Quality: Clean and validate data before submission
- Remove duplicates
- Validate email formats
- Ensure company names are accurate
-
Target Selection: Only enrich contacts you actually need
- Filter out low-priority contacts
- Skip contacts with existing verified emails
- Focus on high-value prospects
-
Batch Timing: Spread large operations over time
- Process smaller batches more frequently
- Avoid rush jobs that may need re-runs
- Schedule during off-peak hours if relevant
-
Result Caching: Store and reuse enrichment results
- Save enriched data to database
- Don't re-enrich the same contacts
- Implement data freshness checks
-
Smart Retries: Don't retry contacts that had no matches
- Track unsuccessful enrichments
- Only retry after significant data changes
- Focus retries on partial matches
Understanding Credit Consumption
When credits are consumed:
- Email address is found for a contact
- Email address is verified (even if already known)
- Multiple emails found for one contact = multiple credits
When credits are NOT consumed:
- No email found for a contact
- Only company information enriched
- Only name normalization performed
- Phone number enrichment without email
- Duplicate contact in same batch
Example Credit Usage:
Batch of 100 contacts submitted:
- 60 contacts: Email found and verified = 60 credits
- 20 contacts: No email found = 0 credits
- 15 contacts: Company info only = 0 credits
- 5 contacts: Duplicates = 0 credits
Total credits consumed: 60
Integration with Workflows
Common patterns for credit management:
Pattern 1: Conditional Processing
Credits Left → Check threshold → If sufficient → Process batch
→ If insufficient → Notify admin
Pattern 2: Dynamic Sizing
Credits Left → Calculate safe batch size → Loop with size → Batch Post
Pattern 3: Usage Tracking
Before credits → Process → After credits → Calculate difference → Log metrics
Pattern 4: Alert System
Scheduled trigger → Credits Left → Evaluate → Send alerts if low
Pattern 5: Cost Estimation
Count contacts → Estimate cost → Credits Left → Validate budget → Proceed or defer