Skip to Content

N8N Discovery Testing Guide

N8N Discovery Testing Guide

Complete Process to Fix "0 actions" Issue

Overview

This guide walks you through the complete process to fix the overlay showing "1 trigger, 0 actions" instead of "1 trigger, 48 actions" for ActiveCampaign.


What We've Fixed

  • Removed duplicate discovery method from n8n_node_filesystem.py
  • Renamed correct discovery method to discover_hierarchical_n8n_nodes()
  • Fixed parsing logic to handle modular N8N structure (.node.js + Description files)
  • Created SQL script to clear bad schema data

Step-by-Step Testing Process

STEP 1: Check Current Database Status

The database is: ai_automator_db
Current table counts: 305 parent records, 321 L1 records, 304 L2 records

  1. Check ActiveCampaign status:
    cmd set PGPASSWORD=odoo_password && "C:\Program Files\PostgreSQL\15\bin\psql.exe" -U odoo_user -d ai_automator_db -c "SELECT id, folder_name, display_name, has_node_json FROM n8n_folder_information WHERE folder_name = 'ActiveCampaign';"

Expected Result: Should show ActiveCampaign with has_node_json = t

Note: DO NOT clear the data - we'll test with existing data first!


STEP 2: Run Fresh Discovery from Odoo Admin

  1. Access Odoo Admin Interface:
  2. Log into Odoo as administrator
  3. Go to Apps → AI Automator

  4. Navigate to N8N Configuration:

  5. Apps → AI Automator → Configuration → N8N Folder Information
  6. Or search for "N8N Folder" in the search bar

  7. Run Discovery:

  8. Click the "Action" button (gear icon)
  9. Select "Refresh Discovery" from the dropdown
  10. This will call discover_hierarchical_n8n_nodes() method

  11. Monitor the Process:

  12. Watch for success notification: "Hierarchical Node Discovery Complete"
  13. Check Odoo logs for detailed progress:
    bash tail -f /var/log/odoo/odoo.log | grep "DEBUG\|ERROR\|Exception"

STEP 3: Verify Data Population

  1. Check Database Results:
    ```sql
    -- Check parent records
    SELECT COUNT(*) as parent_count FROM n8n_folder_information;

-- Check ActiveCampaign specifically
SELECT * FROM n8n_folder_information WHERE folder_name = 'ActiveCampaign';

-- Check L1 and L2 populations
SELECT COUNT() as l1_count FROM n8n_nodes_l1;
SELECT COUNT(
) as l2_count FROM n8n_nodes_l2;
```

  1. Expected Results:
  2. Parent count: ~305 records (one per N8N folder)
  3. ActiveCampaign record: Should exist with proper has_node_json field
  4. L1/L2 counts: Should have hierarchical data

STEP 4: Test Overlay System

  1. Access Canvas Interface:
  2. Go to AI Automator → Canvas → Workflow Canvas

  3. Test Node Selection:

  4. Click the "+ Add Node" button
  5. Click on "N8N Nodes" tab
  6. Click on "ActiveCampaign" node

  7. Verify Results:

  8. Expected: Overlay shows "Triggers (1)" and "Actions (48)"
  9. Not: "Triggers (1)" and "Actions (0)"

  10. Test Hierarchical Navigation:

  11. Click on "Google" node
  12. Should show sub-folders: Gmail, Sheets, Drive, Calendar, etc.
  13. Click on "Gmail" → Should show Gmail-specific triggers and actions

Debugging Failed Results

If Discovery Fails:

  1. Check Odoo Logs:
    bash grep "ERROR\|Exception" /var/log/odoo/odoo.log | tail -20

  2. Verify File Paths:

  3. Ensure N8N nodes exist at: static/src/n8n/n8n_nodes/
  4. Check ActiveCampaign folder contains: ActiveCampaign.node.js

  5. Manual Debug:
    python # In Odoo shell folder_info = env['n8n.folder.information'] result = folder_info.discover_hierarchical_n8n_nodes() print(f"Discovery result: {result}")

If Overlay Still Shows 0 Actions:

  1. Check API Endpoints:
  2. Test: /canvas/n8n/node_structure
  3. Verify ActiveCampaign ID in database matches API calls

  4. Check Browser Console:

  5. F12 → Console → Look for JavaScript errors
  6. Check network tab for failed API calls

  7. Verify Database Data:
    sql -- Check if ActiveCampaign has parsed operations SELECT folder_name, has_node_json FROM n8n_folder_information WHERE folder_name = 'ActiveCampaign';


Success Criteria

The system is working correctly when:

  • Discovery completes without errors
  • Database populated with ~305 parent records
  • ActiveCampaign shows "Triggers (1) Actions (48)"
  • Google shows hierarchical sub-folders
  • API endpoints return correct data
  • Overlay navigation works smoothly

If You Need Help

If any step fails:

  1. Check the logs for specific error messages
  2. Verify file permissions on N8N folders
  3. Ensure database connectivity is working
  4. Test with a single node first (ActiveCampaign)

KEY TEST: ActiveCampaign should show "1 trigger, 48 actions" instead of "1 trigger, 0 actions"

Was this helpful?