inflow-crm

Package Information

Released: 7/9/2025
Downloads: 0 weekly / 0 monthly
Latest Version: 1.0.0
Author: inflowcrm

Documentation

n8n-nodes-inflow-crm

Debugging

This project uses the debug library for comprehensive logging throughout the Inflow CRM integration. The logging system provides detailed insights into API calls, authentication, caching, and node actions to help diagnose issues quickly.

Enabling Debug Logging

Debug logging is controlled by the DEBUG environment variable. The logging system uses namespaced loggers for granular control over what information is displayed.

All Logging (Development Mode)

DEBUG=inflow:*

Specific Component Logging

# API calls only
DEBUG=inflow:api

# Authentication issues
DEBUG=inflow:auth

# Cache operations
DEBUG=inflow:cache

# Node actions
DEBUG=inflow:actions

# Multiple namespaces
DEBUG=inflow:api,inflow:auth

Available Log Namespaces

inflow:api - API Communication

Logs all HTTP requests, responses, and API-related operations:

  • Request URLs, headers, and payloads
  • Response status codes and data
  • API error responses and retries
  • Network timeout and connection issues

Use when:

  • API calls are failing or returning unexpected data
  • Investigating connection issues with Inflow CRM
  • Debugging request/response format problems

inflow:auth - Authentication & Credentials

Logs authentication-related operations:

  • Credential validation and loading
  • Authentication token handling
  • Authorization failures
  • API key validation

Use when:

  • Getting authentication errors
  • Credential configuration issues
  • API access permission problems

inflow:cache - Metadata Caching

Logs caching operations for module metadata:

  • Cache hits and misses
  • Metadata loading and storage
  • Cache invalidation events
  • Performance metrics for cached operations

Use when:

  • Module metadata is not loading correctly
  • Performance issues with field loading
  • Cache-related errors or inconsistencies

inflow:actions - Node Actions

Logs detailed information about node action execution:

  • Action parameter processing
  • Filter object cleaning and validation
  • Data transformation operations
  • Action success/failure states

Use when:

  • Node actions are not working as expected
  • Investigating filter or parameter issues
  • Debugging data transformation problems
  • Boolean false value filtering issues

Environment-Specific Usage

Node.js Development

# Linux/macOS
DEBUG=inflow:* npm run dev

# Windows Command Prompt
set DEBUG=inflow:* && npm run dev

# Windows PowerShell
$env:DEBUG="inflow:*"; npm run dev

n8n Development Environment

# Enable all Inflow CRM debugging in n8n
DEBUG=inflow:* n8n start

# Focus on API issues during n8n development
DEBUG=inflow:api,inflow:auth n8n start

Production Debugging (Selective)

# Only log errors and warnings in production
DEBUG=inflow:*:error,inflow:*:warn n8n start

# Temporary API debugging in production
DEBUG=inflow:api:error n8n start

Log Levels

Each namespace supports multiple log levels with automatic prefixing:

  • debug: Detailed development information
  • info: General operational information
  • warn: Warning conditions that should be noted
  • error: Error conditions requiring attention

Example log output:

inflow:api:debug Making request to /api/contacts +0ms
inflow:api:info Successfully retrieved 25 contacts +15ms
inflow:auth:warn API key approaching rate limit +0ms
inflow:actions:error Filter validation failed +2ms

Common Debugging Scenarios

API Connection Issues

# Enable API and auth logging to diagnose connection problems
DEBUG=inflow:api,inflow:auth n8n start

# Look for:
# - HTTP error status codes (401, 403, 500)
# - Network timeout messages
# - Invalid API endpoint URLs
# - Authentication token issues

Data Not Loading in Node

# Enable cache and API logging for data loading issues
DEBUG=inflow:cache,inflow:api n8n start

# Look for:
# - Cache miss messages indicating metadata loading issues
# - API responses showing empty or unexpected data
# - Module loading failures

Filter/Search Not Working

# Enable actions logging to debug filter operations
DEBUG=inflow:actions n8n start

# Look for:
# - "Original filters vs Cleaned filters" debug messages
# - Boolean false value filtering operations
# - Filter validation failures
# - Parameter processing issues

Node Actions Failing

# Enable all logging for comprehensive action debugging
DEBUG=inflow:* n8n start

# Look for:
# - Action parameter validation messages
# - API request/response mismatches
# - Authentication failures during actions
# - Data transformation errors

Performance Issues

# Focus on caching and API performance
DEBUG=inflow:cache,inflow:api:info n8n start

# Look for:
# - Cache hit/miss ratios
# - API response times
# - Multiple redundant API calls
# - Memory usage warnings

Troubleshooting Tips

1. Start with Broad Logging

Begin with DEBUG=inflow:* to get the full picture, then narrow down to specific namespaces.

2. Check Authentication First

Most issues stem from authentication problems. Use DEBUG=inflow:auth,inflow:api to verify credentials and API access.

3. Verify API Responses

Use DEBUG=inflow:api to examine the actual data returned by the Inflow CRM API and ensure it matches expectations.

4. Monitor Filter Cleaning

When search/filter operations don't work as expected, use DEBUG=inflow:actions to see how boolean false values are being filtered out.

5. Production Debugging

In production, use selective logging like DEBUG=inflow:*:error to avoid overwhelming logs while still capturing issues.

6. Log Output Management

  • Logs are written to stderr by default
  • Use DEBUG_COLORS=false to disable colored output in log files
  • Use DEBUG_DEPTH=null to see full object structures in logs

Example Debug Session

# Start with comprehensive logging
DEBUG=inflow:* n8n start

# Observe the logs and identify the problem area
# Then focus on specific namespace:

# If API issues detected:
DEBUG=inflow:api n8n start

# If authentication problems:
DEBUG=inflow:auth n8n start

# If filter/action issues:
DEBUG=inflow:actions n8n start

This debugging system provides powerful insights into the Inflow CRM integration, enabling quick identification and resolution of issues across all components of the n8n node.

Discussion