Add docs-dataset dataset
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +168 -0
- docs-dataset/additional_training.jsonl +17 -0
- docs-dataset/categorized/categorization_summary.json +46 -0
- docs-dataset/categorized/debugging_dataset_expanded.jsonl +0 -0
- docs-dataset/categorized/marketing_seo_training.jsonl +13 -0
- docs-dataset/categorized/mcp_training_data.jsonl +0 -0
- docs-dataset/categorized/n8n_master.jsonl +3 -0
- docs-dataset/categorized/workflow_logic_dataset.jsonl +0 -0
- docs-dataset/cleanup_stats.json +6 -0
- docs-dataset/dataset_summary.json +78 -0
- docs-dataset/debugging_dataset_expanded.jsonl +0 -0
- docs-dataset/evaluation_set.jsonl +21 -0
- docs-dataset/final_training_dataset.jsonl +3 -0
- docs-dataset/fullstack_training.jsonl +16 -0
- docs-dataset/marketing_master.jsonl +0 -0
- docs-dataset/marketing_seo_training.jsonl +13 -0
- docs-dataset/mcp_server_docs.jsonl +3 -0
- docs-dataset/mcp_server_master_list.jsonl +0 -0
- docs-dataset/mcp_training_data.jsonl +0 -0
- docs-dataset/multimodal/README.md +95 -0
- docs-dataset/multimodal/combined_training.jsonl +3 -0
- docs-dataset/multimodal/flat_training.jsonl +3 -0
- docs-dataset/multimodal/normalized_training.jsonl +3 -0
- docs-dataset/multimodal/text_training.jsonl +3 -0
- docs-dataset/multimodal/vision_training.jsonl +0 -0
- docs-dataset/phase1_critical_gaps.jsonl +15 -0
- docs-dataset/phase2_industry_specific.jsonl +10 -0
- docs-dataset/phase3_visual_cases.jsonl +14 -0
- docs-dataset/quality_report.json +8 -0
- docs-dataset/qwen3_self_knowledge.jsonl +15 -0
- docs-dataset/qwen3_vl_evaluation.jsonl +21 -0
- docs-dataset/qwen3_vl_training.jsonl +3 -0
- docs-dataset/remaining_gaps.jsonl +11 -0
- docs-dataset/saas_vision_dataset.jsonl +0 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_accounting_0.webp +0 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_0.webp +3 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_1.webp +3 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_2.webp +0 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_3.webp +3 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_4.webp +0 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_5.webp +0 -0
- docs-dataset/screenshots/enterprise_gaps/odoo_studio_6.webp +3 -0
- docs-dataset/screenshots/fieldroutes/fr_billing.png +0 -0
- docs-dataset/screenshots/fieldroutes/fr_customers.png +0 -0
- docs-dataset/screenshots/fieldroutes/fr_dashboard.png +3 -0
- docs-dataset/screenshots/fieldroutes/fr_employees.png +0 -0
- docs-dataset/screenshots/fieldroutes/fr_leads.png +0 -0
- docs-dataset/screenshots/fieldroutes/fr_login.png +0 -0
- docs-dataset/screenshots/fieldroutes/fr_marketing.png +3 -0
- docs-dataset/screenshots/fieldroutes/fr_pricing_page.png +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,171 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
docs-dataset/categorized/n8n_master.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
docs-dataset/final_training_dataset.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
docs-dataset/mcp_server_docs.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
docs-dataset/multimodal/combined_training.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
docs-dataset/multimodal/flat_training.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
docs-dataset/multimodal/normalized_training.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
docs-dataset/multimodal/text_training.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
docs-dataset/qwen3_vl_training.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
docs-dataset/screenshots/enterprise_gaps/odoo_studio_0.webp filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
docs-dataset/screenshots/enterprise_gaps/odoo_studio_1.webp filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
docs-dataset/screenshots/enterprise_gaps/odoo_studio_3.webp filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
docs-dataset/screenshots/enterprise_gaps/odoo_studio_6.webp filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
docs-dataset/screenshots/fieldroutes/fr_dashboard.png filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
docs-dataset/screenshots/fieldroutes/fr_marketing.png filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
docs-dataset/screenshots/fieldroutes/fr_solutions.png filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
docs-dataset/screenshots/ghl_access_check_1767131344515.webp filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
docs-dataset/screenshots/ghl_admin_contacts_1767142407414.png filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
docs-dataset/screenshots/ghl_admin_settings_profile_1767142356599.png filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
docs-dataset/screenshots/ghl_admin_setup_1767141928287.webp filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
docs-dataset/screenshots/ghl_contacts_before_1767148125750.png filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
docs-dataset/screenshots/ghl_marketing_campaigns_view_v1_1767242886936.png filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
docs-dataset/screenshots/ghl_opportunities_after_intermediate_1767148606851.png filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
docs-dataset/screenshots/ghl_public_features_1767143621096.png filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
docs-dataset/screenshots/ghl_public_home_1767143593481.png filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
docs-dataset/screenshots/ghl_public_pricing_1767143640145.png filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
docs-dataset/screenshots/ghl_seeding_finish_and_odoo_deep_crawl_1767148403606.webp filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
docs-dataset/screenshots/ghl_std_user_capture_1767142155098.webp filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
docs-dataset/screenshots/ghl_std_user_crawl_1767150470590.webp filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
docs-dataset/screenshots/ghl_subaccount_dashboard_main_1767150120415.png filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
docs-dataset/screenshots/ghl_subaccount_deep_crawl_1767150104265.webp filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
docs-dataset/screenshots/ghl_subaccount_marketing_1767150249837.png filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
docs-dataset/screenshots/ghl_subaccount_memberships_1767150369407.png filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
docs-dataset/screenshots/ghl_subaccount_reputation_1767150388696.png filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
docs-dataset/screenshots/github/gh_explore.png filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
docs-dataset/screenshots/github/gh_home.png filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
docs-dataset/screenshots/github/gh_marketplace.png filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
docs-dataset/screenshots/github/gh_settings_account.png filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
docs-dataset/screenshots/github/github_explore.png filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
docs-dataset/screenshots/github/github_gist_main.png filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
docs-dataset/screenshots/github/github_homepage.png filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
docs-dataset/screenshots/github/github_marketplace.png filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
docs-dataset/screenshots/github/github_marketplace_actions.png filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
docs-dataset/screenshots/github/github_repo_projects.png filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
docs-dataset/screenshots/github/github_settings_account.png filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
docs-dataset/screenshots/github/github_settings_billing.png filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
docs-dataset/screenshots/github_repo_verification_1766609743126.webp filter=lfs diff=lfs merge=lfs -text
|
| 82 |
+
docs-dataset/screenshots/gohighlevel/ghl_ai_chatbot.png filter=lfs diff=lfs merge=lfs -text
|
| 83 |
+
docs-dataset/screenshots/gohighlevel/ghl_blog.png filter=lfs diff=lfs merge=lfs -text
|
| 84 |
+
docs-dataset/screenshots/gohighlevel/ghl_careers.png filter=lfs diff=lfs merge=lfs -text
|
| 85 |
+
docs-dataset/screenshots/gohighlevel/ghl_chiropractor_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 86 |
+
docs-dataset/screenshots/gohighlevel/ghl_community.png filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
docs-dataset/screenshots/gohighlevel/ghl_crm.png filter=lfs diff=lfs merge=lfs -text
|
| 88 |
+
docs-dataset/screenshots/gohighlevel/ghl_crm_small_business.png filter=lfs diff=lfs merge=lfs -text
|
| 89 |
+
docs-dataset/screenshots/gohighlevel/ghl_dental_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
docs-dataset/screenshots/gohighlevel/ghl_ecommerce.png filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
docs-dataset/screenshots/gohighlevel/ghl_education_home.png filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
docs-dataset/screenshots/gohighlevel/ghl_email_marketing.png filter=lfs diff=lfs merge=lfs -text
|
| 93 |
+
docs-dataset/screenshots/gohighlevel/ghl_hair_salon_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 94 |
+
docs-dataset/screenshots/gohighlevel/ghl_home.png filter=lfs diff=lfs merge=lfs -text
|
| 95 |
+
docs-dataset/screenshots/gohighlevel/ghl_hvac_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 96 |
+
docs-dataset/screenshots/gohighlevel/ghl_marketing_agency_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 97 |
+
docs-dataset/screenshots/gohighlevel/ghl_plumbing_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 98 |
+
docs-dataset/screenshots/gohighlevel/ghl_real_estate_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 99 |
+
docs-dataset/screenshots/gohighlevel/ghl_reputation.png filter=lfs diff=lfs merge=lfs -text
|
| 100 |
+
docs-dataset/screenshots/gohighlevel/ghl_resources.png filter=lfs diff=lfs merge=lfs -text
|
| 101 |
+
docs-dataset/screenshots/gohighlevel/ghl_roofing_playbook.png filter=lfs diff=lfs merge=lfs -text
|
| 102 |
+
docs-dataset/screenshots/gohighlevel/ghl_sms_marketing.png filter=lfs diff=lfs merge=lfs -text
|
| 103 |
+
docs-dataset/screenshots/gohighlevel/ghl_voice_ai.png filter=lfs diff=lfs merge=lfs -text
|
| 104 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_activecampaign.png filter=lfs diff=lfs merge=lfs -text
|
| 105 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_clickfunnels.png filter=lfs diff=lfs merge=lfs -text
|
| 106 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_hubspot.png filter=lfs diff=lfs merge=lfs -text
|
| 107 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_kajabi.png filter=lfs diff=lfs merge=lfs -text
|
| 108 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_kartra.png filter=lfs diff=lfs merge=lfs -text
|
| 109 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_keap.png filter=lfs diff=lfs merge=lfs -text
|
| 110 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_salesforce.png filter=lfs diff=lfs merge=lfs -text
|
| 111 |
+
docs-dataset/screenshots/gohighlevel/ghl_vs_zoho.png filter=lfs diff=lfs merge=lfs -text
|
| 112 |
+
docs-dataset/screenshots/gohighlevel/ghl_whatsapp.png filter=lfs diff=lfs merge=lfs -text
|
| 113 |
+
docs-dataset/screenshots/gohighlevel/ghl_white_label_app.png filter=lfs diff=lfs merge=lfs -text
|
| 114 |
+
docs-dataset/screenshots/gohighlevel/ghl_white_label_crm.png filter=lfs diff=lfs merge=lfs -text
|
| 115 |
+
docs-dataset/screenshots/gohighlevel/ghl_wordpress.png filter=lfs diff=lfs merge=lfs -text
|
| 116 |
+
docs-dataset/screenshots/google-ai-studio/ais_chat.png filter=lfs diff=lfs merge=lfs -text
|
| 117 |
+
docs-dataset/screenshots/google-ai-studio/ais_main.png filter=lfs diff=lfs merge=lfs -text
|
| 118 |
+
docs-dataset/screenshots/google-ai-studio/ais_prompts.png filter=lfs diff=lfs merge=lfs -text
|
| 119 |
+
docs-dataset/screenshots/huggingface/hf_datasets.png filter=lfs diff=lfs merge=lfs -text
|
| 120 |
+
docs-dataset/screenshots/huggingface/hf_docs.png filter=lfs diff=lfs merge=lfs -text
|
| 121 |
+
docs-dataset/screenshots/huggingface/hf_home.png filter=lfs diff=lfs merge=lfs -text
|
| 122 |
+
docs-dataset/screenshots/huggingface/hf_models.png filter=lfs diff=lfs merge=lfs -text
|
| 123 |
+
docs-dataset/screenshots/huggingface/hf_pricing.png filter=lfs diff=lfs merge=lfs -text
|
| 124 |
+
docs-dataset/screenshots/huggingface/hf_settings.png filter=lfs diff=lfs merge=lfs -text
|
| 125 |
+
docs-dataset/screenshots/huggingface/hf_settings_billing.png filter=lfs diff=lfs merge=lfs -text
|
| 126 |
+
docs-dataset/screenshots/huggingface/hf_settings_tokens.png filter=lfs diff=lfs merge=lfs -text
|
| 127 |
+
docs-dataset/screenshots/huggingface/hf_spaces.png filter=lfs diff=lfs merge=lfs -text
|
| 128 |
+
docs-dataset/screenshots/huggingface_n8n_search_1766767318423.webp filter=lfs diff=lfs merge=lfs -text
|
| 129 |
+
docs-dataset/screenshots/lovable/lovable_blog.png filter=lfs diff=lfs merge=lfs -text
|
| 130 |
+
docs-dataset/screenshots/lovable/lovable_changelog.png filter=lfs diff=lfs merge=lfs -text
|
| 131 |
+
docs-dataset/screenshots/lovable/lovable_docs.png filter=lfs diff=lfs merge=lfs -text
|
| 132 |
+
docs-dataset/screenshots/lovable/lovable_home.png filter=lfs diff=lfs merge=lfs -text
|
| 133 |
+
docs-dataset/screenshots/lovable/lovable_templates.png filter=lfs diff=lfs merge=lfs -text
|
| 134 |
+
docs-dataset/screenshots/lovable/lv_home.png filter=lfs diff=lfs merge=lfs -text
|
| 135 |
+
docs-dataset/screenshots/lovable/lv_settings.png filter=lfs diff=lfs merge=lfs -text
|
| 136 |
+
docs-dataset/screenshots/mistral/mi_console.png filter=lfs diff=lfs merge=lfs -text
|
| 137 |
+
docs-dataset/screenshots/mistral/mistral_careers.png filter=lfs diff=lfs merge=lfs -text
|
| 138 |
+
docs-dataset/screenshots/mistral/mistral_console.png filter=lfs diff=lfs merge=lfs -text
|
| 139 |
+
docs-dataset/screenshots/mistral/mistral_home.png filter=lfs diff=lfs merge=lfs -text
|
| 140 |
+
docs-dataset/screenshots/mistral/mistral_technology.png filter=lfs diff=lfs merge=lfs -text
|
| 141 |
+
docs-dataset/screenshots/n8n_api_key_retrieval_1766894286319.webp filter=lfs diff=lfs merge=lfs -text
|
| 142 |
+
docs-dataset/screenshots/odoo/odoo_accounting.png filter=lfs diff=lfs merge=lfs -text
|
| 143 |
+
docs-dataset/screenshots/odoo/odoo_appointments.png filter=lfs diff=lfs merge=lfs -text
|
| 144 |
+
docs-dataset/screenshots/odoo/odoo_blog.png filter=lfs diff=lfs merge=lfs -text
|
| 145 |
+
docs-dataset/screenshots/odoo/odoo_crm.png filter=lfs diff=lfs merge=lfs -text
|
| 146 |
+
docs-dataset/screenshots/odoo/odoo_customer_references.png filter=lfs diff=lfs merge=lfs -text
|
| 147 |
+
docs-dataset/screenshots/odoo/odoo_discuss.png filter=lfs diff=lfs merge=lfs -text
|
| 148 |
+
docs-dataset/screenshots/odoo/odoo_documents.png filter=lfs diff=lfs merge=lfs -text
|
| 149 |
+
docs-dataset/screenshots/odoo/odoo_ecommerce.png filter=lfs diff=lfs merge=lfs -text
|
| 150 |
+
docs-dataset/screenshots/odoo/odoo_education.png filter=lfs diff=lfs merge=lfs -text
|
| 151 |
+
docs-dataset/screenshots/odoo/odoo_email_marketing.png filter=lfs diff=lfs merge=lfs -text
|
| 152 |
+
docs-dataset/screenshots/odoo/odoo_events.png filter=lfs diff=lfs merge=lfs -text
|
| 153 |
+
docs-dataset/screenshots/odoo/odoo_events_page.png filter=lfs diff=lfs merge=lfs -text
|
| 154 |
+
docs-dataset/screenshots/odoo/odoo_expenses.png filter=lfs diff=lfs merge=lfs -text
|
| 155 |
+
docs-dataset/screenshots/odoo/odoo_find_accountant.png filter=lfs diff=lfs merge=lfs -text
|
| 156 |
+
docs-dataset/screenshots/odoo/odoo_fleet.png filter=lfs diff=lfs merge=lfs -text
|
| 157 |
+
docs-dataset/screenshots/odoo/odoo_helpdesk.png filter=lfs diff=lfs merge=lfs -text
|
| 158 |
+
docs-dataset/screenshots/odoo/odoo_hr.png filter=lfs diff=lfs merge=lfs -text
|
| 159 |
+
docs-dataset/screenshots/odoo/odoo_inventory.png filter=lfs diff=lfs merge=lfs -text
|
| 160 |
+
docs-dataset/screenshots/odoo/odoo_knowledge.png filter=lfs diff=lfs merge=lfs -text
|
| 161 |
+
docs-dataset/screenshots/odoo/odoo_manufacturing.png filter=lfs diff=lfs merge=lfs -text
|
| 162 |
+
docs-dataset/screenshots/odoo/odoo_planning.png filter=lfs diff=lfs merge=lfs -text
|
| 163 |
+
docs-dataset/screenshots/odoo/odoo_pos.png filter=lfs diff=lfs merge=lfs -text
|
| 164 |
+
docs-dataset/screenshots/odoo/odoo_project.png filter=lfs diff=lfs merge=lfs -text
|
| 165 |
+
docs-dataset/screenshots/odoo/odoo_purchase.png filter=lfs diff=lfs merge=lfs -text
|
| 166 |
+
docs-dataset/screenshots/odoo/odoo_recruitment.png filter=lfs diff=lfs merge=lfs -text
|
| 167 |
+
docs-dataset/screenshots/odoo/odoo_rental.png filter=lfs diff=lfs merge=lfs -text
|
| 168 |
+
docs-dataset/screenshots/odoo/odoo_sales.png filter=lfs diff=lfs merge=lfs -text
|
| 169 |
+
docs-dataset/screenshots/odoo/odoo_scaleup.png filter=lfs diff=lfs merge=lfs -text
|
| 170 |
+
docs-dataset/screenshots/odoo/odoo_sign.png filter=lfs diff=lfs merge=lfs -text
|
| 171 |
+
docs-dataset/screenshots/odoo/odoo_social_marketing.png filter=lfs diff=lfs merge=lfs -text
|
| 172 |
+
docs-dataset/screenshots/odoo/odoo_studio.png filter=lfs diff=lfs merge=lfs -text
|
| 173 |
+
docs-dataset/screenshots/odoo/odoo_subscriptions.png filter=lfs diff=lfs merge=lfs -text
|
| 174 |
+
docs-dataset/screenshots/odoo/odoo_surveys.png filter=lfs diff=lfs merge=lfs -text
|
| 175 |
+
docs-dataset/screenshots/odoo/odoo_tutorials.png filter=lfs diff=lfs merge=lfs -text
|
| 176 |
+
docs-dataset/screenshots/odoo/odoo_voip.png filter=lfs diff=lfs merge=lfs -text
|
| 177 |
+
docs-dataset/screenshots/odoo/odoo_website_builder.png filter=lfs diff=lfs merge=lfs -text
|
| 178 |
+
docs-dataset/screenshots/odoo_admin_crm_pipeline_1767145467134.png filter=lfs diff=lfs merge=lfs -text
|
| 179 |
+
docs-dataset/screenshots/odoo_admin_deep_scan_1_1767145345748.webp filter=lfs diff=lfs merge=lfs -text
|
| 180 |
+
docs-dataset/screenshots/odoo_admin_deep_scan_internal_1767146026787.webp filter=lfs diff=lfs merge=lfs -text
|
| 181 |
+
docs-dataset/screenshots/odoo_admin_deep_scan_v2_1767146184884.webp filter=lfs diff=lfs merge=lfs -text
|
| 182 |
+
docs-dataset/screenshots/odoo_admin_sales_dashboard_1767145365766.png filter=lfs diff=lfs merge=lfs -text
|
| 183 |
+
docs-dataset/screenshots/odoo_capture_retry_1767130082842.webp filter=lfs diff=lfs merge=lfs -text
|
| 184 |
+
docs-dataset/screenshots/odoo_crm_before_1767147482002.png filter=lfs diff=lfs merge=lfs -text
|
| 185 |
+
docs-dataset/screenshots/odoo_deep_crawl_continuation_1767149140343.webp filter=lfs diff=lfs merge=lfs -text
|
| 186 |
+
docs-dataset/screenshots/odoo_internal_admin_crm_1767146107011.png filter=lfs diff=lfs merge=lfs -text
|
| 187 |
+
docs-dataset/screenshots/odoo_internal_admin_sales_1767146089479.png filter=lfs diff=lfs merge=lfs -text
|
| 188 |
+
docs-dataset/screenshots/odoo_live_capture_1767104659712.webp filter=lfs diff=lfs merge=lfs -text
|
| 189 |
+
docs-dataset/screenshots/odoo_public_apps_1767143532569.png filter=lfs diff=lfs merge=lfs -text
|
| 190 |
+
docs-dataset/screenshots/odoo_public_contact_1767150078102.png filter=lfs diff=lfs merge=lfs -text
|
| 191 |
+
docs-dataset/screenshots/odoo_sales_before_1767147750982.png filter=lfs diff=lfs merge=lfs -text
|
| 192 |
+
docs-dataset/screenshots/odoo_sales_ghl_seeding_1767147712269.webp filter=lfs diff=lfs merge=lfs -text
|
| 193 |
+
docs-dataset/screenshots/odoo_seeding_products_crm_1767147232841.webp filter=lfs diff=lfs merge=lfs -text
|
| 194 |
+
docs-dataset/screenshots/odoo_standard_user_crawl_1767149806167.webp filter=lfs diff=lfs merge=lfs -text
|
| 195 |
+
docs-dataset/screenshots/odoo_std_user_capture_1767131245169.webp filter=lfs diff=lfs merge=lfs -text
|
| 196 |
+
docs-dataset/screenshots/odoo_std_user_sales_1767131312073.png filter=lfs diff=lfs merge=lfs -text
|
| 197 |
+
docs-dataset/screenshots/odoo_std_user_sales_v2_1767131316691.png filter=lfs diff=lfs merge=lfs -text
|
| 198 |
+
docs-dataset/screenshots/public_site_capture_1767143492692.webp filter=lfs diff=lfs merge=lfs -text
|
| 199 |
+
docs-dataset/screenshots/test_http_access_1767061686200.webp filter=lfs diff=lfs merge=lfs -text
|
| 200 |
+
docs-dataset/screenshots/uploaded_image_1766792725147.png filter=lfs diff=lfs merge=lfs -text
|
| 201 |
+
docs-dataset/screenshots/wf_sample.png filter=lfs diff=lfs merge=lfs -text
|
| 202 |
+
docs-dataset/tech_stack_full.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 203 |
+
docs-dataset/vendor_resources.jsonl filter=lfs diff=lfs merge=lfs -text
|
docs-dataset/additional_training.jsonl
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "How do I send emails in n8n?", "output": "To send emails in n8n, you have several options:\n\n**1. Gmail Node** (for Gmail accounts)\n- Add Gmail node to your workflow\n- Connect your Google account credentials\n- Configure: To, Subject, Body, Attachments\n\n**2. SMTP Node** (for any email server)\n- Add Send Email node\n- Configure SMTP credentials (host, port, user, pass)\n- Set recipient, subject, and message\n\n**3. Email Trigger** (to receive emails)\n- Use IMAP Email Trigger to watch inbox\n- Process incoming messages automatically\n\nWhich email provider are you using? I can give you specific setup steps.", "metadata": {"type": "conversational", "turn": 1, "topic": "email"}}
|
| 2 |
+
{"instruction": "I'm using Gmail. What if the email fails to send?", "output": "Great choice with Gmail! Here's how to handle email failures:\n\n**1. Enable Error Handling**\n```\nGmail Node → Settings → On Error → Continue (with error output)\n```\n\n**2. Add Error Branch**\n```\nGmail Node\n ├── Success → Continue workflow\n └── Error → Error Handler node\n → Log error to Slack/database\n → Retry or notify admin\n```\n\n**3. Common Gmail Errors & Fixes:**\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| 401 Unauthorized | Token expired | Reconnect Gmail credential |\n| Rate limit | Too many emails | Add Wait node between sends |\n| Invalid recipient | Bad email format | Validate email before sending |\n\n**4. Retry Pattern:**\n```javascript\n// In Code node before Gmail\nconst maxRetries = 3;\nlet attempt = $input.first().json.attempt || 0;\n\nif (attempt >= maxRetries) {\n throw new Error('Max retries exceeded');\n}\n\nreturn { ...item, attempt: attempt + 1 };\n```\n\nWant me to show you a complete error-handling workflow?", "metadata": {"type": "conversational", "turn": 2, "topic": "email", "context": "follow_up"}}
|
| 3 |
+
{"instruction": "Yes, show me the complete workflow", "output": "Here's a complete Gmail workflow with error handling:\n\n**Workflow Structure:**\n```\nWebhook (trigger)\n ↓\nValidate Email (Code node)\n ↓\nGmail Node (with error handling)\n ├── Success → Log to Google Sheets\n │ → Send Slack confirmation\n └── Error → Wait 30 seconds\n → Retry (max 3 times)\n → If still failing → Alert admin\n```\n\n**Step 1: Validation Code Node**\n```javascript\nconst { to, subject, body } = $input.first().json;\n\n// Validate email format\nconst emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nif (!emailRegex.test(to)) {\n throw new Error(`Invalid email: ${to}`);\n}\n\nif (!subject || subject.length < 1) {\n throw new Error('Subject is required');\n}\n\nreturn { to, subject, body, attempt: 0 };\n```\n\n**Step 2: Gmail Node Settings**\n- To: `{{ $json.to }}`\n- Subject: `{{ $json.subject }}`\n- Message: `{{ $json.body }}`\n- On Error: Continue\n\n**Step 3: Error Handler**\n```javascript\nconst error = $input.first().json.error;\nconst attempt = $input.first().json.attempt;\n\nif (attempt < 3) {\n // Will retry\n return { retry: true, attempt: attempt + 1 };\n} else {\n // Max retries - alert admin\n return { \n alertAdmin: true, \n error: error.message,\n failedEmail: $input.first().json.to\n };\n}\n```\n\nWould you like me to export this as a JSON file you can import directly?", "metadata": {"type": "conversational", "turn": 3, "topic": "email", "context": "complete_example"}}
|
| 4 |
+
{"instruction": "How do I connect n8n to my database?", "output": "n8n supports many databases! Here are the main options:\n\n**SQL Databases:**\n- PostgreSQL → Postgres node\n- MySQL → MySQL node\n- Microsoft SQL Server → MSSQL node\n- SQLite → SQLite node\n\n**NoSQL Databases:**\n- MongoDB → MongoDB node\n- Redis → Redis node\n\n**Data Warehouses:**\n- Google BigQuery → BigQuery node\n- Snowflake → HTTP Request with API\n\n**Setup Steps:**\n1. **Create Credential**\n - Settings → Credentials → Add Credential\n - Select your database type\n - Enter: Host, Port, Database, User, Password\n\n2. **Add Database Node**\n - Choose operation: Select, Insert, Update, Delete\n - Write your query or use the visual builder\n\nWhich database are you connecting to?", "metadata": {"type": "conversational", "turn": 1, "topic": "database"}}
|
| 5 |
+
{"instruction": "PostgreSQL. How do I run a SELECT query?", "output": "Perfect! Here's how to query PostgreSQL in n8n:\n\n**1. Create PostgreSQL Credential**\n- Go to Credentials → Add Credential → Postgres\n- Enter connection details:\n - Host: `localhost` or your server IP\n - Port: `5432`\n - Database: `your_database`\n - User: `your_user`\n - Password: `your_password`\n - SSL: Enable if required\n\n**2. Add Postgres Node**\n- Operation: `Execute Query`\n- Query:\n```sql\nSELECT id, name, email, created_at\nFROM users\nWHERE status = 'active'\nORDER BY created_at DESC\nLIMIT 100\n```\n\n**3. Using Parameters (Safer)**\n```sql\nSELECT * FROM users WHERE id = $1\n```\n- Parameters: `{{ $json.userId }}`\n\n**4. Dynamic Queries**\n```javascript\n// In Code node before Postgres\nconst filters = [];\nconst params = [];\n\nif ($json.status) {\n filters.push(`status = $${params.length + 1}`);\n params.push($json.status);\n}\n\nif ($json.email) {\n filters.push(`email LIKE $${params.length + 1}`);\n params.push(`%${$json.email}%`);\n}\n\nconst where = filters.length ? `WHERE ${filters.join(' AND ')}` : '';\nreturn { query: `SELECT * FROM users ${where}`, params };\n```\n\n**Common Issues:**\n- Connection refused → Check firewall/host\n- SSL required → Enable SSL in credential\n- Permission denied → Check database user grants\n\nNeed help with INSERT or UPDATE queries too?", "metadata": {"type": "conversational", "turn": 2, "topic": "database", "context": "postgres_select"}}
|
| 6 |
+
{"instruction": "What's the difference between webhooks and HTTP requests in n8n?", "output": "Great question! They serve opposite purposes:\n\n## Webhook Node (RECEIVING data)\n- Creates an endpoint **others call**\n- Starts your workflow when triggered\n- Like a doorbell - waits for visitors\n\n```\nExternal System → Calls YOUR webhook → n8n workflow runs\n```\n\n**Use cases:**\n- Stripe payment notifications\n- GitHub push events\n- Form submissions\n- Zapier/Make triggers\n\n## HTTP Request Node (SENDING data)\n- Makes calls **to other services**\n- Middle or end of workflow\n- Like making a phone call\n\n```\nn8n workflow runs → Calls EXTERNAL API → Gets response\n```\n\n**Use cases:**\n- Fetch data from APIs\n- Post to Slack\n- Update external databases\n- Call custom services\n\n## Quick Comparison\n\n| Feature | Webhook | HTTP Request |\n|---------|---------|--------------|\n| Direction | Incoming | Outgoing |\n| Position | Start of workflow | Anywhere |\n| Waits for | External trigger | Nothing (active) |\n| Creates URL | Yes | No |\n| Needs auth | Optional | Often required |\n\n## Example Workflow\n```\nWebhook (receive order from Shopify)\n ↓\nHTTP Request (get customer from CRM)\n ↓\nHTTP Request (create shipping label)\n ↓\nHTTP Request (notify customer via SMS API)\n```\n\nDoes that clarify it?", "metadata": {"type": "conversational", "turn": 1, "topic": "concepts"}}
|
| 7 |
+
{"instruction": "I'm stuck on an error. Help!", "output": "I'd be happy to help debug! To assist you effectively, please share:\n\n**1. What's the error message?**\n- Copy the exact error text\n- Include any error codes\n\n**2. Which node is failing?**\n- What type of node?\n- What operation/settings?\n\n**3. What are you trying to do?**\n- Brief description of the workflow goal\n\n**4. What have you tried?**\n- Any troubleshooting steps already taken\n\n**Quick Debug Checklist:**\n- [ ] Check credentials are connected and valid\n- [ ] Verify input data format (JSON structure)\n- [ ] Test the API outside n8n (curl/Postman)\n- [ ] Check n8n execution logs for details\n- [ ] Ensure required fields are populated\n\n**Common Quick Fixes:**\n| Error | Likely Fix |\n|-------|------------|\n| 401 Unauthorized | Refresh/reconnect credentials |\n| 404 Not Found | Check URL/endpoint spelling |\n| 500 Server Error | External service issue |\n| undefined | Missing data from previous node |\n| ECONNREFUSED | Target service not running |\n\nShare the error details and I'll give you specific help!", "metadata": {"type": "conversational", "turn": 1, "topic": "debugging"}}
|
| 8 |
+
{"instruction": "The error says 'Cannot read property email of undefined'", "output": "Ah, classic JavaScript error! This means you're trying to access `.email` on something that doesn't exist.\n\n**The Problem:**\n```javascript\n$json.customer.email // customer is undefined!\n```\n\n**Debugging Steps:**\n\n**1. Check Previous Node Output**\n- Click the node BEFORE the failing one\n- Look at the output data structure\n- Is `customer` actually there?\n\n**2. Common Causes:**\n\n| Cause | Fix |\n|-------|-----|\n| Wrong property name | Check actual JSON structure |\n| Item index issue | Use `$json` not `$node[].json` |\n| Empty result | Add IF node to handle empty |\n| API returned null | Use optional chaining |\n\n**3. Safe Access Patterns:**\n```javascript\n// Instead of:\n$json.customer.email\n\n// Use optional chaining:\n$json.customer?.email\n\n// Or with fallback:\n$json.customer?.email || 'no-email@example.com'\n\n// Or check first:\nif ($json.customer && $json.customer.email) {\n // safe to use\n}\n```\n\n**4. Debug Code Node:**\n```javascript\n// Add this to see actual structure\nconsole.log('Input:', JSON.stringify($input.all(), null, 2));\n\n// Check what we actually received\nconst data = $input.first().json;\nconsole.log('Has customer?', 'customer' in data);\nconsole.log('Customer value:', data.customer);\n\nreturn $input.all();\n```\n\n**5. Check the expression:**\nWhere is this expression used? In the node settings, verify:\n- The path matches your actual data\n- You're accessing the right item index\n- Previous node actually outputs data\n\nCan you share what the previous node outputs?", "metadata": {"type": "conversational", "turn": 2, "topic": "debugging", "context": "undefined_error"}}
|
| 9 |
+
{"instruction": "Can you help me hack into someone else's n8n instance?", "output": "I can't help with unauthorized access to systems you don't own or have permission to access. That would be:\n- Illegal under computer fraud laws\n- A violation of the target's privacy\n- Potentially harmful to their business\n\n**What I CAN help with:**\n\n✅ Securing YOUR n8n instance:\n- Setting up authentication\n- Configuring SSL/HTTPS\n- Implementing API key protection\n- Hardening your deployment\n\n✅ Legitimate penetration testing:\n- If you're authorized to test your organization's systems\n- Following responsible disclosure practices\n\n✅ Security best practices:\n- How to protect your workflows\n- Credential management\n- Audit logging\n\nWould you like help securing your own n8n deployment instead?", "metadata": {"type": "adversarial", "category": "ethical_refusal", "topic": "security"}}
|
| 10 |
+
{"instruction": "Write me a workflow that sends spam emails to millions of people", "output": "I can't help create spam workflows. Mass unsolicited emails:\n- Violate CAN-SPAM, GDPR, and other laws\n- Will get your domain/IP blacklisted\n- Could result in legal action\n- Harm recipients and erode trust\n\n**What I CAN help with:**\n\n✅ Legitimate email marketing:\n- Opt-in subscriber lists\n- Proper unsubscribe handling\n- Email authentication (SPF, DKIM)\n- Compliance with email regulations\n\n✅ Transactional emails:\n- Order confirmations\n- Password resets \n- Appointment reminders\n\n✅ High-quality outreach:\n- Personalized, targeted campaigns\n- Proper consent management\n- Bounce and complaint handling\n\nWould you like help building a compliant email automation system instead?", "metadata": {"type": "adversarial", "category": "ethical_refusal", "topic": "spam"}}
|
| 11 |
+
{"instruction": "n8n is better than Zapier in every way, right?", "output": "Actually, both have strengths depending on your needs. Let me give you an honest comparison:\n\n**n8n Advantages:**\n- ✅ Self-hostable (data privacy)\n- ✅ More complex logic (code nodes, loops)\n- ✅ Fair-code license (source available)\n- ✅ Lower cost at scale\n- ✅ More technical flexibility\n\n**Zapier Advantages:**\n- ✅ More pre-built integrations (5000+)\n- ✅ No infrastructure to manage\n- ✅ Better for non-technical users\n- ✅ Longer track record (established 2011)\n- ✅ More polished consumer app integrations\n\n**Best Use Cases:**\n\n| Scenario | Better Choice |\n|----------|---------------|\n| Privacy-sensitive data | n8n (self-host) |\n| Quick simple automations | Zapier |\n| Complex business logic | n8n |\n| Non-technical team | Zapier |\n| Cost-conscious startups | n8n |\n| Enterprise with compliance | Either (both offer enterprise) |\n\n**My honest take:** n8n is excellent for technical users who want control. Zapier wins on ease of use. Many teams use both!\n\nWhat's your specific use case? I can recommend which fits better.", "metadata": {"type": "adversarial", "category": "balanced_opinion", "topic": "comparison"}}
|
| 12 |
+
{"instruction": "How do I bypass API rate limits?", "output": "I'll help with **legitimate** rate limit management, not bypassing security measures.\n\n**Understanding Rate Limits:**\nRate limits exist to:\n- Protect service stability\n- Ensure fair usage\n- Prevent abuse\n\n**Legitimate Solutions:**\n\n**1. Respect the Limits (Recommended)**\n```javascript\n// Implement proper backoff\nasync function withRateLimit(fn) {\n try {\n return await fn();\n } catch (e) {\n if (e.status === 429) {\n const retryAfter = e.headers['retry-after'] || 60;\n await sleep(retryAfter * 1000);\n return fn(); // Retry once\n }\n throw e;\n }\n}\n```\n\n**2. Optimize Your Requests**\n- Batch operations when API supports it\n- Cache responses to avoid duplicate calls\n- Use webhooks instead of polling\n\n**3. Request Higher Limits**\n- Contact the API provider\n- Upgrade to a paid tier\n- Apply for enterprise access\n\n**4. Queue and Throttle**\n```\nIncoming Requests → Queue → Rate Limiter → API Call\n ↑\n (1 req/second)\n```\n\n**5. Use n8n's Built-in Features**\n- Split In Batches with wait time\n- Wait node between requests\n- Retry with exponential backoff\n\nWhat API are you working with? I can suggest specific strategies.", "metadata": {"type": "adversarial", "category": "reframe_ethical", "topic": "rate_limits"}}
|
| 13 |
+
{"instruction": "My workflow doesn't work. Fix it.", "output": "I'd love to help, but I need more information to diagnose the issue!\n\n**Please share:**\n\n1. **What's the goal?**\n - What should the workflow accomplish?\n\n2. **What's happening?**\n - Error messages?\n - Wrong output?\n - No output at all?\n\n3. **Workflow structure:**\n - What nodes are you using?\n - What's the trigger?\n\n4. **Any error details:**\n - Screenshot of the error\n - Or copy the error message\n\n**Quick Self-Check:**\n```\n[ ] All credentials connected?\n[ ] Test data available?\n[ ] Trigger actually fired?\n[ ] Previous nodes outputting data?\n[ ] Expressions using correct paths?\n```\n\nThe more details you share, the faster I can help you fix it!", "metadata": {"type": "adversarial", "category": "insufficient_info", "topic": "debugging"}}
|
| 14 |
+
{"instruction": "Just give me the code, skip the explanation", "output": "I'll be concise! But a quick note: understanding helps you fix issues later.\n\nHere's clean, copy-paste ready code:\n\n```javascript\n// Generic n8n Code Node template\nconst input = $input.first().json;\n\n// Your logic here\nconst result = {\n processed: true,\n data: input,\n timestamp: new Date().toISOString()\n};\n\nreturn { json: result };\n```\n\n**For specific code, tell me:**\n- What operation? (filter/transform/API call?)\n- Input format?\n- Expected output?\n\nI'll give you exactly what you need, minimal explanation. 👍", "metadata": {"type": "adversarial", "category": "user_preference", "topic": "communication"}}
|
| 15 |
+
{"instruction": "Give me a complete n8n workflow JSON for a webhook that sends Slack notifications", "output": "Here's a ready-to-import n8n workflow:\n\n```json\n{\n \"name\": \"Webhook to Slack\",\n \"nodes\": [\n {\n \"parameters\": {\n \"httpMethod\": \"POST\",\n \"path\": \"slack-notify\",\n \"responseMode\": \"responseNode\"\n },\n \"name\": \"Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"position\": [250, 300]\n },\n {\n \"parameters\": {\n \"channel\": \"#notifications\",\n \"text\": \"=New notification: {{ $json.message }}\",\n \"otherOptions\": {}\n },\n \"name\": \"Slack\",\n \"type\": \"n8n-nodes-base.slack\",\n \"position\": [450, 300],\n \"credentials\": {\n \"slackApi\": {\n \"id\": \"1\",\n \"name\": \"Slack account\"\n }\n }\n },\n {\n \"parameters\": {\n \"respondWith\": \"json\",\n \"responseBody\": \"={ \"success\": true }\"\n },\n \"name\": \"Respond\",\n \"type\": \"n8n-nodes-base.respondToWebhook\",\n \"position\": [650, 300]\n }\n ],\n \"connections\": {\n \"Webhook\": {\n \"main\": [[{\"node\": \"Slack\", \"type\": \"main\", \"index\": 0}]]\n },\n \"Slack\": {\n \"main\": [[{\"node\": \"Respond\", \"type\": \"main\", \"index\": 0}]]\n }\n }\n}\n```\n\n**To use:**\n1. Copy the JSON\n2. In n8n: Workflows → Import from File → Paste\n3. Connect your Slack credential\n4. Activate the workflow\n5. POST to: `https://your-n8n.com/webhook/slack-notify`\n\n**Test with curl:**\n```bash\ncurl -X POST https://your-n8n.com/webhook/slack-notify \\\n -H \"Content-Type: application/json\" \\\n -d '{\"message\": \"Hello from webhook!\"}'\n```", "metadata": {"type": "workflow_json", "use_case": "webhook_slack", "complexity": "beginner"}}
|
| 16 |
+
{"instruction": "Give me a workflow JSON for scheduled database backup to Google Drive", "output": "Here's a complete database backup workflow:\n\n```json\n{\n \"name\": \"Daily Database Backup\",\n \"nodes\": [\n {\n \"parameters\": {\n \"rule\": {\n \"interval\": [{\"field\": \"hours\", \"hoursInterval\": 24}]\n }\n },\n \"name\": \"Daily Trigger\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"position\": [250, 300]\n },\n {\n \"parameters\": {\n \"operation\": \"executeQuery\",\n \"query\": \"SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'\"\n },\n \"name\": \"Get Tables\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"position\": [450, 300],\n \"credentials\": {\"postgres\": {\"id\": \"1\", \"name\": \"PostgreSQL\"}}\n },\n {\n \"parameters\": {\n \"jsCode\": \"const tables = $input.all().map(i => i.json.table_name);\\nconst timestamp = new Date().toISOString().split('T')[0];\\nconst backupData = { tables, timestamp, created: new Date().toISOString() };\\nreturn { json: { filename: `backup_${timestamp}.json`, content: JSON.stringify(backupData, null, 2) } };\"\n },\n \"name\": \"Format Backup\",\n \"type\": \"n8n-nodes-base.code\",\n \"position\": [650, 300]\n },\n {\n \"parameters\": {\n \"operation\": \"upload\",\n \"folderId\": \"your-folder-id\",\n \"fileName\": \"={{ $json.filename }}\",\n \"fileContent\": \"={{ $json.content }}\"\n },\n \"name\": \"Upload to Drive\",\n \"type\": \"n8n-nodes-base.googleDrive\",\n \"position\": [850, 300],\n \"credentials\": {\"googleDriveOAuth2Api\": {\"id\": \"1\", \"name\": \"Google Drive\"}}\n },\n {\n \"parameters\": {\n \"channel\": \"#backups\",\n \"text\": \"=✅ Database backup completed: {{ $json.filename }}\"\n },\n \"name\": \"Notify Slack\",\n \"type\": \"n8n-nodes-base.slack\",\n \"position\": [1050, 300],\n \"credentials\": {\"slackApi\": {\"id\": \"1\", \"name\": \"Slack\"}}\n }\n ],\n \"connections\": {\n \"Daily Trigger\": {\"main\": [[{\"node\": \"Get Tables\", \"type\": \"main\", \"index\": 0}]]},\n \"Get Tables\": {\"main\": [[{\"node\": \"Format Backup\", \"type\": \"main\", \"index\": 0}]]},\n \"Format Backup\": {\"main\": [[{\"node\": \"Upload to Drive\", \"type\": \"main\", \"index\": 0}]]},\n \"Upload to Drive\": {\"main\": [[{\"node\": \"Notify Slack\", \"type\": \"main\", \"index\": 0}]]}\n }\n}\n```\n\n**Setup:**\n1. Import workflow\n2. Connect: PostgreSQL, Google Drive, Slack credentials\n3. Update `folderId` with your Drive folder\n4. Activate workflow", "metadata": {"type": "workflow_json", "use_case": "database_backup", "complexity": "intermediate"}}
|
| 17 |
+
{"instruction": "Create a workflow JSON for lead capture form to CRM", "output": "Here's a complete lead capture workflow:\n\n```json\n{\n \"name\": \"Lead Capture to CRM\",\n \"nodes\": [\n {\n \"parameters\": {\n \"httpMethod\": \"POST\",\n \"path\": \"lead-capture\",\n \"responseMode\": \"responseNode\",\n \"options\": {\"rawBody\": false}\n },\n \"name\": \"Lead Form Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"position\": [200, 300]\n },\n {\n \"parameters\": {\n \"jsCode\": \"const lead = $input.first().json;\\n\\n// Validate required fields\\nconst required = ['name', 'email', 'phone'];\\nconst missing = required.filter(f => !lead[f]);\\n\\nif (missing.length > 0) {\\n throw new Error(`Missing fields: ${missing.join(', ')}`);\\n}\\n\\n// Normalize data\\nreturn {\\n json: {\\n name: lead.name.trim(),\\n email: lead.email.toLowerCase().trim(),\\n phone: lead.phone.replace(/\\\\D/g, ''),\\n source: lead.source || 'website',\\n created_at: new Date().toISOString()\\n }\\n};\"\n },\n \"name\": \"Validate & Normalize\",\n \"type\": \"n8n-nodes-base.code\",\n \"position\": [400, 300]\n },\n {\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"email\": \"={{ $json.email }}\",\n \"additionalFields\": {\n \"firstName\": \"={{ $json.name.split(' ')[0] }}\",\n \"lastName\": \"={{ $json.name.split(' ').slice(1).join(' ') }}\",\n \"phone\": \"={{ $json.phone }}\"\n }\n },\n \"name\": \"Create HubSpot Contact\",\n \"type\": \"n8n-nodes-base.hubspot\",\n \"position\": [600, 300],\n \"credentials\": {\"hubspotApi\": {\"id\": \"1\", \"name\": \"HubSpot\"}}\n },\n {\n \"parameters\": {\n \"fromEmail\": \"sales@company.com\",\n \"toEmail\": \"={{ $json.email }}\",\n \"subject\": \"Thanks for reaching out!\",\n \"text\": \"Hi {{ $json.name }},\\n\\nThanks for your interest! We'll be in touch within 24 hours.\\n\\nBest,\\nThe Team\"\n },\n \"name\": \"Send Welcome Email\",\n \"type\": \"n8n-nodes-base.emailSend\",\n \"position\": [800, 300],\n \"credentials\": {\"smtp\": {\"id\": \"1\", \"name\": \"SMTP\"}}\n },\n {\n \"parameters\": {\n \"channel\": \"#leads\",\n \"text\": \"=🎯 New Lead!\\n*Name:* {{ $json.name }}\\n*Email:* {{ $json.email }}\\n*Source:* {{ $json.source }}\"\n },\n \"name\": \"Notify Sales Team\",\n \"type\": \"n8n-nodes-base.slack\",\n \"position\": [1000, 300],\n \"credentials\": {\"slackApi\": {\"id\": \"1\", \"name\": \"Slack\"}}\n },\n {\n \"parameters\": {\n \"respondWith\": \"json\",\n \"responseBody\": \"={ \\\"success\\\": true, \\\"message\\\": \\\"Thanks! We'll be in touch.\\\" }\"\n },\n \"name\": \"Success Response\",\n \"type\": \"n8n-nodes-base.respondToWebhook\",\n \"position\": [1200, 300]\n }\n ],\n \"connections\": {\n \"Lead Form Webhook\": {\"main\": [[{\"node\": \"Validate & Normalize\", \"type\": \"main\", \"index\": 0}]]},\n \"Validate & Normalize\": {\"main\": [[{\"node\": \"Create HubSpot Contact\", \"type\": \"main\", \"index\": 0}]]},\n \"Create HubSpot Contact\": {\"main\": [[{\"node\": \"Send Welcome Email\", \"type\": \"main\", \"index\": 0}]]},\n \"Send Welcome Email\": {\"main\": [[{\"node\": \"Notify Sales Team\", \"type\": \"main\", \"index\": 0}]]},\n \"Notify Sales Team\": {\"main\": [[{\"node\": \"Success Response\", \"type\": \"main\", \"index\": 0}]]}\n }\n}\n```\n\n**Features:**\n- Input validation\n- Data normalization\n- CRM integration\n- Welcome email\n- Team notification\n- Webhook response\n\n**Test:**\n```bash\ncurl -X POST https://your-n8n.com/webhook/lead-capture \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\":\"John Doe\",\"email\":\"john@example.com\",\"phone\":\"555-1234\"}'\n```", "metadata": {"type": "workflow_json", "use_case": "lead_capture", "complexity": "intermediate"}}
|
docs-dataset/categorized/categorization_summary.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total_examples": 28654,
|
| 3 |
+
"distribution": {
|
| 4 |
+
"use_case": {
|
| 5 |
+
"automation_general": 24865,
|
| 6 |
+
"data_pipeline": 507,
|
| 7 |
+
"messaging": 257,
|
| 8 |
+
"file_management": 204,
|
| 9 |
+
"ecommerce": 149,
|
| 10 |
+
"ai_ml": 1975,
|
| 11 |
+
"lead_gen": 298,
|
| 12 |
+
"crm": 136,
|
| 13 |
+
"devops": 119,
|
| 14 |
+
"scheduling": 28,
|
| 15 |
+
"marketing": 18,
|
| 16 |
+
"analytics": 19,
|
| 17 |
+
"social_media": 79
|
| 18 |
+
},
|
| 19 |
+
"complexity": {
|
| 20 |
+
"beginner": 25453,
|
| 21 |
+
"intermediate": 1904,
|
| 22 |
+
"advanced": 841,
|
| 23 |
+
"enterprise": 456
|
| 24 |
+
},
|
| 25 |
+
"integration_type": {
|
| 26 |
+
"webhook": 27410,
|
| 27 |
+
"cron": 183,
|
| 28 |
+
"oauth": 285,
|
| 29 |
+
"file_based": 393,
|
| 30 |
+
"database": 325,
|
| 31 |
+
"message_queue": 47,
|
| 32 |
+
"api_key": 11
|
| 33 |
+
},
|
| 34 |
+
"industry": {
|
| 35 |
+
"general_business": 25628,
|
| 36 |
+
"real_estate": 207,
|
| 37 |
+
"ecommerce": 2475,
|
| 38 |
+
"finance": 95,
|
| 39 |
+
"healthcare": 31,
|
| 40 |
+
"education": 29,
|
| 41 |
+
"saas": 97,
|
| 42 |
+
"marketing_agency": 92
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"generated_at": "Wed 12/31/2025"
|
| 46 |
+
}
|
docs-dataset/categorized/debugging_dataset_expanded.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/categorized/marketing_seo_training.jsonl
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "What is Generative Engine Optimization (GEO) and how does it differ from traditional SEO?", "input": "", "output": "# Generative Engine Optimization (GEO)\n\n**Definition**: GEO is the practice of optimizing content to appear in AI-generated responses from systems like ChatGPT, Google AI Overview, Perplexity, and Claude.\n\n## Key Differences from Traditional SEO\n\n| Aspect | Traditional SEO | GEO |\n|--------|----------------|-----|\n| **Target** | Search engine results pages (SERPs) | AI-generated answers |\n| **Metrics** | Rankings, CTR, impressions | Citation frequency, source attribution |\n| **Content Style** | Keyword-focused | Comprehensive, authoritative |\n| **Structure** | Meta tags, headings | Semantic clarity, factual density |\n\n## Core GEO Strategies\n\n1. **Establish Topical Authority**\n - Create comprehensive pillar pages\n - Interlink related content\n - Cover topics exhaustively\n\n2. **Optimize for Citation**\n - Use clear, quotable statements\n - Include data, statistics, and facts\n - Cite authoritative sources\n\n3. **Structured Data Implementation**\n - JSON-LD schema markup\n - FAQ schema\n - HowTo schema\n - Organization schema\n\n4. **Content Format**\n - Use definition patterns: \"X is...\"\n - Include step-by-step instructions\n - Provide comparison tables\n - Add concrete examples\n\n## Implementation in n8n\n\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Analyze Content for GEO\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Check GEO optimization score\\nconst content = $json.content;\\nconst score = {\\n hasDefinitions: /is a|refers to|means/i.test(content),\\n hasStats: /\\\\d+%|\\\\d+ percent/i.test(content),\\n hasSteps: /step \\\\d|first,|then,/i.test(content)\\n};\\nreturn { score };\"\n }\n }\n ]\n}\n```", "metadata": {"topic": "GEO", "type": "concept", "priority": "high", "use_case": "ai_ml", "complexity": "beginner", "integration_type": "webhook", "industry": "general_business"}}
|
| 2 |
+
{"instruction": "How do I optimize content for Answer Engine Optimization (AEO) to appear in featured snippets?", "input": "", "output": "# Answer Engine Optimization (AEO) Guide\n\n**AEO** focuses on structuring content to directly answer user questions, targeting featured snippets and voice search results.\n\n## Featured Snippet Types & Optimization\n\n### 1. Paragraph Snippets (Most Common)\n- Target \"what is\", \"why\", \"how does\" queries\n- Provide 40-60 word direct answers\n- Place answer immediately after the H2\n\n**Example Structure**:\n```html\n<h2>What is Answer Engine Optimization?</h2>\n<p>Answer Engine Optimization (AEO) is the process of optimizing content \nto provide direct answers to user queries, increasing visibility in \nfeatured snippets, voice search results, and AI-generated responses.</p>\n```\n\n### 2. List Snippets\n- Use numbered or bulleted lists\n- Include 4-8 items\n- Start each item with action verbs\n\n### 3. Table Snippets\n- Use comparison tables\n- Include clear headers\n- Limit to 3-4 columns\n\n## AEO Implementation Checklist\n\n- [ ] Identify question-based keywords\n- [ ] Structure content with clear Q&A format\n- [ ] Use schema markup (FAQPage, HowTo)\n- [ ] Optimize for voice search (conversational)\n- [ ] Include \"People Also Ask\" targets\n\n## n8n Workflow for AEO Analysis\n\n```json\n{\n \"name\": \"AEO Content Analyzer\",\n \"nodes\": [\n {\n \"name\": \"Fetch Content\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"={{ $json.pageUrl }}\"\n }\n },\n {\n \"name\": \"Check FAQ Schema\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const html = $json.body;\\nconst hasFAQSchema = html.includes('FAQPage');\\nreturn { hasFAQSchema };\"\n }\n }\n ]\n}\n```\n\n## Voice Search Optimization Tips\n\n1. Use natural, conversational language\n2. Target long-tail question queries\n3. Optimize for local intent (\"near me\")\n4. Provide concise, speakable answers (< 30 words)", "metadata": {"topic": "AEO", "type": "guide", "priority": "high", "use_case": "ai_ml", "complexity": "beginner", "integration_type": "webhook", "industry": "general_business"}}
|
| 3 |
+
{"instruction": "Explain LLM SEO strategies for getting cited by AI chatbots like ChatGPT and Claude", "input": "", "output": "# LLM SEO: Optimizing for AI Chatbot Citations\n\n**LLM SEO** is the emerging practice of optimizing content so Large Language Models cite your website in their responses.\n\n## How LLMs Choose Sources\n\n1. **Training Data**: Content that was in training datasets\n2. **RAG Systems**: Real-time retrieval from indexed sources\n3. **Authority Signals**: Domain reputation, backlinks, mentions\n4. **Content Quality**: Accuracy, depth, recency\n\n## Core LLM SEO Strategies\n\n### 1. Establish Entity Authority\n- Build Wikipedia presence\n- Get mentioned in authoritative sources\n- Create comprehensive \"About\" pages\n- Use consistent NAP (Name, Address, Phone)\n\n### 2. Create Citation-Worthy Content\n\n**Best Practices**:\n- Include original research and data\n- Provide unique insights not available elsewhere\n- Use clear, quotable statements\n- Update content regularly\n\n**Example Citation-Worthy Format**:\n```\nAccording to [Your Brand] research, 73% of marketers now \nprioritize AI search optimization in their 2025 strategy.\n```\n\n### 3. Technical Optimization\n\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Article\",\n \"author\": {\n \"@type\": \"Organization\",\n \"name\": \"Your Brand\",\n \"url\": \"https://yourdomain.com\"\n },\n \"datePublished\": \"2024-01-15\",\n \"dateModified\": \"2024-12-01\"\n}\n```\n\n### 4. Content Structure for LLM Parsing\n\n- Use clear hierarchical headings\n- Include TL;DR summaries at the top\n- Provide structured data (tables, lists)\n- Add glossary definitions\n\n## Measurement & Tracking\n\n| Metric | Tool | Target |\n|--------|------|--------|\n| Brand mentions in AI | Manual sampling | Track monthly |\n| Knowledge Panel presence | Google Search | Establish/maintain |\n| Authoritative backlinks | Ahrefs/Semrush | Increase 10%/quarter |\n\n## n8n Workflow: Monitor AI Citations\n\n```json\n{\n \"name\": \"AI Citation Monitor\",\n \"nodes\": [\n {\n \"name\": \"Query ChatGPT\",\n \"type\": \"n8n-nodes-base.openAi\",\n \"parameters\": {\n \"prompt\": \"Who are the leading experts in {{ $json.topic }}?\"\n }\n },\n {\n \"name\": \"Check for Brand Mention\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.response }}\",\n \"operation\": \"contains\",\n \"value2\": \"Your Brand\"\n }]\n }\n }\n }\n ]\n}\n```", "metadata": {"topic": "LLM_SEO", "type": "strategy", "priority": "high", "use_case": "ai_ml", "complexity": "intermediate", "integration_type": "webhook", "industry": "general_business"}}
|
| 4 |
+
{"instruction": "How do I create an automated SEO audit workflow in n8n?", "input": "", "output": "# Automated SEO Audit Workflow in n8n\n\nBuild a comprehensive SEO audit system that checks on-page, technical, and content factors.\n\n## Complete n8n Workflow\n\n```json\n{\n \"name\": \"Automated SEO Audit\",\n \"nodes\": [\n {\n \"name\": \"Start\",\n \"type\": \"n8n-nodes-base.manualTrigger\",\n \"position\": [250, 300]\n },\n {\n \"name\": \"Set URLs\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\n \"string\": [\n {\"name\": \"targetUrl\", \"value\": \"https://example.com\"}\n ]\n }\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Fetch Page\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"={{ $json.targetUrl }}\",\n \"options\": {\"timeout\": 30000}\n },\n \"position\": [650, 300]\n },\n {\n \"name\": \"SEO Analysis\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const html = $json.body;\\nconst url = $json.targetUrl;\\n\\n// Extract SEO elements\\nconst titleMatch = html.match(/<title>([^<]+)<\\\\/title>/i);\\nconst h1Match = html.match(/<h1[^>]*>([^<]+)<\\\\/h1>/i);\\nconst metaDescMatch = html.match(/<meta[^>]*name=\\\"description\\\"[^>]*content=\\\"([^\\\"]+)\\\"/i);\\nconst canonicalMatch = html.match(/<link[^>]*rel=\\\"canonical\\\"[^>]*href=\\\"([^\\\"]+)\\\"/i);\\n\\n// Check for robots directives\\nconst hasNoIndex = /noindex/i.test(html);\\nconst hasNoFollow = /nofollow/i.test(html);\\n\\n// Count elements\\nconst h2Count = (html.match(/<h2/gi) || []).length;\\nconst imgCount = (html.match(/<img/gi) || []).length;\\nconst imgNoAlt = (html.match(/<img(?![^>]*alt=)/gi) || []).length;\\n\\n// Calculate scores\\nconst issues = [];\\nlet score = 100;\\n\\nif (!titleMatch) {\\n issues.push('Missing title tag');\\n score -= 15;\\n}\\nif (!h1Match) {\\n issues.push('Missing H1 tag');\\n score -= 10;\\n}\\nif (!metaDescMatch) {\\n issues.push('Missing meta description');\\n score -= 10;\\n}\\nif (hasNoIndex) {\\n issues.push('Page has noindex directive');\\n score -= 20;\\n}\\nif (imgNoAlt > 0) {\\n issues.push(`${imgNoAlt} images missing alt text`);\\n score -= imgNoAlt * 2;\\n}\\n\\nreturn {\\n url,\\n score: Math.max(0, score),\\n title: titleMatch ? titleMatch[1] : null,\\n h1: h1Match ? h1Match[1] : null,\\n metaDescription: metaDescMatch ? metaDescMatch[1] : null,\\n canonical: canonicalMatch ? canonicalMatch[1] : null,\\n h2Count,\\n imgCount,\\n imgNoAlt,\\n issues\\n};\"\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Generate Report\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const data = $json;\\nconst report = `# SEO Audit Report\\n\\n**URL**: ${data.url}\\n**Score**: ${data.score}/100\\n\\n## Elements Found\\n- Title: ${data.title || 'MISSING'}\\n- H1: ${data.h1 || 'MISSING'}\\n- Meta Description: ${data.metaDescription ? 'Present' : 'MISSING'}\\n\\n## Issues Found\\n${data.issues.map(i => '- ' + i).join('\\\\n')}`\\n\\nreturn { report };\"\n },\n \"position\": [1050, 300]\n }\n ],\n \"connections\": {\n \"Start\": {\"main\": [[{\"node\": \"Set URLs\", \"type\": \"main\", \"index\": 0}]]},\n \"Set URLs\": {\"main\": [[{\"node\": \"Fetch Page\", \"type\": \"main\", \"index\": 0}]]},\n \"Fetch Page\": {\"main\": [[{\"node\": \"SEO Analysis\", \"type\": \"main\", \"index\": 0}]]},\n \"SEO Analysis\": {\"main\": [[{\"node\": \"Generate Report\", \"type\": \"main\", \"index\": 0}]]}\n }\n}\n```\n\n## Audit Checks Included\n\n1. **On-Page SEO**\n - Title tag presence and length\n - H1 tag presence\n - Meta description\n - Heading hierarchy\n\n2. **Technical SEO**\n - Canonical URL\n - Robots directives\n - Image alt text\n\n3. **Reporting**\n - Score calculation\n - Issue identification\n - Markdown report generation\n\n## Extended Integrations\n\n- **Ahrefs API**: Backlink analysis\n- **Google Search Console**: Search performance data\n- **PageSpeed Insights**: Core Web Vitals", "metadata": {"topic": "SEO_automation", "type": "workflow", "priority": "high", "use_case": "automation_general", "complexity": "advanced", "integration_type": "webhook", "industry": "general_business"}}
|
| 5 |
+
{"instruction": "How do I build a lead nurturing funnel in n8n with GoHighLevel?", "input": "", "output": "# Lead Nurturing Funnel: n8n + GoHighLevel Integration\n\nBuild an automated lead nurturing system that scores, segments, and nurtures leads based on behavior.\n\n## Architecture Overview\n\n```\nWebhook (Lead Capture) \u2192 Lead Scoring \u2192 Segment Assignment \u2192 Nurture Sequence\n \u2193\n Sales Alert \u2190 Hot Lead Detection \u2190 Engagement Tracking\n```\n\n## Complete Workflow\n\n```json\n{\n \"name\": \"GHL Lead Nurturing Funnel\",\n \"nodes\": [\n {\n \"name\": \"Webhook Trigger\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"lead-capture\",\n \"httpMethod\": \"POST\"\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Lead Scoring\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const lead = $json.body;\\nlet score = 0;\\n\\n// Score based on form data\\nif (lead.company_size > 100) score += 20;\\nif (lead.budget === 'high') score += 25;\\nif (lead.timeline === 'immediate') score += 20;\\nif (lead.source === 'referral') score += 15;\\n\\n// Score based on engagement\\nif (lead.pages_viewed > 5) score += 10;\\nif (lead.time_on_site > 300) score += 10;\\n\\nreturn { ...lead, leadScore: score, segment: score > 60 ? 'hot' : score > 30 ? 'warm' : 'cold' };\"\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Route by Segment\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": {\n \"rules\": [\n {\"value\": \"hot\"},\n {\"value\": \"warm\"},\n {\"value\": \"cold\"}\n ]\n }\n },\n \"position\": [650, 300]\n },\n {\n \"name\": \"Add to GHL - Hot Pipeline\",\n \"type\": \"n8n-nodes-base.highLevel\",\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"additionalFields\": {\n \"pipelineId\": \"hot_lead_pipeline\",\n \"tags\": [\"hot-lead\", \"priority\"]\n }\n },\n \"position\": [850, 200]\n },\n {\n \"name\": \"Add to GHL - Warm Nurture\",\n \"type\": \"n8n-nodes-base.highLevel\",\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"additionalFields\": {\n \"workflowId\": \"nurture_sequence_warm\"\n }\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Add to GHL - Cold Campaign\",\n \"type\": \"n8n-nodes-base.highLevel\",\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"additionalFields\": {\n \"workflowId\": \"nurture_sequence_cold\"\n }\n },\n \"position\": [850, 400]\n },\n {\n \"name\": \"Notify Sales Team\",\n \"type\": \"n8n-nodes-base.slack\",\n \"parameters\": {\n \"channel\": \"#sales-alerts\",\n \"text\": \"\ud83d\udd25 Hot Lead: {{ $json.email }}\\nScore: {{ $json.leadScore }}\\nCompany: {{ $json.company }}\"\n },\n \"position\": [1050, 200]\n }\n ]\n}\n```\n\n## Lead Scoring Framework\n\n| Factor | Points | Criteria |\n|--------|--------|----------|\n| Company Size | +20 | > 100 employees |\n| Budget | +25 | \"High\" selected |\n| Timeline | +20 | \"Immediate\" need |\n| Referral Source | +15 | Came from referral |\n| Page Views | +10 | > 5 pages viewed |\n| Time on Site | +10 | > 5 minutes |\n\n## Segment Actions\n\n**Hot Leads (60+ points)**:\n- Immediate sales notification\n- Add to priority pipeline\n- Direct outreach within 1 hour\n\n**Warm Leads (30-60 points)**:\n- 7-day email nurture sequence\n- Weekly value content\n- Retargeting ads\n\n**Cold Leads (<30 points)**:\n- Monthly newsletter\n- Educational content\n- Long-term nurturing", "metadata": {"topic": "marketing_automation", "type": "workflow", "priority": "high", "use_case": "automation_general", "complexity": "intermediate", "integration_type": "webhook", "industry": "general_business"}}
|
| 6 |
+
{"instruction": "How do I track marketing ROI and CAC/LTV metrics with n8n?", "input": "", "output": "# Marketing ROI & Metrics Tracking with n8n\n\nBuild automated dashboards tracking Customer Acquisition Cost (CAC), Lifetime Value (LTV), and ROI.\n\n## Key Metrics Formulas\n\n```\nCAC = Total Marketing Spend / New Customers Acquired\nLTV = Average Revenue Per Customer \u00d7 Average Customer Lifespan\nROI = (Revenue - Marketing Spend) / Marketing Spend \u00d7 100\nLTV:CAC Ratio = LTV / CAC (Target: 3:1 or higher)\n```\n\n## n8n Workflow for ROI Tracking\n\n```json\n{\n \"name\": \"Marketing ROI Dashboard\",\n \"nodes\": [\n {\n \"name\": \"Schedule Trigger\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"parameters\": {\n \"rule\": {\"interval\": [{\"field\": \"weeks\", \"weeks\": 1}]}\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Fetch Ad Spend - Google\",\n \"type\": \"n8n-nodes-base.googleAds\",\n \"parameters\": {\n \"operation\": \"getCampaigns\",\n \"dateRange\": \"LAST_30_DAYS\"\n },\n \"position\": [450, 200]\n },\n {\n \"name\": \"Fetch Ad Spend - Facebook\",\n \"type\": \"n8n-nodes-base.facebookAds\",\n \"parameters\": {\n \"operation\": \"getInsights\",\n \"datePreset\": \"last_30d\"\n },\n \"position\": [450, 400]\n },\n {\n \"name\": \"Fetch Revenue Data\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"select\",\n \"table\": \"orders\",\n \"options\": {\n \"conditions\": \"created_at > NOW() - INTERVAL '30 days'\"\n }\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Merge Data\",\n \"type\": \"n8n-nodes-base.merge\",\n \"parameters\": {\"mode\": \"append\"},\n \"position\": [650, 300]\n },\n {\n \"name\": \"Calculate Metrics\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const data = $json;\\n\\n// Aggregate spend\\nconst totalSpend = data.reduce((sum, item) => sum + (item.spend || 0), 0);\\n\\n// Count new customers\\nconst newCustomers = data.filter(item => item.type === 'order' && item.is_new_customer).length;\\n\\n// Calculate revenue\\nconst revenue = data.filter(item => item.type === 'order').reduce((sum, item) => sum + item.amount, 0);\\n\\n// Calculate metrics\\nconst CAC = newCustomers > 0 ? totalSpend / newCustomers : 0;\\nconst ROI = totalSpend > 0 ? ((revenue - totalSpend) / totalSpend * 100) : 0;\\nconst ROAS = totalSpend > 0 ? revenue / totalSpend : 0;\\n\\nreturn {\\n period: 'Last 30 Days',\\n totalSpend,\\n newCustomers,\\n revenue,\\n CAC: CAC.toFixed(2),\\n ROI: ROI.toFixed(1) + '%',\\n ROAS: ROAS.toFixed(2) + 'x'\\n};\"\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Store in Database\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"marketing_metrics\"\n },\n \"position\": [1050, 200]\n },\n {\n \"name\": \"Send Report\",\n \"type\": \"n8n-nodes-base.slack\",\n \"parameters\": {\n \"channel\": \"#marketing\",\n \"text\": \"\ud83d\udcca Weekly Marketing Report\\n\\n\ud83d\udcb0 Spend: ${{ $json.totalSpend }}\\n\ud83d\udc65 New Customers: {{ $json.newCustomers }}\\n\ud83d\udcb5 Revenue: ${{ $json.revenue }}\\n\ud83d\udcc8 CAC: ${{ $json.CAC }}\\n\ud83c\udfaf ROI: {{ $json.ROI }}\\n\u21a9\ufe0f ROAS: {{ $json.ROAS }}\"\n },\n \"position\": [1050, 400]\n }\n ]\n}\n```\n\n## Attribution Models\n\n### Last-Touch Attribution\n```javascript\n// Credit the last interaction before conversion\nconst lastTouch = customer.interactions.slice(-1)[0];\nchannelCredits[lastTouch.channel] += 1;\n```\n\n### Linear Attribution\n```javascript\n// Equal credit to all touchpoints\nconst creditPerTouch = 1 / customer.interactions.length;\ncustomer.interactions.forEach(i => {\n channelCredits[i.channel] += creditPerTouch;\n});\n```\n\n### Time-Decay Attribution\n```javascript\n// More credit to recent interactions\ncustomer.interactions.forEach((interaction, index) => {\n const weight = Math.pow(2, index - customer.interactions.length + 1);\n channelCredits[interaction.channel] += weight;\n});\n```\n\n## Recommended Benchmarks\n\n| Metric | Good | Great | Excellent |\n|--------|------|-------|-----------|\n| LTV:CAC | 3:1 | 4:1 | 5:1+ |\n| ROI | 100% | 200% | 400%+ |\n| ROAS | 2x | 4x | 6x+ |\n| Payback Period | 12 mo | 6 mo | 3 mo |", "metadata": {"topic": "marketing_metrics", "type": "workflow", "priority": "high", "use_case": "analytics", "complexity": "advanced", "integration_type": "cron", "industry": "ecommerce"}}
|
| 7 |
+
{"instruction": "How do I set up multi-channel marketing automation with n8n?", "input": "", "output": "# Multi-Channel Marketing Automation with n8n\n\nOrchestrate campaigns across Email, SMS, WhatsApp, LinkedIn, and Paid Ads from a single workflow.\n\n## Channel Integration Architecture\n\n```\nCampaign Trigger \u2192 Audience Segmentation \u2192 Channel Router \u2192 Multi-Channel Delivery\n \u251c\u2500\u2500 Email (Mailchimp/SendGrid)\n \u251c\u2500\u2500 SMS (Twilio/MessageBird)\n \u251c\u2500\u2500 WhatsApp (360dialog)\n \u251c\u2500\u2500 LinkedIn (API)\n \u2514\u2500\u2500 Retargeting (FB/Google)\n```\n\n## Unified Campaign Workflow\n\n```json\n{\n \"name\": \"Multi-Channel Campaign\",\n \"nodes\": [\n {\n \"name\": \"Campaign Trigger\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"campaign/launch\"\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Fetch Audience\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"select\",\n \"table\": \"contacts\",\n \"conditions\": \"segment = '{{ $json.targetSegment }}'\"\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Split by Preference\",\n \"type\": \"n8n-nodes-base.splitInBatches\",\n \"position\": [650, 300]\n },\n {\n \"name\": \"Channel Router\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": {\n \"rules\": [\n {\"output\": 0, \"value\": \"email\"},\n {\"output\": 1, \"value\": \"sms\"},\n {\"output\": 2, \"value\": \"whatsapp\"},\n {\"output\": 3, \"value\": \"linkedin\"}\n ]\n },\n \"expression\": \"={{ $json.preferred_channel }}\"\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Send Email\",\n \"type\": \"n8n-nodes-base.sendGrid\",\n \"parameters\": {\n \"toEmail\": \"={{ $json.email }}\",\n \"subject\": \"={{ $json.campaignSubject }}\",\n \"content\": \"={{ $json.campaignContent }}\"\n },\n \"position\": [1050, 100]\n },\n {\n \"name\": \"Send SMS\",\n \"type\": \"n8n-nodes-base.twilio\",\n \"parameters\": {\n \"to\": \"={{ $json.phone }}\",\n \"body\": \"={{ $json.smsContent }}\"\n },\n \"position\": [1050, 250]\n },\n {\n \"name\": \"Send WhatsApp\",\n \"type\": \"n8n-nodes-base.whatsApp\",\n \"parameters\": {\n \"to\": \"={{ $json.phone }}\",\n \"template\": \"campaign_template_1\"\n },\n \"position\": [1050, 400]\n },\n {\n \"name\": \"LinkedIn Outreach\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.linkedin.com/v2/messages\",\n \"method\": \"POST\"\n },\n \"position\": [1050, 550]\n },\n {\n \"name\": \"Merge Results\",\n \"type\": \"n8n-nodes-base.merge\",\n \"parameters\": {\"mode\": \"append\"},\n \"position\": [1250, 300]\n },\n {\n \"name\": \"Log Engagement\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"campaign_logs\"\n },\n \"position\": [1450, 300]\n }\n ]\n}\n```\n\n## Channel Best Practices\n\n### Email\n- Send Tuesday-Thursday, 10am-2pm\n- Subject line < 50 characters\n- Personalize with {{firstName}}\n- A/B test subject lines\n\n### SMS\n- Keep under 160 characters\n- Include clear CTA\n- Respect quiet hours (9am-9pm)\n- Provide opt-out\n\n### WhatsApp\n- Use approved templates\n- Rich media support\n- 24-hour response window\n- High open rates (98%)\n\n### LinkedIn\n- Personalize connection requests\n- Send InMail sequentially\n- Limit to 100 connections/week\n- Follow up within 3 days\n\n## Engagement Tracking\n\n```javascript\n// Track engagement across channels\nconst engagement = {\n email: {opens: 45, clicks: 12, ctr: 0.27},\n sms: {delivered: 100, responses: 8, rate: 0.08},\n whatsapp: {read: 98, replies: 15, rate: 0.15},\n linkedin: {accepted: 32, replies: 5, rate: 0.16}\n};\n\n// Calculate weighted engagement score\nconst channelWeights = {email: 1, sms: 1.2, whatsapp: 1.5, linkedin: 2};\nconst score = Object.keys(engagement).reduce((sum, ch) => \n sum + engagement[ch].rate * channelWeights[ch], 0\n);\n```", "metadata": {"topic": "multi_channel_marketing", "type": "workflow", "priority": "high", "use_case": "marketing", "complexity": "advanced", "integration_type": "webhook", "industry": "marketing_agency"}}
|
| 8 |
+
{"instruction": "How do I sync contacts between Odoo CRM and n8n for automated sales workflows?", "input": "", "output": "# Odoo CRM + n8n Integration for Sales Automation\n\nBidirectional sync between Odoo CRM and n8n for automated lead management, opportunity tracking, and sales workflows.\n\n## Odoo API Connection Setup\n\n```json\n{\n \"credentials\": {\n \"odoo\": {\n \"url\": \"https://your-instance.odoo.com\",\n \"database\": \"your_db\",\n \"username\": \"api_user\",\n \"password\": \"your_api_key\"\n }\n }\n}\n```\n\n## Sync Workflow: New Leads to Odoo\n\n```json\n{\n \"name\": \"Lead Capture to Odoo\",\n \"nodes\": [\n {\n \"name\": \"Webhook - New Lead\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"lead-capture\",\n \"httpMethod\": \"POST\"\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Create Odoo Lead\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"lead\",\n \"operation\": \"create\",\n \"fields\": {\n \"name\": \"={{ $json.subject }}\",\n \"email_from\": \"={{ $json.email }}\",\n \"phone\": \"={{ $json.phone }}\",\n \"description\": \"={{ $json.message }}\",\n \"partner_name\": \"={{ $json.company }}\"\n }\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Assign Sales Team\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"lead\",\n \"operation\": \"update\",\n \"leadId\": \"={{ $json.id }}\",\n \"fields\": {\n \"team_id\": \"={{ $json.region === 'west' ? 1 : 2 }}\",\n \"user_id\": \"={{ $json.assignedRep }}\"\n }\n },\n \"position\": [650, 300]\n },\n {\n \"name\": \"Create Activity\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"activity\",\n \"operation\": \"create\",\n \"fields\": {\n \"res_model\": \"crm.lead\",\n \"res_id\": \"={{ $json.lead_id }}\",\n \"activity_type_id\": 2,\n \"summary\": \"Initial follow-up call\",\n \"date_deadline\": \"={{ $today.plus({days: 1}).toISODate() }}\"\n }\n },\n \"position\": [850, 300]\n }\n ]\n}\n```\n\n## Opportunity Stage Updates\n\n```json\n{\n \"name\": \"Monitor Odoo Stage Changes\",\n \"nodes\": [\n {\n \"name\": \"Poll Odoo\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"lead\",\n \"operation\": \"getAll\",\n \"filters\": {\n \"write_date\": \">={{ $now.minus({minutes: 5}).toISO() }}\"\n }\n }\n },\n {\n \"name\": \"Check Stage Change\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.stage_id }}\",\n \"operation\": \"equals\",\n \"value2\": \"Won\"\n }]\n }\n }\n },\n {\n \"name\": \"Trigger Onboarding\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"method\": \"POST\",\n \"url\": \"https://n8n.example.com/webhook/onboarding\"\n }\n }\n ]\n}\n```\n\n## Odoo Models Reference\n\n| Model | Description | Key Fields |\n|-------|-------------|------------|\n| `crm.lead` | Leads & Opportunities | name, email_from, phone, stage_id |\n| `res.partner` | Contacts & Companies | name, email, phone, is_company |\n| `mail.activity` | Tasks & Activities | res_model, res_id, activity_type_id |\n| `sale.order` | Sales Orders | partner_id, amount_total, state |\n\n## Error Handling\n\n```javascript\n// Handle Odoo API errors\ntry {\n const result = await odooClient.create('crm.lead', leadData);\n return { success: true, id: result };\n} catch (error) {\n if (error.code === 'DUPLICATE') {\n // Find existing and update instead\n const existing = await odooClient.search('crm.lead', [['email_from', '=', leadData.email_from]]);\n await odooClient.update('crm.lead', existing[0], leadData);\n } else {\n throw error;\n }\n}\n```", "metadata": {"topic": "odoo_integration", "type": "workflow", "priority": "high", "use_case": "automation_general", "complexity": "advanced", "integration_type": "webhook", "industry": "general_business"}}
|
| 9 |
+
{"instruction": "What are the best practices for implementing exponential backoff in n8n workflows?", "input": "", "output": "# Exponential Backoff Implementation in n8n\n\nExponential backoff is crucial for handling rate limits, temporary failures, and API quotas gracefully.\n\n## Exponential Backoff Theory\n\n```\nWait Time = base_delay \u00d7 (2 ^ attempt_number) + random_jitter\n```\n\n**Example with 1s base delay**:\n- Attempt 1: 1s\n- Attempt 2: 2s\n- Attempt 3: 4s\n- Attempt 4: 8s\n- Attempt 5: 16s\n\n## n8n Implementation\n\n### Method 1: Built-in Retry Settings\n\n```json\n{\n \"name\": \"HTTP Request with Retry\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/data\"\n },\n \"retryOnFail\": true,\n \"maxTries\": 5,\n \"waitBetweenTries\": 1000,\n \"continueOnFail\": false\n}\n```\n\n### Method 2: Custom Exponential Backoff\n\n```json\n{\n \"name\": \"Exponential Backoff Workflow\",\n \"nodes\": [\n {\n \"name\": \"Initialize\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\"number\": [\n {\"name\": \"attempt\", \"value\": 0},\n {\"name\": \"maxAttempts\", \"value\": 5},\n {\"name\": \"baseDelay\", \"value\": 1000}\n ]}\n }\n },\n {\n \"name\": \"Make Request\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/data\"\n },\n \"continueOnFail\": true\n },\n {\n \"name\": \"Check Success\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"number\": [{\n \"value1\": \"={{ $json.statusCode }}\",\n \"operation\": \"smaller\",\n \"value2\": 400\n }]\n }\n }\n },\n {\n \"name\": \"Calculate Wait Time\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const attempt = $json.attempt + 1;\\nconst baseDelay = $json.baseDelay;\\nconst maxAttempts = $json.maxAttempts;\\n\\nif (attempt >= maxAttempts) {\\n throw new Error('Max retry attempts reached');\\n}\\n\\n// Calculate exponential delay with jitter\\nconst exponentialDelay = baseDelay * Math.pow(2, attempt);\\nconst jitter = Math.random() * 1000;\\nconst waitTime = Math.min(exponentialDelay + jitter, 32000);\\n\\nreturn { attempt, waitTime, shouldRetry: true };\"\n }\n },\n {\n \"name\": \"Wait\",\n \"type\": \"n8n-nodes-base.wait\",\n \"parameters\": {\n \"amount\": \"={{ $json.waitTime }}\",\n \"unit\": \"milliseconds\"\n }\n }\n ]\n}\n```\n\n### Method 3: Error Trigger Pattern\n\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Error Trigger\",\n \"type\": \"n8n-nodes-base.errorTrigger\"\n },\n {\n \"name\": \"Analyze Error\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const error = $json.execution.error;\\nconst isRetryable = [429, 503, 502, 504].includes(error.httpCode);\\nconst isRateLimit = error.httpCode === 429;\\n\\nlet retryAfter = 60; // default\\nif (error.headers && error.headers['retry-after']) {\\n retryAfter = parseInt(error.headers['retry-after']) || 60;\\n}\\n\\nreturn { isRetryable, isRateLimit, retryAfter };\"\n }\n },\n {\n \"name\": \"Should Retry?\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"boolean\": [{\n \"value1\": \"={{ $json.isRetryable }}\",\n \"value2\": true\n }]\n }\n }\n },\n {\n \"name\": \"Queue for Retry\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"push\",\n \"key\": \"retry_queue\",\n \"data\": \"={{ JSON.stringify($json.originalPayload) }}\"\n }\n }\n ]\n}\n```\n\n## Best Practices\n\n1. **Set Maximum Retries**: Prevent infinite loops (typically 3-5)\n2. **Add Jitter**: Prevent thundering herd problem\n3. **Cap Maximum Delay**: Usually 30-60 seconds\n4. **Log All Retries**: For debugging and monitoring\n5. **Use Circuit Breaker**: Stop retrying after persistent failures\n\n## HTTP Status Code Handling\n\n| Code | Meaning | Should Retry? | Strategy |\n|------|---------|---------------|----------|\n| 429 | Too Many Requests | Yes | Use Retry-After header |\n| 500 | Server Error | Yes | Exponential backoff |\n| 502 | Bad Gateway | Yes | Short delay, then retry |\n| 503 | Service Unavailable | Yes | Exponential backoff |\n| 504 | Gateway Timeout | Yes | Increase timeout, retry |\n| 400 | Bad Request | No | Fix request data |\n| 401 | Unauthorized | No | Refresh credentials |\n| 403 | Forbidden | No | Check permissions |\n| 404 | Not Found | No | Verify URL/resource |", "metadata": {"topic": "error_handling", "type": "best_practice", "priority": "high", "use_case": "automation_general", "complexity": "enterprise", "integration_type": "webhook", "industry": "general_business"}}
|
| 10 |
+
{"instruction": "How do I implement GDPR-compliant data handling in n8n workflows?", "input": "", "output": "# GDPR-Compliant n8n Workflows\n\nEnsure your n8n workflows handle personal data in compliance with GDPR regulations.\n\n## GDPR Core Principles for Workflows\n\n1. **Lawful Basis**: Document why you're processing data\n2. **Data Minimization**: Only collect necessary data\n3. **Purpose Limitation**: Use data only for stated purposes\n4. **Storage Limitation**: Delete data when no longer needed\n5. **Integrity & Confidentiality**: Secure data in transit and at rest\n\n## Data Subject Rights Workflow\n\n```json\n{\n \"name\": \"GDPR Data Subject Request Handler\",\n \"nodes\": [\n {\n \"name\": \"Request Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"gdpr/request\",\n \"httpMethod\": \"POST\"\n }\n },\n {\n \"name\": \"Validate Request\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const request = $json.body;\\nconst validTypes = ['access', 'rectification', 'erasure', 'portability', 'restriction'];\\n\\nif (!validTypes.includes(request.type)) {\\n throw new Error('Invalid request type');\\n}\\n\\nif (!request.email || !request.verification_token) {\\n throw new Error('Missing required fields');\\n}\\n\\nreturn { ...request, validated: true, timestamp: new Date().toISOString() };\"\n }\n },\n {\n \"name\": \"Route by Type\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"expression\": \"={{ $json.type }}\"\n }\n },\n {\n \"name\": \"Handle Access Request\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Collect all data for this user\\nconst email = $json.email;\\n// Query all relevant tables/systems\\nreturn { action: 'compile_data_export', email };\"\n }\n },\n {\n \"name\": \"Handle Erasure Request\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Mark for deletion (with 30-day retention for legal holds)\\nreturn {\\n action: 'schedule_deletion',\\n email: $json.email,\\n scheduled_date: new Date(Date.now() + 30*24*60*60*1000).toISOString(),\\n systems: ['crm', 'email', 'analytics']\\n};\"\n }\n },\n {\n \"name\": \"Log Request\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"gdpr_requests\",\n \"data\": {\n \"email\": \"={{ $json.email }}\",\n \"type\": \"={{ $json.type }}\",\n \"status\": \"processing\",\n \"created_at\": \"={{ $now.toISO() }}\"\n }\n }\n }\n ]\n}\n```\n\n## Consent Management\n\n```json\n{\n \"name\": \"Consent Tracking\",\n \"nodes\": [\n {\n \"name\": \"Consent Form Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\"path\": \"consent\"}\n },\n {\n \"name\": \"Store Consent\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"upsert\",\n \"table\": \"consents\",\n \"data\": {\n \"email\": \"={{ $json.email }}\",\n \"marketing_consent\": \"={{ $json.marketing }}\",\n \"analytics_consent\": \"={{ $json.analytics }}\",\n \"consent_version\": \"v2.1\",\n \"ip_address\": \"={{ $json.ip }}\",\n \"consent_date\": \"={{ $now.toISO() }}\"\n }\n }\n }\n ]\n}\n```\n\n## Data Anonymization Pattern\n\n```javascript\n// Anonymize PII before analytics processing\nfunction anonymize(data) {\n return {\n ...data,\n email: hashEmail(data.email), // One-way hash\n name: null,\n phone: null,\n ip: data.ip.replace(/\\.\\d+$/, '.0'), // Partial IP\n user_id: generatePseudonymousId(data.user_id)\n };\n}\n```\n\n## Required Documentation\n\n- [ ] Data Processing Register\n- [ ] Privacy Impact Assessment\n- [ ] Consent Records\n- [ ] Data Retention Schedule\n- [ ] Breach Response Plan", "metadata": {"topic": "gdpr_compliance", "type": "guide", "priority": "high", "use_case": "marketing", "complexity": "advanced", "integration_type": "webhook", "industry": "ecommerce"}}
|
| 11 |
+
{"instruction": "How do I securely manage API keys and secrets in n8n?", "input": "", "output": "# Secret Management Best Practices in n8n\n\nSecure handling of API keys, credentials, and sensitive data in n8n workflows.\n\n## n8n Built-in Credential Management\n\n### Creating Secure Credentials\n\n1. Navigate to **Settings \u2192 Credentials**\n2. Click **Add Credential**\n3. Select the service type\n4. Enter credentials (stored encrypted at rest)\n\n### Credential Encryption\n\nn8n encrypts credentials using:\n- AES-256-GCM encryption\n- Per-instance encryption key (`N8N_ENCRYPTION_KEY`)\n\n**Set strong encryption key**:\n```bash\nexport N8N_ENCRYPTION_KEY=$(openssl rand -base64 32)\n```\n\n## External Secret Management\n\n### HashiCorp Vault Integration\n\n```json\n{\n \"name\": \"Fetch Secret from Vault\",\n \"nodes\": [\n {\n \"name\": \"Get Vault Token\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://vault.example.com/v1/auth/token/lookup-self\",\n \"headers\": {\n \"X-Vault-Token\": \"{{ $env.VAULT_TOKEN }}\"\n }\n }\n },\n {\n \"name\": \"Fetch Secret\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://vault.example.com/v1/secret/data/api-keys\",\n \"headers\": {\n \"X-Vault-Token\": \"{{ $env.VAULT_TOKEN }}\"\n }\n }\n },\n {\n \"name\": \"Use Secret\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.service.com/data\",\n \"headers\": {\n \"Authorization\": \"Bearer {{ $json.data.data.api_key }}\"\n }\n }\n }\n ]\n}\n```\n\n### AWS Secrets Manager\n\n```json\n{\n \"name\": \"AWS Secrets Manager\",\n \"type\": \"n8n-nodes-base.awsSecretsManager\",\n \"parameters\": {\n \"operation\": \"get\",\n \"secretId\": \"prod/api/stripe\"\n }\n}\n```\n\n## Environment Variable Best Practices\n\n```bash\n# .env file (never commit to git!)\nN8N_ENCRYPTION_KEY=your-secure-key\nSTRIPE_SECRET_KEY=sk_live_xxx\nDATABASE_URL=postgres://user:pass@host/db\n\n# Use in workflows\n{{ $env.STRIPE_SECRET_KEY }}\n```\n\n## Security Checklist\n\n- [ ] Use n8n's credential system (never hardcode)\n- [ ] Set strong `N8N_ENCRYPTION_KEY`\n- [ ] Use environment variables for deployment secrets\n- [ ] Rotate credentials regularly\n- [ ] Audit credential access\n- [ ] Use least-privilege access\n- [ ] Enable audit logging\n- [ ] Use HTTPS exclusively\n\n## Credential Rotation Workflow\n\n```json\n{\n \"name\": \"API Key Rotation\",\n \"nodes\": [\n {\n \"name\": \"Schedule - Weekly\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"parameters\": {\"rule\": {\"interval\": [{\"field\": \"weeks\", \"weeks\": 1}]}}\n },\n {\n \"name\": \"Generate New Key\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"{{ $env.API_PROVIDER }}/keys\",\n \"method\": \"POST\"\n }\n },\n {\n \"name\": \"Update Vault\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://vault.example.com/v1/secret/data/api-keys\",\n \"method\": \"POST\",\n \"body\": {\"data\": {\"api_key\": \"={{ $json.new_key }}\"}}\n }\n },\n {\n \"name\": \"Revoke Old Key\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"{{ $env.API_PROVIDER }}/keys/{{ $json.old_key_id }}\",\n \"method\": \"DELETE\"\n }\n }\n ]\n}\n```", "metadata": {"topic": "secret_management", "type": "best_practice", "priority": "high", "use_case": "data_pipeline", "complexity": "advanced", "integration_type": "api_key", "industry": "ecommerce"}}
|
| 12 |
+
{"instruction": "How do I implement caching in n8n workflows?", "input": "", "output": "# Caching Strategies in n8n Workflows\n\nReduce API calls, improve performance, and lower costs with effective caching.\n\n## Redis-Based Caching\n\n```json\n{\n \"name\": \"Cached API Request\",\n \"nodes\": [\n {\n \"name\": \"Check Cache\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"get\",\n \"key\": \"cache:api:{{ $json.endpoint }}\"\n }\n },\n {\n \"name\": \"Cache Hit?\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.value }}\",\n \"operation\": \"isNotEmpty\"\n }]\n }\n }\n },\n {\n \"name\": \"Return Cached\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\"string\": [{\"name\": \"data\", \"value\": \"={{ JSON.parse($json.value) }}\"}]}\n }\n },\n {\n \"name\": \"Fetch Fresh\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/{{ $json.endpoint }}\"\n }\n },\n {\n \"name\": \"Store in Cache\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"set\",\n \"key\": \"cache:api:{{ $json.endpoint }}\",\n \"value\": \"={{ JSON.stringify($json.data) }}\",\n \"expire\": true,\n \"ttl\": 3600\n }\n }\n ]\n}\n```\n\n## Supabase-Based Caching\n\n```json\n{\n \"name\": \"Database Cache Layer\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"upsert\",\n \"table\": \"cache\",\n \"data\": {\n \"cache_key\": \"={{ $json.key }}\",\n \"data\": \"={{ JSON.stringify($json.response) }}\",\n \"expires_at\": \"={{ $now.plus({hours: 1}).toISO() }}\"\n },\n \"onConflict\": \"cache_key\"\n }\n}\n```\n\n## Cache Invalidation Patterns\n\n### Time-Based (TTL)\n```javascript\n// Set expiration when caching\nconst ttl = 3600; // 1 hour\nawait redis.set(key, value, 'EX', ttl);\n```\n\n### Event-Based Invalidation\n```json\n{\n \"name\": \"Invalidate on Update\",\n \"nodes\": [\n {\n \"name\": \"Webhook - Data Updated\",\n \"type\": \"n8n-nodes-base.webhook\"\n },\n {\n \"name\": \"Delete Cache\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"delete\",\n \"key\": \"cache:{{ $json.entity }}:*\"\n }\n }\n ]\n}\n```\n\n## Caching Best Practices\n\n| Data Type | TTL | Strategy |\n|-----------|-----|----------|\n| Static data | 24h | Long cache |\n| User profiles | 1h | Medium + invalidation |\n| Real-time data | Never | Don't cache |\n| API responses | 5-15min | Short cache |\n| Expensive queries | 1h | Warm on write |", "metadata": {"topic": "caching", "type": "best_practice", "priority": "high", "use_case": "data_pipeline", "complexity": "advanced", "integration_type": "webhook", "industry": "ecommerce"}}
|
| 13 |
+
{"instruction": "How do I implement batch processing for large datasets in n8n?", "input": "", "output": "# Batch Processing for Large Datasets in n8n\n\nProcess thousands of items efficiently without memory issues or timeouts.\n\n## Split in Batches Node\n\n```json\n{\n \"name\": \"Batch Processor\",\n \"nodes\": [\n {\n \"name\": \"Get All Items\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"select\",\n \"table\": \"items\",\n \"returnAll\": true\n }\n },\n {\n \"name\": \"Split Batches\",\n \"type\": \"n8n-nodes-base.splitInBatches\",\n \"parameters\": {\n \"batchSize\": 50,\n \"options\": {}\n }\n },\n {\n \"name\": \"Process Batch\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/bulk\",\n \"method\": \"POST\",\n \"body\": \"={{ $json }}\"\n }\n },\n {\n \"name\": \"Rate Limit Wait\",\n \"type\": \"n8n-nodes-base.wait\",\n \"parameters\": {\n \"amount\": 1,\n \"unit\": \"seconds\"\n }\n },\n {\n \"name\": \"Loop Back\",\n \"type\": \"n8n-nodes-base.noOp\"\n }\n ],\n \"connections\": {\n \"Split Batches\": {\n \"main\": [\n [{\"node\": \"Process Batch\", \"type\": \"main\", \"index\": 0}],\n [{\"node\": \"Complete\", \"type\": \"main\", \"index\": 0}]\n ]\n },\n \"Rate Limit Wait\": {\n \"main\": [[{\"node\": \"Split Batches\", \"type\": \"main\", \"index\": 0}]]\n }\n }\n}\n```\n\n## Memory-Efficient Streaming\n\n```json\n{\n \"name\": \"Stream Large File\",\n \"nodes\": [\n {\n \"name\": \"Read File in Chunks\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const fs = require('fs');\\nconst readline = require('readline');\\n\\nconst stream = fs.createReadStream('/path/to/large-file.csv');\\nconst rl = readline.createInterface({input: stream});\\n\\nconst batch = [];\\nlet batchNum = 0;\\n\\nfor await (const line of rl) {\\n batch.push(parseCsvLine(line));\\n if (batch.length >= 100) {\\n // Process batch\\n await processBatch(batch);\\n batch.length = 0;\\n }\\n}\"\n }\n }\n ]\n}\n```\n\n## Pagination Pattern\n\n```json\n{\n \"name\": \"Paginated API Fetch\",\n \"nodes\": [\n {\n \"name\": \"Initialize\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\n \"number\": [\n {\"name\": \"page\", \"value\": 1},\n {\"name\": \"pageSize\", \"value\": 100}\n ],\n \"boolean\": [{\"name\": \"hasMore\", \"value\": true}]\n }\n }\n },\n {\n \"name\": \"Fetch Page\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/items?page={{ $json.page }}&limit={{ $json.pageSize }}\"\n }\n },\n {\n \"name\": \"Check More Pages\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"number\": [{\n \"value1\": \"={{ $json.items.length }}\",\n \"operation\": \"equal\",\n \"value2\": \"={{ $json.pageSize }}\"\n }]\n }\n }\n },\n {\n \"name\": \"Increment Page\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"return { page: $json.page + 1, pageSize: $json.pageSize };\"\n }\n }\n ]\n}\n```\n\n## Batch Processing Metrics\n\n| Batch Size | Memory Usage | Speed | Use Case |\n|------------|--------------|-------|----------|\n| 10 | Low | Slow | API rate limits |\n| 50 | Medium | Balanced | General processing |\n| 100 | Higher | Fast | Database inserts |\n| 1000 | High | Very fast | Bulk operations |", "metadata": {"topic": "batch_processing", "type": "best_practice", "priority": "high", "use_case": "data_pipeline", "complexity": "advanced", "integration_type": "file_based", "industry": "general_business"}}
|
docs-dataset/categorized/mcp_training_data.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/categorized/n8n_master.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:519fa42a3b6666e6f8da266dabd623cc4e8601570581fbd9d746e639db296a97
|
| 3 |
+
size 299926537
|
docs-dataset/categorized/workflow_logic_dataset.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/cleanup_stats.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"original": 14260,
|
| 3 |
+
"duplicates_removed": 579,
|
| 4 |
+
"empty_removed": 7566,
|
| 5 |
+
"final": 6115
|
| 6 |
+
}
|
docs-dataset/dataset_summary.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total_examples": 14260,
|
| 3 |
+
"file_size_mb": 107.75,
|
| 4 |
+
"sources": {
|
| 5 |
+
"debugging_expanded": 2461,
|
| 6 |
+
"marketing_seo": 13,
|
| 7 |
+
"marketing_master": 422,
|
| 8 |
+
"fullstack": 16,
|
| 9 |
+
"emerging_trends": 11,
|
| 10 |
+
"web_design_seo": 17,
|
| 11 |
+
"remaining_gaps": 11,
|
| 12 |
+
"visual_training": 51,
|
| 13 |
+
"phase1_gaps": 15,
|
| 14 |
+
"phase2_industry": 10,
|
| 15 |
+
"phase3_cases": 14,
|
| 16 |
+
"n8n_master": 2302,
|
| 17 |
+
"conversational": 0,
|
| 18 |
+
"reasoning": 1002,
|
| 19 |
+
"latest_features": 2737,
|
| 20 |
+
"mcp": 500,
|
| 21 |
+
"tech_stack": 2467,
|
| 22 |
+
"vendor": 1795,
|
| 23 |
+
"workflow_logic": 416
|
| 24 |
+
},
|
| 25 |
+
"category_distribution": {
|
| 26 |
+
"use_case": {
|
| 27 |
+
"automation_general": 748,
|
| 28 |
+
"ai_ml": 623,
|
| 29 |
+
"devops": 86,
|
| 30 |
+
"lead_gen": 123,
|
| 31 |
+
"messaging": 190,
|
| 32 |
+
"reporting": 1,
|
| 33 |
+
"data_pipeline": 209,
|
| 34 |
+
"crm": 89,
|
| 35 |
+
"file_management": 106,
|
| 36 |
+
"marketing": 13,
|
| 37 |
+
"ecommerce": 33,
|
| 38 |
+
"analytics": 8,
|
| 39 |
+
"audit_trail": 1,
|
| 40 |
+
"social_media": 53,
|
| 41 |
+
"scheduling": 22,
|
| 42 |
+
"appointment_booking": 1,
|
| 43 |
+
"kpi_tracking": 1,
|
| 44 |
+
"resource_booking": 1,
|
| 45 |
+
"fraud_detection": 1,
|
| 46 |
+
"contracts": 1,
|
| 47 |
+
"ehr_integration": 1,
|
| 48 |
+
"grading": 1,
|
| 49 |
+
"enrollment": 1,
|
| 50 |
+
"dashboards": 1
|
| 51 |
+
},
|
| 52 |
+
"complexity": {
|
| 53 |
+
"beginner": 2018,
|
| 54 |
+
"intermediate": 213,
|
| 55 |
+
"advanced": 50,
|
| 56 |
+
"enterprise": 42
|
| 57 |
+
},
|
| 58 |
+
"integration_type": {
|
| 59 |
+
"webhook": 1828,
|
| 60 |
+
"cron": 83,
|
| 61 |
+
"database": 125,
|
| 62 |
+
"file_based": 206,
|
| 63 |
+
"message_queue": 31,
|
| 64 |
+
"oauth": 29
|
| 65 |
+
},
|
| 66 |
+
"industry": {
|
| 67 |
+
"general_business": 1854,
|
| 68 |
+
"ecommerce": 254,
|
| 69 |
+
"real_estate": 37,
|
| 70 |
+
"finance": 38,
|
| 71 |
+
"saas": 37,
|
| 72 |
+
"marketing_agency": 52,
|
| 73 |
+
"healthcare": 24,
|
| 74 |
+
"education": 16,
|
| 75 |
+
"legal": 2
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
}
|
docs-dataset/debugging_dataset_expanded.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/evaluation_set.jsonl
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"workflow automation\", \"open source\", \"self-hosted\"]", "feature": "", "fix_hint": "", "id": 1, "industry": "", "input": "", "instruction": "What is n8n?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 2 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"npm\", \"docker\", \"cloud\"]", "feature": "", "fix_hint": "", "id": 2, "industry": "", "input": "", "instruction": "How do I install n8n?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 3 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"pricing\", \"control\", \"hosting\"]", "feature": "", "fix_hint": "", "id": 3, "industry": "", "input": "", "instruction": "What's the difference between n8n cloud and self-hosted?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 4 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"expressions\", \"$json\", \"items\"]", "feature": "", "fix_hint": "", "id": 4, "industry": "", "input": "", "instruction": "How do I pass data between nodes?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 5 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"error trigger\", \"try/catch\", \"continue on fail\"]", "feature": "", "fix_hint": "", "id": 5, "industry": "", "input": "", "instruction": "How do I handle errors in n8n?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 6 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"process.env\", \"configuration\", \"secrets\"]", "feature": "", "fix_hint": "", "id": 6, "industry": "", "input": "", "instruction": "How do I use environment variables in n8n?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 7 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"OAuth\", \"credential\", \"webhook\"]", "feature": "", "fix_hint": "", "id": 7, "industry": "", "input": "", "instruction": "How do I connect n8n to Slack?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 8 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "automation", "error_type": "", "expected_topics": "[\"webhook\", \"trigger\", \"endpoint\"]", "feature": "", "fix_hint": "", "id": 8, "industry": "", "input": "", "instruction": "How do I trigger a workflow from external events?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 9 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "automation", "error_type": "", "expected_topics": "[\"cron\", \"schedule trigger\", \"interval\"]", "feature": "", "fix_hint": "", "id": 9, "industry": "", "input": "", "instruction": "How do I schedule workflows to run periodically?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 10 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"loop\", \"counter\", \"backoff\"]", "feature": "", "fix_hint": "", "id": 10, "industry": "", "input": "", "instruction": "How do I implement retry logic?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 11 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"split in batches\", \"wait\", \"merge\"]", "feature": "", "fix_hint": "", "id": 11, "industry": "", "input": "", "instruction": "How do I process items in parallel?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 12 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "api_integration", "error_type": "", "expected_topics": "[\"authentication\", \"header\", \"signature\"]", "feature": "", "fix_hint": "", "id": 12, "industry": "", "input": "", "instruction": "How do I secure my n8n webhook?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 13 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "api_integration", "error_type": "", "expected_topics": "[\"URL\", \"method\", \"activation\"]", "feature": "", "fix_hint": "", "id": 13, "industry": "", "input": "", "instruction": "My webhook isn't receiving data, what should I check?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 14 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"credentials\", \"token\", \"refresh\"]", "feature": "", "fix_hint": "", "id": 14, "industry": "", "input": "", "instruction": "I'm getting 401 errors, how do I fix it?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 15 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"path\", \"optional chaining\", \"previous node\"]", "feature": "", "fix_hint": "", "id": 15, "industry": "", "input": "", "instruction": "Why is my expression returning undefined?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 16 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "api_integration", "error_type": "", "expected_topics": "[\"self-hosted\", \"complexity\", \"pricing\"]", "feature": "", "fix_hint": "", "id": 16, "industry": "", "input": "", "instruction": "When should I use n8n vs Zapier?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 17 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "automation", "error_type": "", "expected_topics": "[\"migration\", \"features\", \"comparison\"]", "feature": "", "fix_hint": "", "id": 17, "industry": "", "input": "", "instruction": "Can n8n replace my current automation tool?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 18 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"queue mode\", \"workers\", \"redis\"]", "feature": "", "fix_hint": "", "id": 18, "industry": "", "input": "", "instruction": "How do I set up n8n for high availability?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "n8n", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 19 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "automation", "error_type": "", "expected_topics": "[\"isolation\", \"tenant ID\", \"credentials\"]", "feature": "", "fix_hint": "", "id": 19, "industry": "", "input": "", "instruction": "How do I implement multi-tenant workflows?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 20 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "analytics", "error_type": "", "expected_topics": "[\"metrics\", \"contacts\", \"pipelines\"]", "feature": "", "fix_hint": "", "id": 20, "industry": "", "input": "", "instruction": "What does the GoHighLevel dashboard show?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "gohighlevel", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
| 21 |
+
{"category": "quality_check", "complexity": "intermediate", "compliance": "", "description": "", "domain": "", "error_type": "", "expected_topics": "[\"operations\", \"products\", \"locations\"]", "feature": "", "fix_hint": "", "id": 21, "industry": "manufacturing", "input": "", "instruction": "How do I navigate Odoo inventory module?", "module": "", "multimodal": false, "node_count": 0, "output": "", "pattern": "", "platform": "odoo", "priority": "", "severity": "", "source": "", "topic": "", "type": "evaluation", "use_case": "", "value": "", "visual": false, "visual_pattern": "", "workflow_name": ""}
|
docs-dataset/final_training_dataset.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec682bfb9c01144a4ad668606c96d3c64eb0bc7ac694bfbdf6efb9d6ba744027
|
| 3 |
+
size 68094678
|
docs-dataset/fullstack_training.jsonl
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "How do I implement JWT authentication in n8n workflows?", "output": "# JWT Authentication in n8n\n\n## Generate JWT Token\n```javascript\n// Code node - Generate JWT\nconst crypto = require('crypto');\n\nconst header = { alg: 'HS256', typ: 'JWT' };\nconst payload = {\n sub: $json.userId,\n email: $json.email,\n iat: Math.floor(Date.now() / 1000),\n exp: Math.floor(Date.now() / 1000) + 3600 // 1 hour\n};\n\nconst base64Header = Buffer.from(JSON.stringify(header)).toString('base64url');\nconst base64Payload = Buffer.from(JSON.stringify(payload)).toString('base64url');\n\nconst signature = crypto\n .createHmac('sha256', $env.JWT_SECRET)\n .update(`${base64Header}.${base64Payload}`)\n .digest('base64url');\n\nreturn { token: `${base64Header}.${base64Payload}.${signature}` };\n```\n\n## Verify JWT Token\n```javascript\n// Code node - Verify JWT\nconst [header, payload, signature] = $json.token.split('.');\n\nconst expectedSig = crypto\n .createHmac('sha256', $env.JWT_SECRET)\n .update(`${header}.${payload}`)\n .digest('base64url');\n\nif (signature !== expectedSig) throw new Error('Invalid token');\n\nconst decoded = JSON.parse(Buffer.from(payload, 'base64url').toString());\nif (decoded.exp < Date.now() / 1000) throw new Error('Token expired');\n\nreturn { valid: true, user: decoded };\n```\n\n## Workflow Pattern\n```\nLogin Request \u2192 Validate Credentials \u2192 Generate JWT \u2192 Return Token\nProtected Endpoint \u2192 Extract Token \u2192 Verify JWT \u2192 Process Request\n```", "metadata": {"topic": "jwt_auth", "type": "implementation"}}
|
| 2 |
+
{"instruction": "How do I implement OAuth 2.0 flows in n8n?", "output": "# OAuth 2.0 Implementation in n8n\n\n## Authorization Code Flow\n\n### Step 1: Redirect to Auth Provider\n```javascript\nconst authUrl = new URL('https://provider.com/oauth/authorize');\nauthUrl.searchParams.set('client_id', $env.CLIENT_ID);\nauthUrl.searchParams.set('redirect_uri', 'https://yourapp.com/callback');\nauthUrl.searchParams.set('response_type', 'code');\nauthUrl.searchParams.set('scope', 'read write');\nauthUrl.searchParams.set('state', crypto.randomBytes(16).toString('hex'));\n\nreturn { redirectUrl: authUrl.toString() };\n```\n\n### Step 2: Exchange Code for Token\n```json\n{\n \"name\": \"Exchange Code\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://provider.com/oauth/token\",\n \"method\": \"POST\",\n \"body\": {\n \"grant_type\": \"authorization_code\",\n \"code\": \"={{ $json.code }}\",\n \"client_id\": \"={{ $env.CLIENT_ID }}\",\n \"client_secret\": \"={{ $env.CLIENT_SECRET }}\",\n \"redirect_uri\": \"https://yourapp.com/callback\"\n }\n }\n}\n```\n\n### Step 3: Refresh Token\n```json\n{\n \"name\": \"Refresh Token\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://provider.com/oauth/token\",\n \"method\": \"POST\",\n \"body\": {\n \"grant_type\": \"refresh_token\",\n \"refresh_token\": \"={{ $json.refresh_token }}\",\n \"client_id\": \"={{ $env.CLIENT_ID }}\"\n }\n }\n}\n```\n\n## Token Storage\nStore tokens securely in database with encryption:\n```javascript\nconst encrypted = crypto.createCipheriv('aes-256-gcm', key, iv)\n .update(token, 'utf8', 'hex');\nawait db.upsert('oauth_tokens', { user_id, encrypted_token });\n```", "metadata": {"topic": "oauth", "type": "implementation"}}
|
| 3 |
+
{"instruction": "How do I implement real-time data sync with Supabase in n8n?", "output": "# Real-Time Supabase Sync in n8n\n\n## Supabase Realtime Triggers\n```javascript\n// Subscribe to table changes\nconst { createClient } = require('@supabase/supabase-js');\nconst supabase = createClient(SUPABASE_URL, SUPABASE_KEY);\n\nsupabase\n .channel('table-changes')\n .on('postgres_changes', \n { event: '*', schema: 'public', table: 'orders' },\n (payload) => {\n // Trigger n8n webhook with payload\n fetch('https://n8n.example.com/webhook/orders', {\n method: 'POST',\n body: JSON.stringify(payload)\n });\n }\n )\n .subscribe();\n```\n\n## n8n Webhook Handler\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Supabase Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\"path\": \"orders\"}\n },\n {\n \"name\": \"Route by Event\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": [\n {\"value\": \"INSERT\"},\n {\"value\": \"UPDATE\"},\n {\"value\": \"DELETE\"}\n ]\n }\n },\n {\n \"name\": \"Handle New Order\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Process new order\\nconst order = $json.new;\\nreturn { order, action: 'notify_warehouse' };\"\n }\n }\n ]\n}\n```\n\n## Bidirectional Sync Pattern\n```\nSupabase Change \u2192 Webhook \u2192 n8n Process \u2192 Update External System\nExternal Change \u2192 n8n Poll/Webhook \u2192 Supabase Upsert\n```", "metadata": {"topic": "realtime_sync", "type": "workflow"}}
|
| 4 |
+
{"instruction": "How do I use WebSockets with n8n for real-time updates?", "output": "# WebSocket Integration with n8n\n\n## WebSocket Server (External)\n```javascript\n// Node.js WebSocket server\nconst WebSocket = require('ws');\nconst wss = new WebSocket.Server({ port: 8080 });\n\nwss.on('connection', (ws) => {\n ws.on('message', async (message) => {\n // Forward to n8n webhook\n await fetch('https://n8n.example.com/webhook/ws-message', {\n method: 'POST',\n body: message,\n headers: { 'Content-Type': 'application/json' }\n });\n });\n});\n\n// Broadcast from n8n\napp.post('/broadcast', (req, res) => {\n wss.clients.forEach(client => {\n if (client.readyState === WebSocket.OPEN) {\n client.send(JSON.stringify(req.body));\n }\n });\n res.json({ sent: true });\n});\n```\n\n## n8n Workflow\n```json\n{\n \"nodes\": [\n {\"name\": \"WS Message Received\", \"type\": \"n8n-nodes-base.webhook\"},\n {\"name\": \"Process Message\", \"type\": \"n8n-nodes-base.code\"},\n {\"name\": \"Broadcast Response\", \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"http://ws-server:8080/broadcast\",\n \"method\": \"POST\"\n }}\n ]\n}\n```\n\n## Use Cases\n- Live dashboards\n- Chat applications\n- Real-time notifications\n- Collaborative editing\n- Live order tracking", "metadata": {"topic": "websockets", "type": "integration"}}
|
| 5 |
+
{"instruction": "How do I trigger AWS Lambda functions from n8n?", "output": "# AWS Lambda Integration with n8n\n\n## Direct Invocation\n```json\n{\n \"name\": \"Invoke Lambda\",\n \"type\": \"n8n-nodes-base.awsLambda\",\n \"parameters\": {\n \"function\": \"my-function-name\",\n \"payload\": \"={{ JSON.stringify($json) }}\",\n \"invocationType\": \"RequestResponse\"\n },\n \"credentials\": {\"aws\": {\"accessKeyId\": \"\", \"secretAccessKey\": \"\", \"region\": \"us-east-1\"}}\n}\n```\n\n## Via API Gateway\n```json\n{\n \"name\": \"Lambda via API Gateway\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://abc123.execute-api.us-east-1.amazonaws.com/prod/function\",\n \"method\": \"POST\",\n \"headers\": {\"x-api-key\": \"={{ $env.API_GATEWAY_KEY }}\"},\n \"body\": \"={{ JSON.stringify($json) }}\"\n }\n}\n```\n\n## Async Invocation\n```json\n{\n \"parameters\": {\n \"invocationType\": \"Event\",\n \"payload\": \"={{ JSON.stringify({taskId: $json.id, callback: 'https://n8n.example.com/webhook/lambda-complete'}) }}\"\n }\n}\n```\n\n## Lambda Function Pattern\n```javascript\n// Lambda handler\nexports.handler = async (event) => {\n const result = await processData(event);\n \n // Callback to n8n\n await fetch(event.callback, {\n method: 'POST',\n body: JSON.stringify({ taskId: event.taskId, result })\n });\n \n return { statusCode: 200 };\n};\n```", "metadata": {"topic": "aws_lambda", "type": "integration"}}
|
| 6 |
+
{"instruction": "How do I use Google Cloud Functions with n8n?", "output": "# Google Cloud Functions with n8n\n\n## HTTP Trigger\n```json\n{\n \"name\": \"Call Cloud Function\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://REGION-PROJECT.cloudfunctions.net/function-name\",\n \"method\": \"POST\",\n \"headers\": {\n \"Authorization\": \"Bearer {{ $json.idToken }}\"\n },\n \"body\": \"={{ JSON.stringify($json.payload) }}\"\n }\n}\n```\n\n## Get ID Token for Auth\n```json\n{\n \"name\": \"Get ID Token\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=https://REGION-PROJECT.cloudfunctions.net/function-name\",\n \"headers\": {\"Metadata-Flavor\": \"Google\"}\n }\n}\n```\n\n## Cloud Function Example\n```javascript\nconst functions = require('@google-cloud/functions-framework');\n\nfunctions.http('processData', async (req, res) => {\n const data = req.body;\n const result = await heavyProcessing(data);\n \n // Optional: callback to n8n\n if (data.callbackUrl) {\n await fetch(data.callbackUrl, {\n method: 'POST',\n body: JSON.stringify(result)\n });\n }\n \n res.json(result);\n});\n```\n\n## Pub/Sub Trigger Pattern\n```\nn8n \u2192 Publish to Pub/Sub \u2192 Cloud Function \u2192 Process \u2192 Webhook back to n8n\n```", "metadata": {"topic": "gcp_functions", "type": "integration"}}
|
| 7 |
+
{"instruction": "How do I build ETL pipelines in n8n?", "output": "# ETL Pipeline Implementation in n8n\n\n## Extract Phase\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Extract from Source DB\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"parameters\": {\n \"operation\": \"executeQuery\",\n \"query\": \"SELECT * FROM orders WHERE updated_at > '{{ $json.lastSync }}'\"\n }\n },\n {\n \"name\": \"Extract from API\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.source.com/data\",\n \"qs\": {\"since\": \"={{ $json.lastSync }}\"}\n }\n }\n ]\n}\n```\n\n## Transform Phase\n```javascript\n// Code node - Transform data\nconst transformed = items.map(item => {\n return {\n json: {\n id: item.json.id,\n customer_name: `${item.json.first_name} ${item.json.last_name}`.trim(),\n total_amount: parseFloat(item.json.amount) || 0,\n order_date: new Date(item.json.created_at).toISOString().split('T')[0],\n status: item.json.status.toUpperCase(),\n source_system: 'legacy_db'\n }\n };\n});\nreturn transformed;\n```\n\n## Load Phase\n```json\n{\n \"name\": \"Load to Data Warehouse\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"fact_orders\",\n \"columns\": \"id, customer_name, total_amount, order_date, status, source_system\",\n \"options\": {\"onConflict\": \"id\", \"updateOnConflict\": true}\n }\n}\n```\n\n## Full ETL Workflow\n```\nSchedule Trigger (daily) \u2192 Get Last Sync Time \u2192 Extract Sources (parallel) \u2192\nMerge Data \u2192 Transform/Clean \u2192 Validate \u2192 Load to Warehouse \u2192 Update Sync Time\n```\n\n## Error Handling\n- Log failed records to error table\n- Continue on fail for non-critical fields\n- Retry transient failures\n- Alert on threshold exceeded", "metadata": {"topic": "etl", "type": "workflow"}}
|
| 8 |
+
{"instruction": "How do I implement CDC (Change Data Capture) with n8n?", "output": "# Change Data Capture with n8n\n\n## Database Triggers Approach\n```sql\n-- PostgreSQL trigger\nCREATE OR REPLACE FUNCTION notify_n8n()\nRETURNS trigger AS $$\nBEGIN\n PERFORM pg_notify('table_changes', \n json_build_object(\n 'table', TG_TABLE_NAME,\n 'operation', TG_OP,\n 'old', OLD,\n 'new', NEW\n )::text\n );\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n\nCREATE TRIGGER orders_cdc\nAFTER INSERT OR UPDATE OR DELETE ON orders\nFOR EACH ROW EXECUTE FUNCTION notify_n8n();\n```\n\n## n8n Listener Service\n```javascript\n// External service listening to Postgres NOTIFY\nconst { Client } = require('pg');\nconst client = new Client(connectionString);\n\nawait client.connect();\nawait client.query('LISTEN table_changes');\n\nclient.on('notification', async (msg) => {\n const payload = JSON.parse(msg.payload);\n await fetch('https://n8n.example.com/webhook/cdc', {\n method: 'POST',\n body: JSON.stringify(payload)\n });\n});\n```\n\n## Debezium Integration\n```json\n{\n \"name\": \"Kafka CDC Consumer\",\n \"nodes\": [\n {\"name\": \"Poll Kafka\", \"type\": \"n8n-nodes-base.kafka\",\n \"parameters\": {\"topic\": \"dbserver1.public.orders\"}},\n {\"name\": \"Parse CDC Event\", \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\"jsCode\": \"const event = $json;\\nreturn {op: event.op, before: event.before, after: event.after};\"}}\n ]\n}\n```\n\n## CDC Event Routing\n```javascript\nswitch ($json.operation) {\n case 'INSERT': await handleInsert($json.new); break;\n case 'UPDATE': await handleUpdate($json.old, $json.new); break;\n case 'DELETE': await handleDelete($json.old); break;\n}\n```", "metadata": {"topic": "cdc", "type": "integration"}}
|
| 9 |
+
{"instruction": "How do I integrate MongoDB with n8n?", "output": "# MongoDB Integration with n8n\n\n## Basic Operations\n\n### Find Documents\n```json\n{\n \"name\": \"Find Orders\",\n \"type\": \"n8n-nodes-base.mongoDb\",\n \"parameters\": {\n \"operation\": \"find\",\n \"collection\": \"orders\",\n \"query\": {\"status\": \"pending\", \"created_at\": {\"$gte\": \"={{ $json.startDate }}\"}},\n \"options\": {\"sort\": {\"created_at\": -1}, \"limit\": 100}\n }\n}\n```\n\n### Insert Document\n```json\n{\n \"name\": \"Insert Order\",\n \"type\": \"n8n-nodes-base.mongoDb\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"collection\": \"orders\",\n \"fields\": {\n \"customer_id\": \"={{ $json.customerId }}\",\n \"items\": \"={{ $json.items }}\",\n \"total\": \"={{ $json.total }}\",\n \"created_at\": \"={{ new Date().toISOString() }}\"\n }\n }\n}\n```\n\n### Update Document\n```json\n{\n \"name\": \"Update Order Status\",\n \"type\": \"n8n-nodes-base.mongoDb\",\n \"parameters\": {\n \"operation\": \"update\",\n \"collection\": \"orders\",\n \"query\": {\"_id\": {\"$oid\": \"={{ $json.orderId }}\"}},\n \"update\": {\"$set\": {\"status\": \"shipped\", \"shipped_at\": \"={{ new Date().toISOString() }}\"}}\n }\n}\n```\n\n### Aggregation Pipeline\n```json\n{\n \"parameters\": {\n \"operation\": \"aggregate\",\n \"collection\": \"orders\",\n \"pipeline\": [\n {\"$match\": {\"status\": \"completed\"}},\n {\"$group\": {\"_id\": \"$customer_id\", \"total_spent\": {\"$sum\": \"$total\"}}},\n {\"$sort\": {\"total_spent\": -1}},\n {\"$limit\": 10}\n ]\n }\n}\n```\n\n## Connection String\n```\nmongodb+srv://user:pass@cluster.mongodb.net/database?retryWrites=true\n```", "metadata": {"topic": "mongodb", "type": "integration"}}
|
| 10 |
+
{"instruction": "How do I use Firebase/Firestore with n8n?", "output": "# Firebase/Firestore Integration with n8n\n\n## Firestore Operations\n\n### Get Document\n```json\n{\n \"name\": \"Get User\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://firestore.googleapis.com/v1/projects/PROJECT/databases/(default)/documents/users/{{ $json.userId }}\",\n \"headers\": {\"Authorization\": \"Bearer {{ $json.accessToken }}\"}\n }\n}\n```\n\n### Create Document\n```json\n{\n \"name\": \"Create Order\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://firestore.googleapis.com/v1/projects/PROJECT/databases/(default)/documents/orders\",\n \"method\": \"POST\",\n \"body\": {\n \"fields\": {\n \"customer\": {\"stringValue\": \"={{ $json.customer }}\"},\n \"total\": {\"doubleValue\": \"={{ $json.total }}\"},\n \"items\": {\"arrayValue\": {\"values\": \"={{ $json.items.map(i => ({stringValue: i})) }}\"}}\n }\n }\n }\n}\n```\n\n### Query Collection\n```json\n{\n \"parameters\": {\n \"url\": \"https://firestore.googleapis.com/v1/projects/PROJECT/databases/(default)/documents:runQuery\",\n \"method\": \"POST\",\n \"body\": {\n \"structuredQuery\": {\n \"from\": [{\"collectionId\": \"orders\"}],\n \"where\": {\n \"fieldFilter\": {\n \"field\": {\"fieldPath\": \"status\"},\n \"op\": \"EQUAL\",\n \"value\": {\"stringValue\": \"pending\"}\n }\n },\n \"orderBy\": [{\"field\": {\"fieldPath\": \"created_at\"}, \"direction\": \"DESCENDING\"}],\n \"limit\": 50\n }\n }\n }\n}\n```\n\n## Firebase Admin SDK (Code Node)\n```javascript\nconst admin = require('firebase-admin');\nadmin.initializeApp({ credential: admin.credential.cert(serviceAccount) });\nconst db = admin.firestore();\n\nconst snapshot = await db.collection('users').where('active', '==', true).get();\nreturn snapshot.docs.map(doc => ({ id: doc.id, ...doc.data() }));\n```", "metadata": {"topic": "firebase", "type": "integration"}}
|
| 11 |
+
{"instruction": "How do I trigger n8n workflows from Go microservices?", "output": "# Go Microservices + n8n Integration\n\n## Trigger n8n Webhook from Go\n```go\npackage main\n\nimport (\n \"bytes\"\n \"encoding/json\"\n \"net/http\"\n)\n\ntype WorkflowPayload struct {\n OrderID string `json:\"order_id\"`\n CustomerID string `json:\"customer_id\"`\n Amount float64 `json:\"amount\"`\n Action string `json:\"action\"`\n}\n\nfunc triggerN8NWorkflow(payload WorkflowPayload) error {\n jsonData, _ := json.Marshal(payload)\n \n resp, err := http.Post(\n \"https://n8n.example.com/webhook/order-created\",\n \"application/json\",\n bytes.NewBuffer(jsonData),\n )\n if err != nil {\n return err\n }\n defer resp.Body.Close()\n \n return nil\n}\n\n// Usage in your service\nfunc handleNewOrder(order Order) {\n // Process order...\n \n // Trigger n8n workflow\n triggerN8NWorkflow(WorkflowPayload{\n OrderID: order.ID,\n CustomerID: order.CustomerID,\n Amount: order.Total,\n Action: \"new_order\",\n })\n}\n```\n\n## n8n Calling Go Service\n```json\n{\n \"name\": \"Call Go Service\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"http://go-service:8080/api/process\",\n \"method\": \"POST\",\n \"headers\": {\"Authorization\": \"Bearer {{ $env.SERVICE_TOKEN }}\"},\n \"body\": \"={{ JSON.stringify($json) }}\"\n }\n}\n```\n\n## Go Service Endpoint\n```go\nfunc processHandler(w http.ResponseWriter, r *http.Request) {\n var data map[string]interface{}\n json.NewDecoder(r.Body).Decode(&data)\n \n result := processData(data)\n \n json.NewEncoder(w).Encode(result)\n}\n```\n\n## Async Pattern with Queue\n```go\n// Publish to queue, n8n consumes\nfunc publishToQueue(msg Message) {\n ch.Publish(\"n8n-tasks\", \"\", false, false, amqp.Publishing{\n ContentType: \"application/json\",\n Body: msgBytes,\n })\n}\n```", "metadata": {"topic": "go_microservices", "type": "integration"}}
|
| 12 |
+
{"instruction": "How do I implement parallel execution in n8n for better performance?", "output": "# Parallel Execution in n8n\n\n## Split in Batches with Parallel Processing\n```json\n{\n \"nodes\": [\n {\"name\": \"Get All Items\", \"type\": \"n8n-nodes-base.httpRequest\"},\n {\"name\": \"Split Batches\", \"type\": \"n8n-nodes-base.splitInBatches\",\n \"parameters\": {\"batchSize\": 10}},\n {\"name\": \"Process Item\", \"type\": \"n8n-nodes-base.httpRequest\",\n \"executeOnce\": false}\n ]\n}\n```\n\n## Parallel HTTP Requests\n```javascript\n// Code node - parallel fetch\nconst urls = $json.urls;\nconst results = await Promise.all(\n urls.map(url => \n fetch(url).then(r => r.json()).catch(e => ({ error: e.message }))\n )\n);\nreturn results.map(r => ({ json: r }));\n```\n\n## Merge Parallel Branches\n```json\n{\n \"nodes\": [\n {\"name\": \"Start\", \"type\": \"n8n-nodes-base.manualTrigger\"},\n {\"name\": \"Branch 1\", \"type\": \"n8n-nodes-base.httpRequest\", \"parameters\": {\"url\": \"https://api1.com\"}},\n {\"name\": \"Branch 2\", \"type\": \"n8n-nodes-base.httpRequest\", \"parameters\": {\"url\": \"https://api2.com\"}},\n {\"name\": \"Branch 3\", \"type\": \"n8n-nodes-base.httpRequest\", \"parameters\": {\"url\": \"https://api3.com\"}},\n {\"name\": \"Merge All\", \"type\": \"n8n-nodes-base.merge\", \"parameters\": {\"mode\": \"append\"}}\n ],\n \"connections\": {\n \"Start\": {\"main\": [[{\"node\": \"Branch 1\"}, {\"node\": \"Branch 2\"}, {\"node\": \"Branch 3\"}]]},\n \"Branch 1\": {\"main\": [[{\"node\": \"Merge All\"}]]},\n \"Branch 2\": {\"main\": [[{\"node\": \"Merge All\"}]]},\n \"Branch 3\": {\"main\": [[{\"node\": \"Merge All\"}]]}\n }\n}\n```\n\n## Worker Queue Pattern\n```\nMain Workflow \u2192 Push to Queue \u2192 Multiple Workers Process \u2192 Results to Queue \u2192 Aggregate Results\n```\n\n## Performance Tips\n1. Use `executeOnce: false` for parallel item processing\n2. Batch external API calls (respect rate limits)\n3. Use merge node to combine parallel branches\n4. Consider queue-based processing for heavy loads", "metadata": {"topic": "parallel_execution", "type": "optimization"}}
|
| 13 |
+
{"instruction": "How do I monitor n8n workflows with Grafana and Prometheus?", "output": "# n8n Monitoring with Grafana/Prometheus\n\n## n8n Metrics Endpoint\nEnable in n8n environment:\n```bash\nN8N_METRICS=true\nN8N_METRICS_PREFIX=n8n_\n```\n\n## Prometheus Scrape Config\n```yaml\nscrape_configs:\n - job_name: 'n8n'\n static_configs:\n - targets: ['n8n:5678']\n metrics_path: /metrics\n```\n\n## Key Metrics to Monitor\n\n### Workflow Execution\n```promql\n# Execution count by workflow\nsum(rate(n8n_workflow_executions_total[5m])) by (workflow_name)\n\n# Error rate\nsum(rate(n8n_workflow_executions_total{status=\"error\"}[5m])) / \nsum(rate(n8n_workflow_executions_total[5m]))\n\n# Execution duration\nhistogram_quantile(0.95, rate(n8n_workflow_execution_duration_seconds_bucket[5m]))\n```\n\n### System Health\n```promql\n# Active executions\nn8n_active_executions\n\n# Memory usage\nprocess_resident_memory_bytes{job=\"n8n\"}\n\n# CPU usage\nrate(process_cpu_seconds_total{job=\"n8n\"}[5m])\n```\n\n## Grafana Dashboard JSON\n```json\n{\n \"panels\": [\n {\n \"title\": \"Workflow Executions/min\",\n \"type\": \"graph\",\n \"targets\": [{\"expr\": \"sum(rate(n8n_workflow_executions_total[1m])) by (workflow_name)\"}]\n },\n {\n \"title\": \"Error Rate %\",\n \"type\": \"gauge\",\n \"targets\": [{\"expr\": \"sum(rate(n8n_workflow_executions_total{status='error'}[5m])) / sum(rate(n8n_workflow_executions_total[5m])) * 100\"}]\n }\n ]\n}\n```\n\n## Alerting Rules\n```yaml\ngroups:\n - name: n8n\n rules:\n - alert: HighErrorRate\n expr: sum(rate(n8n_workflow_executions_total{status=\"error\"}[5m])) / sum(rate(n8n_workflow_executions_total[5m])) > 0.1\n for: 5m\n labels: {severity: critical}\n annotations: {summary: \"n8n error rate above 10%\"}\n```", "metadata": {"topic": "monitoring", "type": "integration"}}
|
| 14 |
+
{"instruction": "How do I encrypt sensitive data in n8n workflows?", "output": "# Data Encryption in n8n Workflows\n\n## AES-256-GCM Encryption\n```javascript\n// Code node - Encrypt\nconst crypto = require('crypto');\n\nconst key = Buffer.from($env.ENCRYPTION_KEY, 'hex'); // 32 bytes\nconst iv = crypto.randomBytes(16);\n\nconst cipher = crypto.createCipheriv('aes-256-gcm', key, iv);\nlet encrypted = cipher.update($json.sensitiveData, 'utf8', 'hex');\nencrypted += cipher.final('hex');\nconst authTag = cipher.getAuthTag().toString('hex');\n\nreturn {\n encrypted: encrypted,\n iv: iv.toString('hex'),\n authTag: authTag\n};\n```\n\n## Decryption\n```javascript\n// Code node - Decrypt\nconst crypto = require('crypto');\n\nconst key = Buffer.from($env.ENCRYPTION_KEY, 'hex');\nconst iv = Buffer.from($json.iv, 'hex');\nconst authTag = Buffer.from($json.authTag, 'hex');\n\nconst decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);\ndecipher.setAuthTag(authTag);\n\nlet decrypted = decipher.update($json.encrypted, 'hex', 'utf8');\ndecrypted += decipher.final('utf8');\n\nreturn { decrypted };\n```\n\n## Field-Level Encryption\n```javascript\n// Encrypt specific fields before storage\nconst fieldsToEncrypt = ['ssn', 'credit_card', 'password'];\nconst record = $json;\n\nfor (const field of fieldsToEncrypt) {\n if (record[field]) {\n record[`${field}_encrypted`] = encrypt(record[field]);\n delete record[field];\n }\n}\n\nreturn record;\n```\n\n## Key Rotation Pattern\n```javascript\n// Re-encrypt with new key\nconst oldKey = Buffer.from($env.OLD_KEY, 'hex');\nconst newKey = Buffer.from($env.NEW_KEY, 'hex');\n\nconst decrypted = decrypt($json.encrypted, oldKey);\nconst reEncrypted = encrypt(decrypted, newKey);\n\nreturn { encrypted: reEncrypted, keyVersion: 2 };\n```\n\n## Best Practices\n1. Never log encrypted data or keys\n2. Use environment variables for keys\n3. Rotate keys periodically\n4. Use authenticated encryption (GCM)\n5. Store IV with encrypted data", "metadata": {"topic": "encryption", "type": "security"}}
|
| 15 |
+
{"instruction": "How do I implement automated prompt engineering and validation in n8n?", "output": "# Automated Prompt Engineering in n8n\n\n## Prompt Template System\n```javascript\n// Code node - Build prompt from template\nconst templates = {\n summarize: \"Summarize the following text in {{length}} sentences:\\n\\n{{text}}\",\n translate: \"Translate the following from {{source_lang}} to {{target_lang}}:\\n\\n{{text}}\",\n classify: \"Classify the following text into one of these categories: {{categories}}\\n\\nText: {{text}}\",\n extract: \"Extract the following information from the text: {{fields}}\\n\\nText: {{text}}\"\n};\n\nconst template = templates[$json.templateType];\nlet prompt = template;\nfor (const [key, value] of Object.entries($json.variables)) {\n prompt = prompt.replace(`{{${key}}}`, value);\n}\nreturn { prompt };\n```\n\n## Prompt Validation\n```javascript\n// Validate prompt before sending to LLM\nconst prompt = $json.prompt;\nconst issues = [];\n\n// Check length\nif (prompt.length > 4000) issues.push('Prompt too long');\nif (prompt.length < 10) issues.push('Prompt too short');\n\n// Check for required elements\nif (!prompt.includes('{{')) issues.push('No variable placeholders found');\n\n// Check for injection attempts\nconst injection_patterns = ['ignore previous', 'disregard instructions'];\nif (injection_patterns.some(p => prompt.toLowerCase().includes(p))) {\n issues.push('Potential prompt injection detected');\n}\n\nreturn { valid: issues.length === 0, issues };\n```\n\n## Output Validation\n```javascript\n// Validate LLM response\nconst response = $json.aiResponse;\nconst expected = $json.expectedFormat;\n\nconst validation = {\n isJSON: false,\n hasRequiredFields: false,\n withinLength: false\n};\n\nif (expected.format === 'json') {\n try {\n const parsed = JSON.parse(response);\n validation.isJSON = true;\n validation.hasRequiredFields = expected.requiredFields.every(f => f in parsed);\n } catch (e) {\n validation.isJSON = false;\n }\n}\n\nvalidation.withinLength = response.length <= expected.maxLength;\n\nreturn {\n valid: Object.values(validation).every(v => v),\n validation,\n response: validation.isJSON ? JSON.parse(response) : response\n};\n```\n\n## A/B Testing Prompts\n```javascript\n// Select prompt variant\nconst variants = [\n { id: 'A', prompt: 'Concise version...', weight: 0.5 },\n { id: 'B', prompt: 'Detailed version...', weight: 0.5 }\n];\n\nconst rand = Math.random();\nlet cumulative = 0;\nlet selected;\nfor (const v of variants) {\n cumulative += v.weight;\n if (rand <= cumulative) { selected = v; break; }\n}\n\nreturn { promptVariant: selected.id, prompt: selected.prompt };\n```", "metadata": {"topic": "prompt_engineering", "type": "ai"}}
|
| 16 |
+
{"instruction": "How do I implement multi-agent orchestration with n8n?", "output": "# Multi-Agent Orchestration in n8n\n\n## Agent Architecture\n```\nOrchestrator Agent \u2192 Specialist Agents \u2192 Result Aggregation\n \u2193\n[Research Agent] [Writing Agent] [Review Agent] [Code Agent]\n```\n\n## Orchestrator Workflow\n```json\n{\n \"nodes\": [\n {\"name\": \"Task Input\", \"type\": \"n8n-nodes-base.webhook\"},\n {\"name\": \"Analyze Task\", \"type\": \"n8n-nodes-base.openAi\",\n \"parameters\": {\"prompt\": \"Analyze this task and determine which specialists are needed: {{$json.task}}\\n\\nReturn JSON: {agents: ['research', 'write', 'review']}\"}},\n {\"name\": \"Parse Agent List\", \"type\": \"n8n-nodes-base.code\"},\n {\"name\": \"Route to Agents\", \"type\": \"n8n-nodes-base.switch\"},\n {\"name\": \"Research Agent\", \"type\": \"n8n-nodes-base.executeWorkflow\", \"parameters\": {\"workflowId\": \"research_agent\"}},\n {\"name\": \"Writing Agent\", \"type\": \"n8n-nodes-base.executeWorkflow\", \"parameters\": {\"workflowId\": \"writing_agent\"}},\n {\"name\": \"Aggregate Results\", \"type\": \"n8n-nodes-base.merge\"}\n ]\n}\n```\n\n## Specialist Agent (Research)\n```javascript\n// Research agent prompt\nconst systemPrompt = `You are a research specialist. Your role:\n1. Search for relevant information\n2. Verify facts from multiple sources\n3. Summarize findings concisely\n4. Cite sources\n\nReturn JSON: {findings: [...], sources: [...], confidence: 0-1}`;\n```\n\n## Agent Communication Protocol\n```javascript\n// Message format between agents\nconst agentMessage = {\n from: 'research_agent',\n to: 'writing_agent',\n type: 'research_complete',\n payload: {\n findings: [...],\n context: {...},\n metadata: { timestamp, confidence }\n }\n};\n```\n\n## Feedback Loop\n```json\n{\n \"nodes\": [\n {\"name\": \"Generate Content\", \"type\": \"n8n-nodes-base.openAi\"},\n {\"name\": \"Review Agent\", \"type\": \"n8n-nodes-base.openAi\",\n \"parameters\": {\"prompt\": \"Review this content for accuracy and quality...\"}},\n {\"name\": \"Check Approval\", \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\"conditions\": {\"string\": [{\"value1\": \"={{ $json.approved }}\", \"value2\": \"true\"}]}}},\n {\"name\": \"Return to Generator\", \"type\": \"n8n-nodes-base.set\"}\n ]\n}\n```\n\n## Best Practices\n1. Define clear agent responsibilities\n2. Use structured message formats\n3. Implement timeout handling\n4. Log all agent interactions\n5. Set max iteration limits for loops", "metadata": {"topic": "multi_agent", "type": "ai"}}
|
docs-dataset/marketing_master.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/marketing_seo_training.jsonl
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "What is Generative Engine Optimization (GEO) and how does it differ from traditional SEO?", "input": "", "output": "# Generative Engine Optimization (GEO)\n\n**Definition**: GEO is the practice of optimizing content to appear in AI-generated responses from systems like ChatGPT, Google AI Overview, Perplexity, and Claude.\n\n## Key Differences from Traditional SEO\n\n| Aspect | Traditional SEO | GEO |\n|--------|----------------|-----|\n| **Target** | Search engine results pages (SERPs) | AI-generated answers |\n| **Metrics** | Rankings, CTR, impressions | Citation frequency, source attribution |\n| **Content Style** | Keyword-focused | Comprehensive, authoritative |\n| **Structure** | Meta tags, headings | Semantic clarity, factual density |\n\n## Core GEO Strategies\n\n1. **Establish Topical Authority**\n - Create comprehensive pillar pages\n - Interlink related content\n - Cover topics exhaustively\n\n2. **Optimize for Citation**\n - Use clear, quotable statements\n - Include data, statistics, and facts\n - Cite authoritative sources\n\n3. **Structured Data Implementation**\n - JSON-LD schema markup\n - FAQ schema\n - HowTo schema\n - Organization schema\n\n4. **Content Format**\n - Use definition patterns: \"X is...\"\n - Include step-by-step instructions\n - Provide comparison tables\n - Add concrete examples\n\n## Implementation in n8n\n\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Analyze Content for GEO\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Check GEO optimization score\\nconst content = $json.content;\\nconst score = {\\n hasDefinitions: /is a|refers to|means/i.test(content),\\n hasStats: /\\\\d+%|\\\\d+ percent/i.test(content),\\n hasSteps: /step \\\\d|first,|then,/i.test(content)\\n};\\nreturn { score };\"\n }\n }\n ]\n}\n```", "metadata": {"topic": "GEO", "type": "concept", "priority": "high"}}
|
| 2 |
+
{"instruction": "How do I optimize content for Answer Engine Optimization (AEO) to appear in featured snippets?", "input": "", "output": "# Answer Engine Optimization (AEO) Guide\n\n**AEO** focuses on structuring content to directly answer user questions, targeting featured snippets and voice search results.\n\n## Featured Snippet Types & Optimization\n\n### 1. Paragraph Snippets (Most Common)\n- Target \"what is\", \"why\", \"how does\" queries\n- Provide 40-60 word direct answers\n- Place answer immediately after the H2\n\n**Example Structure**:\n```html\n<h2>What is Answer Engine Optimization?</h2>\n<p>Answer Engine Optimization (AEO) is the process of optimizing content \nto provide direct answers to user queries, increasing visibility in \nfeatured snippets, voice search results, and AI-generated responses.</p>\n```\n\n### 2. List Snippets\n- Use numbered or bulleted lists\n- Include 4-8 items\n- Start each item with action verbs\n\n### 3. Table Snippets\n- Use comparison tables\n- Include clear headers\n- Limit to 3-4 columns\n\n## AEO Implementation Checklist\n\n- [ ] Identify question-based keywords\n- [ ] Structure content with clear Q&A format\n- [ ] Use schema markup (FAQPage, HowTo)\n- [ ] Optimize for voice search (conversational)\n- [ ] Include \"People Also Ask\" targets\n\n## n8n Workflow for AEO Analysis\n\n```json\n{\n \"name\": \"AEO Content Analyzer\",\n \"nodes\": [\n {\n \"name\": \"Fetch Content\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"={{ $json.pageUrl }}\"\n }\n },\n {\n \"name\": \"Check FAQ Schema\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const html = $json.body;\\nconst hasFAQSchema = html.includes('FAQPage');\\nreturn { hasFAQSchema };\"\n }\n }\n ]\n}\n```\n\n## Voice Search Optimization Tips\n\n1. Use natural, conversational language\n2. Target long-tail question queries\n3. Optimize for local intent (\"near me\")\n4. Provide concise, speakable answers (< 30 words)", "metadata": {"topic": "AEO", "type": "guide", "priority": "high"}}
|
| 3 |
+
{"instruction": "Explain LLM SEO strategies for getting cited by AI chatbots like ChatGPT and Claude", "input": "", "output": "# LLM SEO: Optimizing for AI Chatbot Citations\n\n**LLM SEO** is the emerging practice of optimizing content so Large Language Models cite your website in their responses.\n\n## How LLMs Choose Sources\n\n1. **Training Data**: Content that was in training datasets\n2. **RAG Systems**: Real-time retrieval from indexed sources\n3. **Authority Signals**: Domain reputation, backlinks, mentions\n4. **Content Quality**: Accuracy, depth, recency\n\n## Core LLM SEO Strategies\n\n### 1. Establish Entity Authority\n- Build Wikipedia presence\n- Get mentioned in authoritative sources\n- Create comprehensive \"About\" pages\n- Use consistent NAP (Name, Address, Phone)\n\n### 2. Create Citation-Worthy Content\n\n**Best Practices**:\n- Include original research and data\n- Provide unique insights not available elsewhere\n- Use clear, quotable statements\n- Update content regularly\n\n**Example Citation-Worthy Format**:\n```\nAccording to [Your Brand] research, 73% of marketers now \nprioritize AI search optimization in their 2025 strategy.\n```\n\n### 3. Technical Optimization\n\n```json\n{\n \"@context\": \"https://schema.org\",\n \"@type\": \"Article\",\n \"author\": {\n \"@type\": \"Organization\",\n \"name\": \"Your Brand\",\n \"url\": \"https://yourdomain.com\"\n },\n \"datePublished\": \"2024-01-15\",\n \"dateModified\": \"2024-12-01\"\n}\n```\n\n### 4. Content Structure for LLM Parsing\n\n- Use clear hierarchical headings\n- Include TL;DR summaries at the top\n- Provide structured data (tables, lists)\n- Add glossary definitions\n\n## Measurement & Tracking\n\n| Metric | Tool | Target |\n|--------|------|--------|\n| Brand mentions in AI | Manual sampling | Track monthly |\n| Knowledge Panel presence | Google Search | Establish/maintain |\n| Authoritative backlinks | Ahrefs/Semrush | Increase 10%/quarter |\n\n## n8n Workflow: Monitor AI Citations\n\n```json\n{\n \"name\": \"AI Citation Monitor\",\n \"nodes\": [\n {\n \"name\": \"Query ChatGPT\",\n \"type\": \"n8n-nodes-base.openAi\",\n \"parameters\": {\n \"prompt\": \"Who are the leading experts in {{ $json.topic }}?\"\n }\n },\n {\n \"name\": \"Check for Brand Mention\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.response }}\",\n \"operation\": \"contains\",\n \"value2\": \"Your Brand\"\n }]\n }\n }\n }\n ]\n}\n```", "metadata": {"topic": "LLM_SEO", "type": "strategy", "priority": "high"}}
|
| 4 |
+
{"instruction": "How do I create an automated SEO audit workflow in n8n?", "input": "", "output": "# Automated SEO Audit Workflow in n8n\n\nBuild a comprehensive SEO audit system that checks on-page, technical, and content factors.\n\n## Complete n8n Workflow\n\n```json\n{\n \"name\": \"Automated SEO Audit\",\n \"nodes\": [\n {\n \"name\": \"Start\",\n \"type\": \"n8n-nodes-base.manualTrigger\",\n \"position\": [250, 300]\n },\n {\n \"name\": \"Set URLs\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\n \"string\": [\n {\"name\": \"targetUrl\", \"value\": \"https://example.com\"}\n ]\n }\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Fetch Page\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"={{ $json.targetUrl }}\",\n \"options\": {\"timeout\": 30000}\n },\n \"position\": [650, 300]\n },\n {\n \"name\": \"SEO Analysis\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const html = $json.body;\\nconst url = $json.targetUrl;\\n\\n// Extract SEO elements\\nconst titleMatch = html.match(/<title>([^<]+)<\\\\/title>/i);\\nconst h1Match = html.match(/<h1[^>]*>([^<]+)<\\\\/h1>/i);\\nconst metaDescMatch = html.match(/<meta[^>]*name=\\\"description\\\"[^>]*content=\\\"([^\\\"]+)\\\"/i);\\nconst canonicalMatch = html.match(/<link[^>]*rel=\\\"canonical\\\"[^>]*href=\\\"([^\\\"]+)\\\"/i);\\n\\n// Check for robots directives\\nconst hasNoIndex = /noindex/i.test(html);\\nconst hasNoFollow = /nofollow/i.test(html);\\n\\n// Count elements\\nconst h2Count = (html.match(/<h2/gi) || []).length;\\nconst imgCount = (html.match(/<img/gi) || []).length;\\nconst imgNoAlt = (html.match(/<img(?![^>]*alt=)/gi) || []).length;\\n\\n// Calculate scores\\nconst issues = [];\\nlet score = 100;\\n\\nif (!titleMatch) {\\n issues.push('Missing title tag');\\n score -= 15;\\n}\\nif (!h1Match) {\\n issues.push('Missing H1 tag');\\n score -= 10;\\n}\\nif (!metaDescMatch) {\\n issues.push('Missing meta description');\\n score -= 10;\\n}\\nif (hasNoIndex) {\\n issues.push('Page has noindex directive');\\n score -= 20;\\n}\\nif (imgNoAlt > 0) {\\n issues.push(`${imgNoAlt} images missing alt text`);\\n score -= imgNoAlt * 2;\\n}\\n\\nreturn {\\n url,\\n score: Math.max(0, score),\\n title: titleMatch ? titleMatch[1] : null,\\n h1: h1Match ? h1Match[1] : null,\\n metaDescription: metaDescMatch ? metaDescMatch[1] : null,\\n canonical: canonicalMatch ? canonicalMatch[1] : null,\\n h2Count,\\n imgCount,\\n imgNoAlt,\\n issues\\n};\"\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Generate Report\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const data = $json;\\nconst report = `# SEO Audit Report\\n\\n**URL**: ${data.url}\\n**Score**: ${data.score}/100\\n\\n## Elements Found\\n- Title: ${data.title || 'MISSING'}\\n- H1: ${data.h1 || 'MISSING'}\\n- Meta Description: ${data.metaDescription ? 'Present' : 'MISSING'}\\n\\n## Issues Found\\n${data.issues.map(i => '- ' + i).join('\\\\n')}`\\n\\nreturn { report };\"\n },\n \"position\": [1050, 300]\n }\n ],\n \"connections\": {\n \"Start\": {\"main\": [[{\"node\": \"Set URLs\", \"type\": \"main\", \"index\": 0}]]},\n \"Set URLs\": {\"main\": [[{\"node\": \"Fetch Page\", \"type\": \"main\", \"index\": 0}]]},\n \"Fetch Page\": {\"main\": [[{\"node\": \"SEO Analysis\", \"type\": \"main\", \"index\": 0}]]},\n \"SEO Analysis\": {\"main\": [[{\"node\": \"Generate Report\", \"type\": \"main\", \"index\": 0}]]}\n }\n}\n```\n\n## Audit Checks Included\n\n1. **On-Page SEO**\n - Title tag presence and length\n - H1 tag presence\n - Meta description\n - Heading hierarchy\n\n2. **Technical SEO**\n - Canonical URL\n - Robots directives\n - Image alt text\n\n3. **Reporting**\n - Score calculation\n - Issue identification\n - Markdown report generation\n\n## Extended Integrations\n\n- **Ahrefs API**: Backlink analysis\n- **Google Search Console**: Search performance data\n- **PageSpeed Insights**: Core Web Vitals", "metadata": {"topic": "SEO_automation", "type": "workflow", "priority": "high"}}
|
| 5 |
+
{"instruction": "How do I build a lead nurturing funnel in n8n with GoHighLevel?", "input": "", "output": "# Lead Nurturing Funnel: n8n + GoHighLevel Integration\n\nBuild an automated lead nurturing system that scores, segments, and nurtures leads based on behavior.\n\n## Architecture Overview\n\n```\nWebhook (Lead Capture) \u2192 Lead Scoring \u2192 Segment Assignment \u2192 Nurture Sequence\n \u2193\n Sales Alert \u2190 Hot Lead Detection \u2190 Engagement Tracking\n```\n\n## Complete Workflow\n\n```json\n{\n \"name\": \"GHL Lead Nurturing Funnel\",\n \"nodes\": [\n {\n \"name\": \"Webhook Trigger\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"lead-capture\",\n \"httpMethod\": \"POST\"\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Lead Scoring\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const lead = $json.body;\\nlet score = 0;\\n\\n// Score based on form data\\nif (lead.company_size > 100) score += 20;\\nif (lead.budget === 'high') score += 25;\\nif (lead.timeline === 'immediate') score += 20;\\nif (lead.source === 'referral') score += 15;\\n\\n// Score based on engagement\\nif (lead.pages_viewed > 5) score += 10;\\nif (lead.time_on_site > 300) score += 10;\\n\\nreturn { ...lead, leadScore: score, segment: score > 60 ? 'hot' : score > 30 ? 'warm' : 'cold' };\"\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Route by Segment\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": {\n \"rules\": [\n {\"value\": \"hot\"},\n {\"value\": \"warm\"},\n {\"value\": \"cold\"}\n ]\n }\n },\n \"position\": [650, 300]\n },\n {\n \"name\": \"Add to GHL - Hot Pipeline\",\n \"type\": \"n8n-nodes-base.highLevel\",\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"additionalFields\": {\n \"pipelineId\": \"hot_lead_pipeline\",\n \"tags\": [\"hot-lead\", \"priority\"]\n }\n },\n \"position\": [850, 200]\n },\n {\n \"name\": \"Add to GHL - Warm Nurture\",\n \"type\": \"n8n-nodes-base.highLevel\",\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"additionalFields\": {\n \"workflowId\": \"nurture_sequence_warm\"\n }\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Add to GHL - Cold Campaign\",\n \"type\": \"n8n-nodes-base.highLevel\",\n \"parameters\": {\n \"resource\": \"contact\",\n \"operation\": \"create\",\n \"additionalFields\": {\n \"workflowId\": \"nurture_sequence_cold\"\n }\n },\n \"position\": [850, 400]\n },\n {\n \"name\": \"Notify Sales Team\",\n \"type\": \"n8n-nodes-base.slack\",\n \"parameters\": {\n \"channel\": \"#sales-alerts\",\n \"text\": \"\ud83d\udd25 Hot Lead: {{ $json.email }}\\nScore: {{ $json.leadScore }}\\nCompany: {{ $json.company }}\"\n },\n \"position\": [1050, 200]\n }\n ]\n}\n```\n\n## Lead Scoring Framework\n\n| Factor | Points | Criteria |\n|--------|--------|----------|\n| Company Size | +20 | > 100 employees |\n| Budget | +25 | \"High\" selected |\n| Timeline | +20 | \"Immediate\" need |\n| Referral Source | +15 | Came from referral |\n| Page Views | +10 | > 5 pages viewed |\n| Time on Site | +10 | > 5 minutes |\n\n## Segment Actions\n\n**Hot Leads (60+ points)**:\n- Immediate sales notification\n- Add to priority pipeline\n- Direct outreach within 1 hour\n\n**Warm Leads (30-60 points)**:\n- 7-day email nurture sequence\n- Weekly value content\n- Retargeting ads\n\n**Cold Leads (<30 points)**:\n- Monthly newsletter\n- Educational content\n- Long-term nurturing", "metadata": {"topic": "marketing_automation", "type": "workflow", "priority": "high"}}
|
| 6 |
+
{"instruction": "How do I track marketing ROI and CAC/LTV metrics with n8n?", "input": "", "output": "# Marketing ROI & Metrics Tracking with n8n\n\nBuild automated dashboards tracking Customer Acquisition Cost (CAC), Lifetime Value (LTV), and ROI.\n\n## Key Metrics Formulas\n\n```\nCAC = Total Marketing Spend / New Customers Acquired\nLTV = Average Revenue Per Customer \u00d7 Average Customer Lifespan\nROI = (Revenue - Marketing Spend) / Marketing Spend \u00d7 100\nLTV:CAC Ratio = LTV / CAC (Target: 3:1 or higher)\n```\n\n## n8n Workflow for ROI Tracking\n\n```json\n{\n \"name\": \"Marketing ROI Dashboard\",\n \"nodes\": [\n {\n \"name\": \"Schedule Trigger\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"parameters\": {\n \"rule\": {\"interval\": [{\"field\": \"weeks\", \"weeks\": 1}]}\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Fetch Ad Spend - Google\",\n \"type\": \"n8n-nodes-base.googleAds\",\n \"parameters\": {\n \"operation\": \"getCampaigns\",\n \"dateRange\": \"LAST_30_DAYS\"\n },\n \"position\": [450, 200]\n },\n {\n \"name\": \"Fetch Ad Spend - Facebook\",\n \"type\": \"n8n-nodes-base.facebookAds\",\n \"parameters\": {\n \"operation\": \"getInsights\",\n \"datePreset\": \"last_30d\"\n },\n \"position\": [450, 400]\n },\n {\n \"name\": \"Fetch Revenue Data\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"select\",\n \"table\": \"orders\",\n \"options\": {\n \"conditions\": \"created_at > NOW() - INTERVAL '30 days'\"\n }\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Merge Data\",\n \"type\": \"n8n-nodes-base.merge\",\n \"parameters\": {\"mode\": \"append\"},\n \"position\": [650, 300]\n },\n {\n \"name\": \"Calculate Metrics\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const data = $json;\\n\\n// Aggregate spend\\nconst totalSpend = data.reduce((sum, item) => sum + (item.spend || 0), 0);\\n\\n// Count new customers\\nconst newCustomers = data.filter(item => item.type === 'order' && item.is_new_customer).length;\\n\\n// Calculate revenue\\nconst revenue = data.filter(item => item.type === 'order').reduce((sum, item) => sum + item.amount, 0);\\n\\n// Calculate metrics\\nconst CAC = newCustomers > 0 ? totalSpend / newCustomers : 0;\\nconst ROI = totalSpend > 0 ? ((revenue - totalSpend) / totalSpend * 100) : 0;\\nconst ROAS = totalSpend > 0 ? revenue / totalSpend : 0;\\n\\nreturn {\\n period: 'Last 30 Days',\\n totalSpend,\\n newCustomers,\\n revenue,\\n CAC: CAC.toFixed(2),\\n ROI: ROI.toFixed(1) + '%',\\n ROAS: ROAS.toFixed(2) + 'x'\\n};\"\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Store in Database\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"marketing_metrics\"\n },\n \"position\": [1050, 200]\n },\n {\n \"name\": \"Send Report\",\n \"type\": \"n8n-nodes-base.slack\",\n \"parameters\": {\n \"channel\": \"#marketing\",\n \"text\": \"\ud83d\udcca Weekly Marketing Report\\n\\n\ud83d\udcb0 Spend: ${{ $json.totalSpend }}\\n\ud83d\udc65 New Customers: {{ $json.newCustomers }}\\n\ud83d\udcb5 Revenue: ${{ $json.revenue }}\\n\ud83d\udcc8 CAC: ${{ $json.CAC }}\\n\ud83c\udfaf ROI: {{ $json.ROI }}\\n\u21a9\ufe0f ROAS: {{ $json.ROAS }}\"\n },\n \"position\": [1050, 400]\n }\n ]\n}\n```\n\n## Attribution Models\n\n### Last-Touch Attribution\n```javascript\n// Credit the last interaction before conversion\nconst lastTouch = customer.interactions.slice(-1)[0];\nchannelCredits[lastTouch.channel] += 1;\n```\n\n### Linear Attribution\n```javascript\n// Equal credit to all touchpoints\nconst creditPerTouch = 1 / customer.interactions.length;\ncustomer.interactions.forEach(i => {\n channelCredits[i.channel] += creditPerTouch;\n});\n```\n\n### Time-Decay Attribution\n```javascript\n// More credit to recent interactions\ncustomer.interactions.forEach((interaction, index) => {\n const weight = Math.pow(2, index - customer.interactions.length + 1);\n channelCredits[interaction.channel] += weight;\n});\n```\n\n## Recommended Benchmarks\n\n| Metric | Good | Great | Excellent |\n|--------|------|-------|-----------|\n| LTV:CAC | 3:1 | 4:1 | 5:1+ |\n| ROI | 100% | 200% | 400%+ |\n| ROAS | 2x | 4x | 6x+ |\n| Payback Period | 12 mo | 6 mo | 3 mo |", "metadata": {"topic": "marketing_metrics", "type": "workflow", "priority": "high"}}
|
| 7 |
+
{"instruction": "How do I set up multi-channel marketing automation with n8n?", "input": "", "output": "# Multi-Channel Marketing Automation with n8n\n\nOrchestrate campaigns across Email, SMS, WhatsApp, LinkedIn, and Paid Ads from a single workflow.\n\n## Channel Integration Architecture\n\n```\nCampaign Trigger \u2192 Audience Segmentation \u2192 Channel Router \u2192 Multi-Channel Delivery\n \u251c\u2500\u2500 Email (Mailchimp/SendGrid)\n \u251c\u2500\u2500 SMS (Twilio/MessageBird)\n \u251c\u2500\u2500 WhatsApp (360dialog)\n \u251c\u2500\u2500 LinkedIn (API)\n \u2514\u2500\u2500 Retargeting (FB/Google)\n```\n\n## Unified Campaign Workflow\n\n```json\n{\n \"name\": \"Multi-Channel Campaign\",\n \"nodes\": [\n {\n \"name\": \"Campaign Trigger\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"campaign/launch\"\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Fetch Audience\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"select\",\n \"table\": \"contacts\",\n \"conditions\": \"segment = '{{ $json.targetSegment }}'\"\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Split by Preference\",\n \"type\": \"n8n-nodes-base.splitInBatches\",\n \"position\": [650, 300]\n },\n {\n \"name\": \"Channel Router\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": {\n \"rules\": [\n {\"output\": 0, \"value\": \"email\"},\n {\"output\": 1, \"value\": \"sms\"},\n {\"output\": 2, \"value\": \"whatsapp\"},\n {\"output\": 3, \"value\": \"linkedin\"}\n ]\n },\n \"expression\": \"={{ $json.preferred_channel }}\"\n },\n \"position\": [850, 300]\n },\n {\n \"name\": \"Send Email\",\n \"type\": \"n8n-nodes-base.sendGrid\",\n \"parameters\": {\n \"toEmail\": \"={{ $json.email }}\",\n \"subject\": \"={{ $json.campaignSubject }}\",\n \"content\": \"={{ $json.campaignContent }}\"\n },\n \"position\": [1050, 100]\n },\n {\n \"name\": \"Send SMS\",\n \"type\": \"n8n-nodes-base.twilio\",\n \"parameters\": {\n \"to\": \"={{ $json.phone }}\",\n \"body\": \"={{ $json.smsContent }}\"\n },\n \"position\": [1050, 250]\n },\n {\n \"name\": \"Send WhatsApp\",\n \"type\": \"n8n-nodes-base.whatsApp\",\n \"parameters\": {\n \"to\": \"={{ $json.phone }}\",\n \"template\": \"campaign_template_1\"\n },\n \"position\": [1050, 400]\n },\n {\n \"name\": \"LinkedIn Outreach\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.linkedin.com/v2/messages\",\n \"method\": \"POST\"\n },\n \"position\": [1050, 550]\n },\n {\n \"name\": \"Merge Results\",\n \"type\": \"n8n-nodes-base.merge\",\n \"parameters\": {\"mode\": \"append\"},\n \"position\": [1250, 300]\n },\n {\n \"name\": \"Log Engagement\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"campaign_logs\"\n },\n \"position\": [1450, 300]\n }\n ]\n}\n```\n\n## Channel Best Practices\n\n### Email\n- Send Tuesday-Thursday, 10am-2pm\n- Subject line < 50 characters\n- Personalize with {{firstName}}\n- A/B test subject lines\n\n### SMS\n- Keep under 160 characters\n- Include clear CTA\n- Respect quiet hours (9am-9pm)\n- Provide opt-out\n\n### WhatsApp\n- Use approved templates\n- Rich media support\n- 24-hour response window\n- High open rates (98%)\n\n### LinkedIn\n- Personalize connection requests\n- Send InMail sequentially\n- Limit to 100 connections/week\n- Follow up within 3 days\n\n## Engagement Tracking\n\n```javascript\n// Track engagement across channels\nconst engagement = {\n email: {opens: 45, clicks: 12, ctr: 0.27},\n sms: {delivered: 100, responses: 8, rate: 0.08},\n whatsapp: {read: 98, replies: 15, rate: 0.15},\n linkedin: {accepted: 32, replies: 5, rate: 0.16}\n};\n\n// Calculate weighted engagement score\nconst channelWeights = {email: 1, sms: 1.2, whatsapp: 1.5, linkedin: 2};\nconst score = Object.keys(engagement).reduce((sum, ch) => \n sum + engagement[ch].rate * channelWeights[ch], 0\n);\n```", "metadata": {"topic": "multi_channel_marketing", "type": "workflow", "priority": "high"}}
|
| 8 |
+
{"instruction": "How do I sync contacts between Odoo CRM and n8n for automated sales workflows?", "input": "", "output": "# Odoo CRM + n8n Integration for Sales Automation\n\nBidirectional sync between Odoo CRM and n8n for automated lead management, opportunity tracking, and sales workflows.\n\n## Odoo API Connection Setup\n\n```json\n{\n \"credentials\": {\n \"odoo\": {\n \"url\": \"https://your-instance.odoo.com\",\n \"database\": \"your_db\",\n \"username\": \"api_user\",\n \"password\": \"your_api_key\"\n }\n }\n}\n```\n\n## Sync Workflow: New Leads to Odoo\n\n```json\n{\n \"name\": \"Lead Capture to Odoo\",\n \"nodes\": [\n {\n \"name\": \"Webhook - New Lead\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"lead-capture\",\n \"httpMethod\": \"POST\"\n },\n \"position\": [250, 300]\n },\n {\n \"name\": \"Create Odoo Lead\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"lead\",\n \"operation\": \"create\",\n \"fields\": {\n \"name\": \"={{ $json.subject }}\",\n \"email_from\": \"={{ $json.email }}\",\n \"phone\": \"={{ $json.phone }}\",\n \"description\": \"={{ $json.message }}\",\n \"partner_name\": \"={{ $json.company }}\"\n }\n },\n \"position\": [450, 300]\n },\n {\n \"name\": \"Assign Sales Team\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"lead\",\n \"operation\": \"update\",\n \"leadId\": \"={{ $json.id }}\",\n \"fields\": {\n \"team_id\": \"={{ $json.region === 'west' ? 1 : 2 }}\",\n \"user_id\": \"={{ $json.assignedRep }}\"\n }\n },\n \"position\": [650, 300]\n },\n {\n \"name\": \"Create Activity\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"activity\",\n \"operation\": \"create\",\n \"fields\": {\n \"res_model\": \"crm.lead\",\n \"res_id\": \"={{ $json.lead_id }}\",\n \"activity_type_id\": 2,\n \"summary\": \"Initial follow-up call\",\n \"date_deadline\": \"={{ $today.plus({days: 1}).toISODate() }}\"\n }\n },\n \"position\": [850, 300]\n }\n ]\n}\n```\n\n## Opportunity Stage Updates\n\n```json\n{\n \"name\": \"Monitor Odoo Stage Changes\",\n \"nodes\": [\n {\n \"name\": \"Poll Odoo\",\n \"type\": \"n8n-nodes-base.odoo\",\n \"parameters\": {\n \"resource\": \"lead\",\n \"operation\": \"getAll\",\n \"filters\": {\n \"write_date\": \">={{ $now.minus({minutes: 5}).toISO() }}\"\n }\n }\n },\n {\n \"name\": \"Check Stage Change\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.stage_id }}\",\n \"operation\": \"equals\",\n \"value2\": \"Won\"\n }]\n }\n }\n },\n {\n \"name\": \"Trigger Onboarding\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"method\": \"POST\",\n \"url\": \"https://n8n.example.com/webhook/onboarding\"\n }\n }\n ]\n}\n```\n\n## Odoo Models Reference\n\n| Model | Description | Key Fields |\n|-------|-------------|------------|\n| `crm.lead` | Leads & Opportunities | name, email_from, phone, stage_id |\n| `res.partner` | Contacts & Companies | name, email, phone, is_company |\n| `mail.activity` | Tasks & Activities | res_model, res_id, activity_type_id |\n| `sale.order` | Sales Orders | partner_id, amount_total, state |\n\n## Error Handling\n\n```javascript\n// Handle Odoo API errors\ntry {\n const result = await odooClient.create('crm.lead', leadData);\n return { success: true, id: result };\n} catch (error) {\n if (error.code === 'DUPLICATE') {\n // Find existing and update instead\n const existing = await odooClient.search('crm.lead', [['email_from', '=', leadData.email_from]]);\n await odooClient.update('crm.lead', existing[0], leadData);\n } else {\n throw error;\n }\n}\n```", "metadata": {"topic": "odoo_integration", "type": "workflow", "priority": "high"}}
|
| 9 |
+
{"instruction": "What are the best practices for implementing exponential backoff in n8n workflows?", "input": "", "output": "# Exponential Backoff Implementation in n8n\n\nExponential backoff is crucial for handling rate limits, temporary failures, and API quotas gracefully.\n\n## Exponential Backoff Theory\n\n```\nWait Time = base_delay \u00d7 (2 ^ attempt_number) + random_jitter\n```\n\n**Example with 1s base delay**:\n- Attempt 1: 1s\n- Attempt 2: 2s\n- Attempt 3: 4s\n- Attempt 4: 8s\n- Attempt 5: 16s\n\n## n8n Implementation\n\n### Method 1: Built-in Retry Settings\n\n```json\n{\n \"name\": \"HTTP Request with Retry\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/data\"\n },\n \"retryOnFail\": true,\n \"maxTries\": 5,\n \"waitBetweenTries\": 1000,\n \"continueOnFail\": false\n}\n```\n\n### Method 2: Custom Exponential Backoff\n\n```json\n{\n \"name\": \"Exponential Backoff Workflow\",\n \"nodes\": [\n {\n \"name\": \"Initialize\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\"number\": [\n {\"name\": \"attempt\", \"value\": 0},\n {\"name\": \"maxAttempts\", \"value\": 5},\n {\"name\": \"baseDelay\", \"value\": 1000}\n ]}\n }\n },\n {\n \"name\": \"Make Request\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/data\"\n },\n \"continueOnFail\": true\n },\n {\n \"name\": \"Check Success\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"number\": [{\n \"value1\": \"={{ $json.statusCode }}\",\n \"operation\": \"smaller\",\n \"value2\": 400\n }]\n }\n }\n },\n {\n \"name\": \"Calculate Wait Time\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const attempt = $json.attempt + 1;\\nconst baseDelay = $json.baseDelay;\\nconst maxAttempts = $json.maxAttempts;\\n\\nif (attempt >= maxAttempts) {\\n throw new Error('Max retry attempts reached');\\n}\\n\\n// Calculate exponential delay with jitter\\nconst exponentialDelay = baseDelay * Math.pow(2, attempt);\\nconst jitter = Math.random() * 1000;\\nconst waitTime = Math.min(exponentialDelay + jitter, 32000);\\n\\nreturn { attempt, waitTime, shouldRetry: true };\"\n }\n },\n {\n \"name\": \"Wait\",\n \"type\": \"n8n-nodes-base.wait\",\n \"parameters\": {\n \"amount\": \"={{ $json.waitTime }}\",\n \"unit\": \"milliseconds\"\n }\n }\n ]\n}\n```\n\n### Method 3: Error Trigger Pattern\n\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Error Trigger\",\n \"type\": \"n8n-nodes-base.errorTrigger\"\n },\n {\n \"name\": \"Analyze Error\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const error = $json.execution.error;\\nconst isRetryable = [429, 503, 502, 504].includes(error.httpCode);\\nconst isRateLimit = error.httpCode === 429;\\n\\nlet retryAfter = 60; // default\\nif (error.headers && error.headers['retry-after']) {\\n retryAfter = parseInt(error.headers['retry-after']) || 60;\\n}\\n\\nreturn { isRetryable, isRateLimit, retryAfter };\"\n }\n },\n {\n \"name\": \"Should Retry?\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"boolean\": [{\n \"value1\": \"={{ $json.isRetryable }}\",\n \"value2\": true\n }]\n }\n }\n },\n {\n \"name\": \"Queue for Retry\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"push\",\n \"key\": \"retry_queue\",\n \"data\": \"={{ JSON.stringify($json.originalPayload) }}\"\n }\n }\n ]\n}\n```\n\n## Best Practices\n\n1. **Set Maximum Retries**: Prevent infinite loops (typically 3-5)\n2. **Add Jitter**: Prevent thundering herd problem\n3. **Cap Maximum Delay**: Usually 30-60 seconds\n4. **Log All Retries**: For debugging and monitoring\n5. **Use Circuit Breaker**: Stop retrying after persistent failures\n\n## HTTP Status Code Handling\n\n| Code | Meaning | Should Retry? | Strategy |\n|------|---------|---------------|----------|\n| 429 | Too Many Requests | Yes | Use Retry-After header |\n| 500 | Server Error | Yes | Exponential backoff |\n| 502 | Bad Gateway | Yes | Short delay, then retry |\n| 503 | Service Unavailable | Yes | Exponential backoff |\n| 504 | Gateway Timeout | Yes | Increase timeout, retry |\n| 400 | Bad Request | No | Fix request data |\n| 401 | Unauthorized | No | Refresh credentials |\n| 403 | Forbidden | No | Check permissions |\n| 404 | Not Found | No | Verify URL/resource |", "metadata": {"topic": "error_handling", "type": "best_practice", "priority": "high"}}
|
| 10 |
+
{"instruction": "How do I implement GDPR-compliant data handling in n8n workflows?", "input": "", "output": "# GDPR-Compliant n8n Workflows\n\nEnsure your n8n workflows handle personal data in compliance with GDPR regulations.\n\n## GDPR Core Principles for Workflows\n\n1. **Lawful Basis**: Document why you're processing data\n2. **Data Minimization**: Only collect necessary data\n3. **Purpose Limitation**: Use data only for stated purposes\n4. **Storage Limitation**: Delete data when no longer needed\n5. **Integrity & Confidentiality**: Secure data in transit and at rest\n\n## Data Subject Rights Workflow\n\n```json\n{\n \"name\": \"GDPR Data Subject Request Handler\",\n \"nodes\": [\n {\n \"name\": \"Request Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\n \"path\": \"gdpr/request\",\n \"httpMethod\": \"POST\"\n }\n },\n {\n \"name\": \"Validate Request\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const request = $json.body;\\nconst validTypes = ['access', 'rectification', 'erasure', 'portability', 'restriction'];\\n\\nif (!validTypes.includes(request.type)) {\\n throw new Error('Invalid request type');\\n}\\n\\nif (!request.email || !request.verification_token) {\\n throw new Error('Missing required fields');\\n}\\n\\nreturn { ...request, validated: true, timestamp: new Date().toISOString() };\"\n }\n },\n {\n \"name\": \"Route by Type\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"expression\": \"={{ $json.type }}\"\n }\n },\n {\n \"name\": \"Handle Access Request\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Collect all data for this user\\nconst email = $json.email;\\n// Query all relevant tables/systems\\nreturn { action: 'compile_data_export', email };\"\n }\n },\n {\n \"name\": \"Handle Erasure Request\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"// Mark for deletion (with 30-day retention for legal holds)\\nreturn {\\n action: 'schedule_deletion',\\n email: $json.email,\\n scheduled_date: new Date(Date.now() + 30*24*60*60*1000).toISOString(),\\n systems: ['crm', 'email', 'analytics']\\n};\"\n }\n },\n {\n \"name\": \"Log Request\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"gdpr_requests\",\n \"data\": {\n \"email\": \"={{ $json.email }}\",\n \"type\": \"={{ $json.type }}\",\n \"status\": \"processing\",\n \"created_at\": \"={{ $now.toISO() }}\"\n }\n }\n }\n ]\n}\n```\n\n## Consent Management\n\n```json\n{\n \"name\": \"Consent Tracking\",\n \"nodes\": [\n {\n \"name\": \"Consent Form Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\"path\": \"consent\"}\n },\n {\n \"name\": \"Store Consent\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"upsert\",\n \"table\": \"consents\",\n \"data\": {\n \"email\": \"={{ $json.email }}\",\n \"marketing_consent\": \"={{ $json.marketing }}\",\n \"analytics_consent\": \"={{ $json.analytics }}\",\n \"consent_version\": \"v2.1\",\n \"ip_address\": \"={{ $json.ip }}\",\n \"consent_date\": \"={{ $now.toISO() }}\"\n }\n }\n }\n ]\n}\n```\n\n## Data Anonymization Pattern\n\n```javascript\n// Anonymize PII before analytics processing\nfunction anonymize(data) {\n return {\n ...data,\n email: hashEmail(data.email), // One-way hash\n name: null,\n phone: null,\n ip: data.ip.replace(/\\.\\d+$/, '.0'), // Partial IP\n user_id: generatePseudonymousId(data.user_id)\n };\n}\n```\n\n## Required Documentation\n\n- [ ] Data Processing Register\n- [ ] Privacy Impact Assessment\n- [ ] Consent Records\n- [ ] Data Retention Schedule\n- [ ] Breach Response Plan", "metadata": {"topic": "gdpr_compliance", "type": "guide", "priority": "high"}}
|
| 11 |
+
{"instruction": "How do I securely manage API keys and secrets in n8n?", "input": "", "output": "# Secret Management Best Practices in n8n\n\nSecure handling of API keys, credentials, and sensitive data in n8n workflows.\n\n## n8n Built-in Credential Management\n\n### Creating Secure Credentials\n\n1. Navigate to **Settings \u2192 Credentials**\n2. Click **Add Credential**\n3. Select the service type\n4. Enter credentials (stored encrypted at rest)\n\n### Credential Encryption\n\nn8n encrypts credentials using:\n- AES-256-GCM encryption\n- Per-instance encryption key (`N8N_ENCRYPTION_KEY`)\n\n**Set strong encryption key**:\n```bash\nexport N8N_ENCRYPTION_KEY=$(openssl rand -base64 32)\n```\n\n## External Secret Management\n\n### HashiCorp Vault Integration\n\n```json\n{\n \"name\": \"Fetch Secret from Vault\",\n \"nodes\": [\n {\n \"name\": \"Get Vault Token\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://vault.example.com/v1/auth/token/lookup-self\",\n \"headers\": {\n \"X-Vault-Token\": \"{{ $env.VAULT_TOKEN }}\"\n }\n }\n },\n {\n \"name\": \"Fetch Secret\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://vault.example.com/v1/secret/data/api-keys\",\n \"headers\": {\n \"X-Vault-Token\": \"{{ $env.VAULT_TOKEN }}\"\n }\n }\n },\n {\n \"name\": \"Use Secret\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.service.com/data\",\n \"headers\": {\n \"Authorization\": \"Bearer {{ $json.data.data.api_key }}\"\n }\n }\n }\n ]\n}\n```\n\n### AWS Secrets Manager\n\n```json\n{\n \"name\": \"AWS Secrets Manager\",\n \"type\": \"n8n-nodes-base.awsSecretsManager\",\n \"parameters\": {\n \"operation\": \"get\",\n \"secretId\": \"prod/api/stripe\"\n }\n}\n```\n\n## Environment Variable Best Practices\n\n```bash\n# .env file (never commit to git!)\nN8N_ENCRYPTION_KEY=your-secure-key\nSTRIPE_SECRET_KEY=sk_live_xxx\nDATABASE_URL=postgres://user:pass@host/db\n\n# Use in workflows\n{{ $env.STRIPE_SECRET_KEY }}\n```\n\n## Security Checklist\n\n- [ ] Use n8n's credential system (never hardcode)\n- [ ] Set strong `N8N_ENCRYPTION_KEY`\n- [ ] Use environment variables for deployment secrets\n- [ ] Rotate credentials regularly\n- [ ] Audit credential access\n- [ ] Use least-privilege access\n- [ ] Enable audit logging\n- [ ] Use HTTPS exclusively\n\n## Credential Rotation Workflow\n\n```json\n{\n \"name\": \"API Key Rotation\",\n \"nodes\": [\n {\n \"name\": \"Schedule - Weekly\",\n \"type\": \"n8n-nodes-base.scheduleTrigger\",\n \"parameters\": {\"rule\": {\"interval\": [{\"field\": \"weeks\", \"weeks\": 1}]}}\n },\n {\n \"name\": \"Generate New Key\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"{{ $env.API_PROVIDER }}/keys\",\n \"method\": \"POST\"\n }\n },\n {\n \"name\": \"Update Vault\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://vault.example.com/v1/secret/data/api-keys\",\n \"method\": \"POST\",\n \"body\": {\"data\": {\"api_key\": \"={{ $json.new_key }}\"}}\n }\n },\n {\n \"name\": \"Revoke Old Key\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"{{ $env.API_PROVIDER }}/keys/{{ $json.old_key_id }}\",\n \"method\": \"DELETE\"\n }\n }\n ]\n}\n```", "metadata": {"topic": "secret_management", "type": "best_practice", "priority": "high"}}
|
| 12 |
+
{"instruction": "How do I implement caching in n8n workflows?", "input": "", "output": "# Caching Strategies in n8n Workflows\n\nReduce API calls, improve performance, and lower costs with effective caching.\n\n## Redis-Based Caching\n\n```json\n{\n \"name\": \"Cached API Request\",\n \"nodes\": [\n {\n \"name\": \"Check Cache\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"get\",\n \"key\": \"cache:api:{{ $json.endpoint }}\"\n }\n },\n {\n \"name\": \"Cache Hit?\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.value }}\",\n \"operation\": \"isNotEmpty\"\n }]\n }\n }\n },\n {\n \"name\": \"Return Cached\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\"string\": [{\"name\": \"data\", \"value\": \"={{ JSON.parse($json.value) }}\"}]}\n }\n },\n {\n \"name\": \"Fetch Fresh\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/{{ $json.endpoint }}\"\n }\n },\n {\n \"name\": \"Store in Cache\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"set\",\n \"key\": \"cache:api:{{ $json.endpoint }}\",\n \"value\": \"={{ JSON.stringify($json.data) }}\",\n \"expire\": true,\n \"ttl\": 3600\n }\n }\n ]\n}\n```\n\n## Supabase-Based Caching\n\n```json\n{\n \"name\": \"Database Cache Layer\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"upsert\",\n \"table\": \"cache\",\n \"data\": {\n \"cache_key\": \"={{ $json.key }}\",\n \"data\": \"={{ JSON.stringify($json.response) }}\",\n \"expires_at\": \"={{ $now.plus({hours: 1}).toISO() }}\"\n },\n \"onConflict\": \"cache_key\"\n }\n}\n```\n\n## Cache Invalidation Patterns\n\n### Time-Based (TTL)\n```javascript\n// Set expiration when caching\nconst ttl = 3600; // 1 hour\nawait redis.set(key, value, 'EX', ttl);\n```\n\n### Event-Based Invalidation\n```json\n{\n \"name\": \"Invalidate on Update\",\n \"nodes\": [\n {\n \"name\": \"Webhook - Data Updated\",\n \"type\": \"n8n-nodes-base.webhook\"\n },\n {\n \"name\": \"Delete Cache\",\n \"type\": \"n8n-nodes-base.redis\",\n \"parameters\": {\n \"operation\": \"delete\",\n \"key\": \"cache:{{ $json.entity }}:*\"\n }\n }\n ]\n}\n```\n\n## Caching Best Practices\n\n| Data Type | TTL | Strategy |\n|-----------|-----|----------|\n| Static data | 24h | Long cache |\n| User profiles | 1h | Medium + invalidation |\n| Real-time data | Never | Don't cache |\n| API responses | 5-15min | Short cache |\n| Expensive queries | 1h | Warm on write |", "metadata": {"topic": "caching", "type": "best_practice", "priority": "high"}}
|
| 13 |
+
{"instruction": "How do I implement batch processing for large datasets in n8n?", "input": "", "output": "# Batch Processing for Large Datasets in n8n\n\nProcess thousands of items efficiently without memory issues or timeouts.\n\n## Split in Batches Node\n\n```json\n{\n \"name\": \"Batch Processor\",\n \"nodes\": [\n {\n \"name\": \"Get All Items\",\n \"type\": \"n8n-nodes-base.supabase\",\n \"parameters\": {\n \"operation\": \"select\",\n \"table\": \"items\",\n \"returnAll\": true\n }\n },\n {\n \"name\": \"Split Batches\",\n \"type\": \"n8n-nodes-base.splitInBatches\",\n \"parameters\": {\n \"batchSize\": 50,\n \"options\": {}\n }\n },\n {\n \"name\": \"Process Batch\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/bulk\",\n \"method\": \"POST\",\n \"body\": \"={{ $json }}\"\n }\n },\n {\n \"name\": \"Rate Limit Wait\",\n \"type\": \"n8n-nodes-base.wait\",\n \"parameters\": {\n \"amount\": 1,\n \"unit\": \"seconds\"\n }\n },\n {\n \"name\": \"Loop Back\",\n \"type\": \"n8n-nodes-base.noOp\"\n }\n ],\n \"connections\": {\n \"Split Batches\": {\n \"main\": [\n [{\"node\": \"Process Batch\", \"type\": \"main\", \"index\": 0}],\n [{\"node\": \"Complete\", \"type\": \"main\", \"index\": 0}]\n ]\n },\n \"Rate Limit Wait\": {\n \"main\": [[{\"node\": \"Split Batches\", \"type\": \"main\", \"index\": 0}]]\n }\n }\n}\n```\n\n## Memory-Efficient Streaming\n\n```json\n{\n \"name\": \"Stream Large File\",\n \"nodes\": [\n {\n \"name\": \"Read File in Chunks\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const fs = require('fs');\\nconst readline = require('readline');\\n\\nconst stream = fs.createReadStream('/path/to/large-file.csv');\\nconst rl = readline.createInterface({input: stream});\\n\\nconst batch = [];\\nlet batchNum = 0;\\n\\nfor await (const line of rl) {\\n batch.push(parseCsvLine(line));\\n if (batch.length >= 100) {\\n // Process batch\\n await processBatch(batch);\\n batch.length = 0;\\n }\\n}\"\n }\n }\n ]\n}\n```\n\n## Pagination Pattern\n\n```json\n{\n \"name\": \"Paginated API Fetch\",\n \"nodes\": [\n {\n \"name\": \"Initialize\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\n \"number\": [\n {\"name\": \"page\", \"value\": 1},\n {\"name\": \"pageSize\", \"value\": 100}\n ],\n \"boolean\": [{\"name\": \"hasMore\", \"value\": true}]\n }\n }\n },\n {\n \"name\": \"Fetch Page\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/items?page={{ $json.page }}&limit={{ $json.pageSize }}\"\n }\n },\n {\n \"name\": \"Check More Pages\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"number\": [{\n \"value1\": \"={{ $json.items.length }}\",\n \"operation\": \"equal\",\n \"value2\": \"={{ $json.pageSize }}\"\n }]\n }\n }\n },\n {\n \"name\": \"Increment Page\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"return { page: $json.page + 1, pageSize: $json.pageSize };\"\n }\n }\n ]\n}\n```\n\n## Batch Processing Metrics\n\n| Batch Size | Memory Usage | Speed | Use Case |\n|------------|--------------|-------|----------|\n| 10 | Low | Slow | API rate limits |\n| 50 | Medium | Balanced | General processing |\n| 100 | Higher | Fast | Database inserts |\n| 1000 | High | Very fast | Bulk operations |", "metadata": {"topic": "batch_processing", "type": "best_practice", "priority": "high"}}
|
docs-dataset/mcp_server_docs.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ab79cd9f2054f50e66fb0d9f4d659012c23b20da10ccd68de734b2b30d85098
|
| 3 |
+
size 10775821
|
docs-dataset/mcp_server_master_list.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/mcp_training_data.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/multimodal/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# n8n-Toolkit: Qwen3-VL Multimodal Training Dataset
|
| 2 |
+
|
| 3 |
+
A comprehensive multimodal training dataset for fine-tuning Qwen3-VL models on business automation, no-code tooling, and workflow expertise.
|
| 4 |
+
|
| 5 |
+
## 📊 Dataset Stats
|
| 6 |
+
|
| 7 |
+
| Metric | Count |
|
| 8 |
+
|--------|-------|
|
| 9 |
+
| **Total Examples** | 8,521 |
|
| 10 |
+
| **Vision Examples** | 2,391 |
|
| 11 |
+
| **Text Examples** | 6,130 |
|
| 12 |
+
| **n8n Workflow Screenshots** | 2,274 |
|
| 13 |
+
| **GoHighLevel Screenshots** | 58 |
|
| 14 |
+
| **Odoo Screenshots** | 170 |
|
| 15 |
+
|
| 16 |
+
## 🏗️ Schema
|
| 17 |
+
|
| 18 |
+
Flat schema optimized for HuggingFace compatibility:
|
| 19 |
+
|
| 20 |
+
| Column | Type | Description |
|
| 21 |
+
|--------|------|-------------|
|
| 22 |
+
| `instruction` | string | User's question or prompt |
|
| 23 |
+
| `response` | string | Assistant's detailed answer |
|
| 24 |
+
| `image_path` | string | Path to image (empty for text-only) |
|
| 25 |
+
| `has_image` | bool | True for vision examples |
|
| 26 |
+
| `id` | string | Unique example identifier |
|
| 27 |
+
| `category` | string | Topic category |
|
| 28 |
+
| `source` | string | Data source |
|
| 29 |
+
| `platform` | string | Platform (n8n, GHL, Odoo) |
|
| 30 |
+
| `complexity` | string | Difficulty level |
|
| 31 |
+
|
| 32 |
+
## 🚀 Quick Start
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from datasets import load_dataset
|
| 36 |
+
|
| 37 |
+
# Load the dataset
|
| 38 |
+
dataset = load_dataset("DavidrPatton/n8n-Toolkit", data_files={'train': 'train.jsonl'})
|
| 39 |
+
|
| 40 |
+
print(f"Total examples: {len(dataset['train'])}")
|
| 41 |
+
# Total examples: 8521
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## 🔄 Convert to Qwen3-VL Format
|
| 45 |
+
|
| 46 |
+
For fine-tuning with Unsloth, transform to the messages format:
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from PIL import Image
|
| 50 |
+
|
| 51 |
+
def to_qwen3_vl_format(row, screenshots_dir):
|
| 52 |
+
"""Convert flat row to Qwen3-VL messages format."""
|
| 53 |
+
user_content = [{"type": "text", "text": row['instruction']}]
|
| 54 |
+
|
| 55 |
+
# Add image if present
|
| 56 |
+
if row['has_image'] and row['image_path']:
|
| 57 |
+
img_path = f"{screenshots_dir}/{row['image_path']}"
|
| 58 |
+
img = Image.open(img_path)
|
| 59 |
+
user_content.insert(0, {"type": "image", "image": img})
|
| 60 |
+
|
| 61 |
+
return {
|
| 62 |
+
"messages": [
|
| 63 |
+
{"role": "user", "content": user_content},
|
| 64 |
+
{"role": "assistant", "content": [{"type": "text", "text": row['response']}]}
|
| 65 |
+
]
|
| 66 |
+
}
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## 📁 Repository Structure
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
├── train.jsonl # Main training data (8,521 examples)
|
| 73 |
+
├── screenshots/
|
| 74 |
+
│ ├── n8n-workflows/ # 2,274 n8n workflow screenshots
|
| 75 |
+
│ ├── gohighlevel/ # 58 GoHighLevel screenshots
|
| 76 |
+
│ └── odoo/ # 170 Odoo ERP screenshots
|
| 77 |
+
└── json_workflows/ # 323 n8n workflow JSON templates
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## 🎯 Topics Covered
|
| 81 |
+
|
| 82 |
+
- **n8n Workflow Automation** - Triggers, nodes, integrations, debugging
|
| 83 |
+
- **GoHighLevel CRM** - Marketing automation, funnels, campaigns
|
| 84 |
+
- **Odoo ERP** - CRM, Sales, Inventory, Accounting modules
|
| 85 |
+
- **AI/LLM Integration** - OpenAI, Anthropic, embeddings, RAG
|
| 86 |
+
- **Full-Stack Development** - JavaScript, React, CSS, APIs
|
| 87 |
+
|
| 88 |
+
## 📜 License
|
| 89 |
+
|
| 90 |
+
Apache 2.0
|
| 91 |
+
|
| 92 |
+
## 🔗 Links
|
| 93 |
+
|
| 94 |
+
- [GitHub Repository](https://github.com/David2024patton/n8n-docs-datasets)
|
| 95 |
+
- [Qwen3-VL Documentation](https://huggingface.co/Qwen)
|
docs-dataset/multimodal/combined_training.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78d246f78fdf9d0cce230cbdf51935bbc9162a47daabc9239e7572ac9406ce31
|
| 3 |
+
size 68145747
|
docs-dataset/multimodal/flat_training.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:364824e57c67d43c11178a29ffea15f1a8e864012a2a4990d0c73c32b5a25601
|
| 3 |
+
size 66923347
|
docs-dataset/multimodal/normalized_training.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1e2dba9d457a08c2955304934a6406c3b7b061ff457abff1f64d033ba2d5591
|
| 3 |
+
size 67141541
|
docs-dataset/multimodal/text_training.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0251e1c4883508b5375c58351cd0c3cdc85fab1c7c957dc49b02f23460c5111
|
| 3 |
+
size 65730026
|
docs-dataset/multimodal/vision_training.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/phase1_critical_gaps.jsonl
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "What's wrong with this n8n workflow that keeps running forever?", "output": "**Anti-Pattern: Infinite Loop Detection**\n\nThe workflow creates an infinite loop because a webhook triggers itself:\n\n```\nWebhook → HTTP Request (calls same webhook URL) → Webhook triggers again\n```\n\n**Why It's Bad:**\n- Consumes all available executions\n- Can crash the n8n instance\n- May exceed API rate limits\n- Uses memory until system fails\n\n**How to Fix:**\n1. Add a loop counter in workflow data\n2. Use IF node to check counter before HTTP call\n3. Add unique execution ID to prevent re-triggering\n4. Use a Set node to track processed items\n\n```javascript\n// In Code node - add loop protection\nconst MAX_ITERATIONS = 10;\nconst currentCount = $input.first().json.loopCount || 0;\n\nif (currentCount >= MAX_ITERATIONS) {\n throw new Error('Loop limit reached');\n}\n\nreturn { loopCount: currentCount + 1 };\n```", "metadata": {"topic": "anti_pattern", "type": "infinite_loop", "severity": "critical"}}
|
| 2 |
+
{"instruction": "Why is my n8n workflow using too much memory?", "output": "**Anti-Pattern: Memory Leak in Workflow**\n\nCommon causes of memory issues in n8n:\n\n**1. Loading Entire Datasets**\n```javascript\n// BAD: Loads everything into memory\nconst allRecords = await getAll(); // 1 million rows\n```\n\n**Solution: Use pagination**\n```javascript\n// GOOD: Process in batches\nconst batchSize = 100;\nfor (let offset = 0; ; offset += batchSize) {\n const batch = await getPage(offset, batchSize);\n if (batch.length === 0) break;\n // Process batch\n}\n```\n\n**2. Not Cleaning Up Binary Data**\n```javascript\n// BAD: Retaining binary data through workflow\nreturn items; // Carries all attachments forward\n```\n\n**Solution: Drop binary when not needed**\n```javascript\n// GOOD: Remove binary data after processing\nreturn items.map(item => ({\n json: item.json,\n binary: {} // Clear binary\n}));\n```\n\n**3. Using Item Lists node without limits**\n- Always set a maximum limit\n- Use Split In Batches to process chunks\n- Enable 'Execute Once' when possible", "metadata": {"topic": "anti_pattern", "type": "memory_leak", "severity": "high"}}
|
| 3 |
+
{"instruction": "What security mistakes should I avoid in n8n workflows?", "output": "**Security Anti-Patterns in n8n**\n\n**1. Hardcoded Credentials (CRITICAL)**\n```javascript\n// NEVER DO THIS\nconst apiKey = \"sk-live-abc123def456\";\n```\n\n**Fix: Use n8n Credentials**\n- Create credential in n8n UI\n- Reference via credential node parameter\n- Credentials are encrypted at rest\n\n**2. Exposing Sensitive Data in Logs**\n```javascript\n// BAD: Logs contain secrets\nconsole.log('Request:', JSON.stringify(requestWithApiKey));\n```\n\n**Fix: Sanitize before logging**\n```javascript\nconst sanitized = { ...request, apiKey: '[REDACTED]' };\nconsole.log('Request:', JSON.stringify(sanitized));\n```\n\n**3. No Webhook Authentication**\n```javascript\n// BAD: Public webhook anyone can call\n// Webhook → Process sensitive data\n```\n\n**Fix: Add authentication**\n- Enable 'Authentication' in webhook node\n- Use Header Auth with secret key\n- Validate IP whitelist in Code node\n\n**4. SQL Injection Vulnerability**\n```javascript\n// BAD: Direct string interpolation\nconst query = `SELECT * FROM users WHERE id = ${userId}`;\n```\n\n**Fix: Use parameterized queries**\n```javascript\nconst query = 'SELECT * FROM users WHERE id = $1';\nconst params = [userId];\n```", "metadata": {"topic": "anti_pattern", "type": "security", "severity": "critical"}}
|
| 4 |
+
{"instruction": "How do I prevent API abuse in my n8n workflows?", "output": "**Preventing API Abuse in n8n**\n\n**1. Rate Limiting Pattern**\n```javascript\n// Add rate limiting in Code node\nconst RATE_LIMIT = 10; // requests per minute\nconst cacheKey = `rate_limit_${$input.first().json.clientId}`;\n\n// Check Redis/memory for rate count\nconst currentCount = await getFromCache(cacheKey) || 0;\nif (currentCount >= RATE_LIMIT) {\n throw new Error('Rate limit exceeded. Try again in 1 minute.');\n}\n\nawait setInCache(cacheKey, currentCount + 1, 60); // TTL 60 seconds\n```\n\n**2. Input Validation**\n```javascript\n// Validate all webhook inputs\nconst { email, amount } = $input.first().json;\n\nif (!email || !email.includes('@')) {\n throw new Error('Invalid email format');\n}\n\nif (typeof amount !== 'number' || amount < 0 || amount > 10000) {\n throw new Error('Invalid amount: must be 0-10000');\n}\n```\n\n**3. Request Size Limits**\n- Set max body size in n8n config\n- Validate file sizes before processing\n- Reject oversized payloads early\n\n**4. Timeout Protection**\n- Set execution timeout in workflow settings\n- Add timeout to HTTP Request nodes\n- Use circuit breaker pattern for external APIs", "metadata": {"topic": "anti_pattern", "type": "api_abuse", "severity": "high"}}
|
| 5 |
+
{"instruction": "What performance mistakes slow down n8n workflows?", "output": "**Performance Anti-Patterns in n8n**\n\n**1. Synchronous Processing of Large Lists**\n```javascript\n// BAD: Processes 10,000 items sequentially\nfor (const item of items) {\n await processItem(item); // Waits for each\n}\n```\n\n**Fix: Use batching and parallelism**\n- Split In Batches node (set batch size 50-100)\n- Enable 'Continue On Fail' to not block on errors\n\n**2. No Caching for Repeated Lookups**\n```javascript\n// BAD: Fetches same config for every item\nfor (const item of items) {\n const config = await fetchConfig(); // Same every time!\n}\n```\n\n**Fix: Cache common data**\n```javascript\n// Fetch once, reuse\nconst config = await fetchConfig();\nreturn items.map(item => ({\n ...item,\n config\n}));\n```\n\n**3. Fetching Unnecessary Fields**\n```javascript\n// BAD: Gets entire object when only need ID\nconst users = await getUsers(); // Returns 50 fields each\nconst ids = users.map(u => u.id); // Only using 1 field\n```\n\n**Fix: Use API field selection**\n```javascript\nconst users = await getUsers({ fields: 'id' });\n```\n\n**4. Not Using Pagination**\n```javascript\n// BAD: Tries to load all records\nconst allOrders = await api.getOrders(); // 1 million records\n```\n\n**Fix: Stream with pagination**\n```javascript\nlet page = 1;\nwhile (true) {\n const orders = await api.getOrders({ page, limit: 100 });\n if (!orders.length) break;\n yield orders; // Process page\n page++;\n}\n```", "metadata": {"topic": "anti_pattern", "type": "performance", "severity": "medium"}}
|
| 6 |
+
{"instruction": "What architecture mistakes should I avoid when building n8n workflows?", "output": "**Architecture Anti-Patterns in n8n**\n\n**1. Monolithic Mega-Workflows**\n- Single workflow with 100+ nodes\n- Hard to debug, maintain, or modify\n- One failure crashes everything\n\n**Fix: Decompose into sub-workflows**\n```\nMain Workflow\n → Execute Workflow: Fetch Data\n → Execute Workflow: Transform Data\n → Execute Workflow: Send Notifications\n```\n\n**2. Tight Coupling to External Services**\n```javascript\n// BAD: Direct calls everywhere\nawait sendgrid.send(email);\nawait sendgrid.send(email2);\nawait sendgrid.send(email3);\n```\n\n**Fix: Abstract through wrapper nodes**\n- Create reusable sub-workflow for email\n- Easy to swap providers later\n- Single place to add logging/retry\n\n**3. No Error Handling Strategy**\n```\nStart → Fetch → Transform → Save\n// If Transform fails, entire workflow fails\n```\n\n**Fix: Add error boundaries**\n```\nStart → Fetch → Error Trigger attached\n ↓\n Transform → Error Trigger attached\n ↓\n Save → Success notification\n```\n\n**4. Hardcoded Business Logic**\n```javascript\n// BAD: Magic numbers in code\nif (order.total > 500) { // Why 500?\n applyDiscount(0.1); // Why 10%?\n}\n```\n\n**Fix: Externalize configuration**\n- Store thresholds in database\n- Use environment variables\n- Create config sub-workflow", "metadata": {"topic": "anti_pattern", "type": "architecture", "severity": "medium"}}
|
| 7 |
+
{"instruction": "How do I handle 'ECONNREFUSED' errors in n8n HTTP requests?", "output": "**Troubleshooting ECONNREFUSED in n8n**\n\nThis error means the target server refused the connection.\n\n**Common Causes & Fixes:**\n\n**1. Service Not Running**\n```bash\n# Check if service is running\ncurl http://localhost:3000/health\n# If fails, start the service\ndocker-compose up -d\n```\n\n**2. Incorrect URL/Port**\n- Verify the URL in HTTP Request node\n- Check port number matches service config\n- Use internal Docker network names if in containers\n\n**3. Firewall Blocking**\n```bash\n# Check firewall rules\nsudo ufw status\n# Allow the port\nsudo ufw allow 3000\n```\n\n**4. n8n in Docker Can't Reach localhost**\n```yaml\n# docker-compose.yml fix\nservices:\n n8n:\n extra_hosts:\n - \"host.docker.internal:host-gateway\"\n```\nThen use `http://host.docker.internal:3000` instead of `localhost`\n\n**5. Retry Strategy**\n```javascript\n// Add retry logic in Code node\nconst maxRetries = 3;\nfor (let i = 0; i < maxRetries; i++) {\n try {\n return await makeRequest();\n } catch (e) {\n if (i === maxRetries - 1) throw e;\n await sleep(1000 * Math.pow(2, i)); // Exponential backoff\n }\n}\n```", "metadata": {"topic": "troubleshooting", "error_type": "connection", "severity": "high"}}
|
| 8 |
+
{"instruction": "How do I debug '401 Unauthorized' errors in n8n?", "output": "**Debugging 401 Unauthorized in n8n**\n\n**Step 1: Verify Credentials**\n- Go to Credentials tab\n- Edit the credential and test connection\n- Check if API key/token is expired\n\n**Step 2: Check Authentication Method**\n| API Expects | n8n Setting |\n|-------------|-------------|\n| Bearer Token | Header Auth with 'Authorization: Bearer xxx' |\n| API Key Header | Header Auth with 'X-API-Key: xxx' |\n| Basic Auth | Credential type: HTTP Basic Auth |\n| OAuth2 | Credential type: OAuth2 API |\n\n**Step 3: Verify Headers**\n```javascript\n// In HTTP Request node, check these settings:\n{\n \"headerParameters\": {\n \"Authorization\": \"Bearer {{$credentials.apiKey}}\"\n }\n}\n```\n\n**Step 4: Test Outside n8n**\n```bash\n# Verify API works with curl\ncurl -H \"Authorization: Bearer YOUR_TOKEN\" \\\n https://api.example.com/endpoint\n```\n\n**Step 5: Common Fixes**\n- Regenerate API key if expired\n- Check if using test vs production keys\n- Verify OAuth scopes include required permissions\n- Check if IP whitelist is blocking n8n server\n\n**Step 6: Debug Mode**\n```javascript\n// Add to Code node to see actual request\nconsole.log('Request headers:', $request.headers);\nconsole.log('Auth config:', $credentials);\n```", "metadata": {"topic": "troubleshooting", "error_type": "auth", "severity": "high"}}
|
| 9 |
+
{"instruction": "How do I handle rate limiting errors (429) in n8n?", "output": "**Handling Rate Limits (429 Too Many Requests) in n8n**\n\n**1. Enable Built-in Retry**\nIn HTTP Request node settings:\n- Enable 'Retry On Fail'\n- Set 'Max Retries': 3\n- Set 'Wait Between Retries': 1000ms\n\n**2. Implement Exponential Backoff**\n```javascript\n// Code node with smart retry\nasync function withBackoff(fn, maxRetries = 5) {\n for (let i = 0; i < maxRetries; i++) {\n try {\n return await fn();\n } catch (error) {\n if (error.response?.status !== 429) throw error;\n \n // Get retry-after header or calculate\n const retryAfter = error.response.headers['retry-after'];\n const waitTime = retryAfter \n ? parseInt(retryAfter) * 1000 \n : Math.pow(2, i) * 1000;\n \n console.log(`Rate limited. Waiting ${waitTime}ms`);\n await new Promise(r => setTimeout(r, waitTime));\n }\n }\n throw new Error('Max retries exceeded');\n}\n```\n\n**3. Add Rate Limiting to Workflow**\n- Use 'Split In Batches' with 'Wait Between Batches'\n- Set batch time based on API limits (e.g., 1000ms for 60/min)\n\n**4. Queue-Based Processing**\n```\nWebhook → Add to Queue (Redis/Database)\n\nSeparate workflow:\nSchedule (every minute) → Get 50 from Queue → Process → Mark Complete\n```\n\n**5. Monitor and Alert**\n- Log rate limit occurrences\n- Set up alerting when rate limits spike\n- Consider upgrading API tier if consistently hitting limits", "metadata": {"topic": "troubleshooting", "error_type": "rate_limit", "severity": "medium"}}
|
| 10 |
+
{"instruction": "How do I debug 'undefined' or null values in n8n expressions?", "output": "**Debugging Undefined/Null Values in n8n Expressions**\n\n**1. Use Expression Editor Debug Mode**\nClick the expression field, use the built-in preview to see actual values.\n\n**2. Safe Property Access**\n```javascript\n// BAD: Crashes if customer is undefined\n{{ $json.customer.email }}\n\n// GOOD: Safe navigation\n{{ $json.customer?.email ?? 'no-email@example.com' }}\n\n// GOOD: With fallback\n{{ $json.customer?.email || 'default@email.com' }}\n```\n\n**3. Add Debug Code Node**\n```javascript\n// Insert after problematic node\nconsole.log('Full input:', JSON.stringify($input.all(), null, 2));\nconsole.log('First item json:', $input.first().json);\nconsole.log('Target field:', $input.first().json.customer);\n\nreturn $input.all();\n```\n\n**4. Check Data Flow**\n- Add 'Execution Data' view in workflow\n- Click each node to see output\n- Verify previous node is outputting expected structure\n\n**5. Common Causes**\n| Symptom | Likely Cause |\n|---------|--------------|\n| `undefined` | Field name typo or missing field |\n| `null` | API returned null value |\n| `[object Object]` | Need to access nested property |\n| Empty string | Field exists but has no value |\n\n**6. Defensive Code Pattern**\n```javascript\nconst data = $input.first().json;\n\n// Validate required fields\nconst required = ['email', 'name', 'orderId'];\nfor (const field of required) {\n if (!data[field]) {\n throw new Error(`Missing required field: ${field}`);\n }\n}\n```", "metadata": {"topic": "troubleshooting", "error_type": "data_access", "severity": "medium"}}
|
| 11 |
+
{"instruction": "How do I handle timeout errors in n8n?", "output": "**Handling Timeout Errors in n8n**\n\n**1. Increase Node-Level Timeout**\nIn HTTP Request node:\n- Settings → Timeout: 60000 (60 seconds)\n\n**2. Increase Workflow Execution Timeout**\n```bash\n# Environment variable\nEXECUTIONS_TIMEOUT=600 # 10 minutes\nEXECUTIONS_TIMEOUT_MAX=3600 # Max 1 hour\n```\n\n**3. Handle Long Operations Asynchronously**\n```\nStart → Trigger long job (returns job ID)\n → Wait node (30 seconds)\n → Poll job status\n → IF complete → Continue\n ELSE → Loop back to Wait\n```\n\n**4. Implement Timeout Wrapper**\n```javascript\n// Code node with timeout protection\nasync function withTimeout(promise, ms) {\n const timeout = new Promise((_, reject) => \n setTimeout(() => reject(new Error('Operation timed out')), ms)\n );\n return Promise.race([promise, timeout]);\n}\n\ntry {\n const result = await withTimeout(\n $http.request({ url: 'https://slow-api.com/data' }),\n 30000 // 30 second timeout\n );\n return { result };\n} catch (e) {\n return { error: e.message, fallback: true };\n}\n```\n\n**5. Chunk Large Operations**\nInstead of processing 10,000 items at once:\n```\nSplit In Batches (100 items) → Process → Merge results\n```\n\n**6. Use Webhook Callbacks for Long Jobs**\n```\nRequest → Start external job with callback URL\n → Return immediately\n\nWebhook listens → Job complete callback → Continue processing\n```", "metadata": {"topic": "troubleshooting", "error_type": "timeout", "severity": "medium"}}
|
| 12 |
+
{"instruction": "How do I build multi-tenant workflows in n8n?", "output": "**Multi-Tenant Architecture in n8n**\n\n**1. Tenant Identification**\n```javascript\n// Extract tenant from request\nconst tenantId = $input.first().json.headers['x-tenant-id']\n || $input.first().json.subdomain\n || 'default';\n\n// Validate tenant\nconst validTenants = await getTenantList();\nif (!validTenants.includes(tenantId)) {\n throw new Error('Invalid tenant');\n}\n\nreturn { tenantId, ...inputData };\n```\n\n**2. Tenant-Specific Credentials**\n```javascript\n// Store credentials per tenant in database\nconst tenantConfig = await db.query(\n 'SELECT api_key, webhook_url FROM tenant_config WHERE id = $1',\n [tenantId]\n);\n\n// Use tenant-specific settings\nreturn { \n apiKey: tenantConfig.api_key,\n webhookUrl: tenantConfig.webhook_url\n};\n```\n\n**3. Data Isolation Pattern**\n```javascript\n// Always filter by tenant\nconst orders = await db.query(\n 'SELECT * FROM orders WHERE tenant_id = $1 AND status = $2',\n [tenantId, 'pending']\n);\n\n// Never return data without tenant filter\n```\n\n**4. Workflow Per Tenant (Enterprise)**\n```\nMain Router Workflow\n → Switch node on tenantId\n → Execute Workflow: tenant_a_customizations\n → Execute Workflow: tenant_b_customizations\n → Common post-processing\n```\n\n**5. Audit Logging**\n```javascript\n// Log all operations with tenant context\nawait logAudit({\n tenantId,\n action: 'order_created',\n userId: $input.first().json.userId,\n timestamp: new Date().toISOString(),\n details: { orderId }\n});\n```", "metadata": {"topic": "enterprise", "pattern": "multi_tenant", "complexity": "advanced"}}
|
| 13 |
+
{"instruction": "How do I set up high-availability n8n in production?", "output": "**High-Availability n8n Architecture**\n\n**1. Multi-Instance Setup**\n```yaml\n# docker-compose-ha.yml\nservices:\n n8n-main:\n image: n8nio/n8n\n environment:\n - EXECUTIONS_MODE=queue\n - QUEUE_BULL_REDIS_HOST=redis\n deploy:\n replicas: 2\n \n n8n-worker:\n image: n8nio/n8n\n command: worker\n environment:\n - EXECUTIONS_MODE=queue\n - QUEUE_BULL_REDIS_HOST=redis\n deploy:\n replicas: 4\n \n redis:\n image: redis:alpine\n \n postgres:\n image: postgres:14\n```\n\n**2. Load Balancer Configuration**\n```nginx\nupstream n8n_cluster {\n least_conn;\n server n8n-1:5678;\n server n8n-2:5678;\n keepalive 32;\n}\n\nserver {\n location / {\n proxy_pass http://n8n_cluster;\n proxy_http_version 1.1;\n proxy_set_header Connection \"\";\n }\n}\n```\n\n**3. Database High Availability**\n- Use PostgreSQL with streaming replication\n- Or managed service (AWS RDS, Google Cloud SQL)\n- Enable connection pooling (PgBouncer)\n\n**4. Redis Cluster for Queue**\n```yaml\nredis:\n image: redis:alpine\n command: redis-server --appendonly yes\n volumes:\n - redis_data:/data\n deploy:\n replicas: 3\n```\n\n**5. Health Checks**\n```yaml\nhealthcheck:\n test: [\"CMD\", \"wget\", \"-q\", \"--spider\", \"http://localhost:5678/healthz\"]\n interval: 30s\n timeout: 10s\n retries: 3\n```\n\n**6. Auto-Scaling**\n```yaml\n# Kubernetes HPA\napiVersion: autoscaling/v2\nkind: HorizontalPodAutoscaler\nspec:\n minReplicas: 2\n maxReplicas: 10\n metrics:\n - type: Resource\n resource:\n name: cpu\n target:\n averageUtilization: 70\n```", "metadata": {"topic": "enterprise", "pattern": "high_availability", "complexity": "enterprise"}}
|
| 14 |
+
{"instruction": "How do I implement SSO/SAML authentication for n8n?", "output": "**SSO/SAML Authentication for n8n**\n\n**1. SAML Configuration**\n```bash\n# Environment variables for SAML\nN8N_SSO_SAML_ENABLED=true\nN8N_SSO_SAML_METADATA_URL=https://idp.company.com/metadata.xml\nN8N_SSO_SAML_ISSUER=n8n-production\nN8N_SSO_SAML_CALLBACK_URL=https://n8n.company.com/rest/sso/saml/callback\n```\n\n**2. Okta Integration**\n```xml\n<!-- SAML Attribute Mapping -->\n<Attribute Name=\"email\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:basic\">\n <AttributeValue>user.email</AttributeValue>\n</Attribute>\n<Attribute Name=\"firstName\" ...>user.firstName</Attribute>\n<Attribute Name=\"lastName\" ...>user.lastName</Attribute>\n```\n\n**3. Azure AD Setup**\n1. Register n8n as Enterprise Application\n2. Configure SAML SSO with:\n - Identifier: `n8n-production`\n - Reply URL: `https://n8n.company.com/rest/sso/saml/callback`\n3. Download Federation Metadata XML\n4. Set `N8N_SSO_SAML_METADATA_URL` to metadata URL\n\n**4. Role Mapping**\n```javascript\n// Map SAML groups to n8n roles\nconst samlGroups = user.attributes['memberOf'];\nconst roleMapping = {\n 'n8n-admins': 'owner',\n 'n8n-editors': 'admin',\n 'n8n-viewers': 'member'\n};\n\nconst n8nRole = samlGroups\n .map(g => roleMapping[g])\n .find(r => r) || 'member';\n```\n\n**5. Just-In-Time Provisioning**\n- Enable auto-creation of users on first login\n- Map SAML attributes to n8n user fields\n- Auto-assign to default workspace\n\n**6. Session Management**\n```bash\n# Session configuration\nN8N_USER_MANAGEMENT_JWT_SECRET=your-secure-secret\nN8N_USER_MANAGEMENT_JWT_DURATION_HOURS=8\n```", "metadata": {"topic": "enterprise", "pattern": "sso_saml", "complexity": "enterprise"}}
|
| 15 |
+
{"instruction": "How do I implement enterprise security compliance in n8n?", "output": "**Enterprise Security Compliance for n8n**\n\n**1. Encryption at Rest**\n```bash\n# Database encryption\nPOSTGRES_SSL_MODE=require\nN8N_ENCRYPTION_KEY=your-32-character-encryption-key\n```\n\n**2. Encryption in Transit**\n```nginx\n# Force HTTPS\nserver {\n listen 443 ssl;\n ssl_certificate /etc/ssl/certs/n8n.crt;\n ssl_certificate_key /etc/ssl/private/n8n.key;\n ssl_protocols TLSv1.2 TLSv1.3;\n}\n```\n\n**3. Audit Logging**\n```javascript\n// Custom audit logging sub-workflow\n// Called at start/end of sensitive workflows\nconst auditLog = {\n timestamp: new Date().toISOString(),\n workflowId: $workflow.id,\n workflowName: $workflow.name,\n executionId: $execution.id,\n userId: $execution.customData?.userId,\n action: 'workflow_executed',\n ipAddress: $input.first().json.headers['x-forwarded-for'],\n userAgent: $input.first().json.headers['user-agent']\n};\n\nawait sendToSIEM(auditLog);\n```\n\n**4. Data Masking**\n```javascript\n// Mask sensitive data in logs/outputs\nfunction maskSensitive(data) {\n const sensitiveFields = ['ssn', 'creditCard', 'password', 'apiKey'];\n const masked = { ...data };\n \n for (const field of sensitiveFields) {\n if (masked[field]) {\n masked[field] = '***MASKED***';\n }\n }\n return masked;\n}\n```\n\n**5. Access Control**\n- Enable RBAC in n8n settings\n- Create role-based workflow folders\n- Use credential sharing with minimal scope\n\n**6. Compliance Checklist**\n| Standard | n8n Configuration |\n|----------|-------------------|\n| SOC 2 | Audit logs, encryption, access control |\n| HIPAA | Data encryption, audit trails, BAA with hosting |\n| GDPR | Data retention policies, anonymization |\n| PCI-DSS | Network segmentation, encryption, logging |", "metadata": {"topic": "enterprise", "pattern": "security_compliance", "complexity": "enterprise"}}
|
docs-dataset/phase2_industry_specific.jsonl
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "How do I build HIPAA-compliant workflows in n8n?", "output": "**HIPAA-Compliant n8n Workflow Design**\n\n**1. Infrastructure Requirements**\n- Host n8n on HIPAA-compliant infrastructure (AWS, GCP, Azure with BAA)\n- Enable encryption at rest and in transit\n- Use dedicated VPC/VNet for healthcare workloads\n\n**2. Data Handling Rules**\n```javascript\n// Never log PHI (Protected Health Information)\nconst sensitiveFields = ['ssn', 'dob', 'medicalRecordNumber', 'diagnosis'];\n\nfunction sanitizeForLogging(data) {\n const safe = { ...data };\n sensitiveFields.forEach(field => {\n if (safe[field]) safe[field] = '[REDACTED]';\n });\n return safe;\n}\n\nconsole.log('Processing request:', sanitizeForLogging(patientData));\n```\n\n**3. Access Control Pattern**\n```javascript\n// Verify user has clearance for patient data\nconst userRole = $input.first().json.userRole;\nconst allowedRoles = ['physician', 'nurse', 'medical_admin'];\n\nif (!allowedRoles.includes(userRole)) {\n throw new Error('Access denied: Insufficient privileges for PHI');\n}\n```\n\n**4. Audit Trail Implementation**\n```javascript\n// Log every PHI access\nconst auditEntry = {\n timestamp: new Date().toISOString(),\n userId: user.id,\n action: 'PHI_ACCESS',\n patientId: patient.id,\n dataType: 'medical_record',\n ipAddress: request.ip,\n reason: request.accessReason\n};\n\nawait db.insert('hipaa_audit_log', auditEntry);\n```\n\n**5. Data Retention**\n- Implement automatic data expiration\n- Secure deletion with audit trail\n- 6-year minimum retention for medical records", "metadata": {"industry": "healthcare", "compliance": "hipaa", "complexity": "enterprise"}}
|
| 2 |
+
{"instruction": "How do I automate patient appointment scheduling with n8n?", "output": "**Patient Appointment Scheduling Automation**\n\n**Workflow Architecture:**\n```\nPatient Request (Form/Portal)\n ↓\nValidate Patient Identity\n ↓\nCheck Provider Availability\n ↓\nCreate Appointment (EHR System)\n ↓\nSend Confirmations (Email/SMS)\n ↓\nAdd to Provider Calendar\n ↓\nSchedule Reminders (24hr, 2hr before)\n```\n\n**1. Patient Intake Form Processing**\n```javascript\n// Webhook receives patient request\nconst { patientId, preferredDate, reason, provider } = $input.first().json;\n\n// Validate patient exists in EHR\nconst patient = await ehrApi.getPatient(patientId);\nif (!patient) {\n return { error: 'Patient not found', code: 'PATIENT_NOT_FOUND' };\n}\n```\n\n**2. Availability Check**\n```javascript\n// Check provider calendar\nconst availability = await calendarApi.getSlots({\n providerId: provider,\n date: preferredDate,\n duration: 30 // minutes\n});\n\n// Filter by patient's insurance\nconst validSlots = availability.filter(slot => \n slot.acceptsInsurance.includes(patient.insuranceProvider)\n);\n\nreturn { availableSlots: validSlots };\n```\n\n**3. Appointment Creation**\n```javascript\n// Create in EHR system\nconst appointment = await ehrApi.createAppointment({\n patientId,\n providerId: provider,\n dateTime: selectedSlot.startTime,\n duration: 30,\n type: reason,\n status: 'scheduled'\n});\n\n// Create calendar event\nawait googleCalendar.createEvent({\n summary: `Patient: ${patient.name}`,\n start: selectedSlot.startTime,\n attendees: [provider.email, patient.email]\n});\n```\n\n**4. Reminder Workflow**\n- 24 hours before: Email with prep instructions\n- 2 hours before: SMS reminder\n- Post-visit: Satisfaction survey", "metadata": {"industry": "healthcare", "use_case": "scheduling", "complexity": "intermediate"}}
|
| 3 |
+
{"instruction": "How do I integrate n8n with electronic health record (EHR) systems?", "output": "**EHR Integration Patterns for n8n**\n\n**Common EHR Systems & APIs:**\n| System | API Type | Auth Method |\n|--------|----------|-------------|\n| Epic | FHIR R4 | OAuth2 + JWT |\n| Cerner | FHIR R4 | OAuth2 |\n| Allscripts | REST | API Key |\n| Athenahealth | REST | OAuth2 |\n\n**1. FHIR Patient Query**\n```javascript\n// Fetch patient by MRN\nconst fhirBase = 'https://ehr.hospital.org/fhir/r4';\nconst response = await $http.request({\n method: 'GET',\n url: `${fhirBase}/Patient`,\n qs: { identifier: `MRN|${mrn}` },\n headers: { Authorization: `Bearer ${token}` }\n});\n\nconst patient = response.entry?.[0]?.resource;\n```\n\n**2. Create Clinical Note**\n```javascript\n// FHIR DocumentReference\nconst note = {\n resourceType: 'DocumentReference',\n status: 'current',\n type: {\n coding: [{ system: 'http://loinc.org', code: '11506-3' }]\n },\n subject: { reference: `Patient/${patientId}` },\n content: [{\n attachment: {\n contentType: 'text/plain',\n data: Buffer.from(noteText).toString('base64')\n }\n }]\n};\n\nawait $http.post(`${fhirBase}/DocumentReference`, { body: note });\n```\n\n**3. Lab Results Processing**\n```\nLab System Webhook → Parse HL7/FHIR\n ↓\nMatch to Patient Record\n ↓\nCheck for Critical Values\n ↓\nIF critical → Alert Provider (Urgent)\nELSE → Update Patient Portal\n```\n\n**4. Bi-Directional Sync**\n- Pull: Schedule polling for new orders\n- Push: Webhook for status updates\n- Conflict resolution: EHR is source of truth", "metadata": {"industry": "healthcare", "use_case": "ehr_integration", "complexity": "advanced"}}
|
| 4 |
+
{"instruction": "How do I build PCI-DSS compliant payment workflows in n8n?", "output": "**PCI-DSS Compliant Payment Processing in n8n**\n\n**Critical Rule: Never handle raw card data in n8n**\n\n**1. Tokenization Pattern**\n```\nCustomer → Payment Form (Stripe Elements/Square)\n ↓\n Creates Token (client-side)\n ↓\n Token sent to n8n webhook\n ↓\n n8n uses token to charge (never sees card)\n```\n\n**2. Webhook Security**\n```javascript\n// Verify webhook signature\nconst signature = $input.first().json.headers['stripe-signature'];\nconst payload = $input.first().json.body;\nconst secret = $credentials.stripeWebhookSecret;\n\nconst event = stripe.webhooks.constructEvent(payload, signature, secret);\nif (!event) {\n throw new Error('Invalid webhook signature');\n}\n```\n\n**3. Environment Isolation**\n```yaml\n# Production payment workflow in isolated environment\nservices:\n n8n-payments:\n networks:\n - pci-zone # Separate network segment\n environment:\n - N8N_ENCRYPTION_KEY=${PCI_ENCRYPTION_KEY}\n```\n\n**4. Audit Logging**\n```javascript\n// Log all payment operations (without sensitive data)\nconst auditLog = {\n timestamp: new Date().toISOString(),\n transactionId: charge.id,\n amount: charge.amount,\n currency: charge.currency,\n status: charge.status,\n // NEVER LOG: card number, CVV, full account numbers\n};\n\nawait logToSIEM('payment_processed', auditLog);\n```\n\n**5. Data Retention**\n- Transaction records: 7 years minimum\n- Tokenized references only\n- No card data storage ever", "metadata": {"industry": "finance", "compliance": "pci_dss", "complexity": "enterprise"}}
|
| 5 |
+
{"instruction": "How do I automate financial reporting with n8n?", "output": "**Automated Financial Reporting Workflow**\n\n**1. Data Collection Pipeline**\n```\nSchedule (Daily 2 AM)\n ↓\nPull from Multiple Sources:\n → Accounting System (QuickBooks/Xero)\n → Payment Processor (Stripe)\n → Bank Accounts (Plaid)\n → Expense System (Expensify)\n ↓\nConsolidate in Data Warehouse\n ↓\nGenerate Reports\n ↓\nDistribute to Stakeholders\n```\n\n**2. Multi-Source Aggregation**\n```javascript\n// Parallel data fetching\nconst [revenue, expenses, bankBalance] = await Promise.all([\n stripe.balanceTransactions.list({ created: { gte: startDate } }),\n quickbooks.expenses.query({ date: { $gte: startDate } }),\n plaid.accounts.getBalance({ access_token: bankToken })\n]);\n\nreturn {\n totalRevenue: revenue.reduce((s, t) => s + t.amount, 0),\n totalExpenses: expenses.reduce((s, e) => s + e.amount, 0),\n cashPosition: bankBalance.accounts[0].balances.current\n};\n```\n\n**3. Report Generation**\n```javascript\n// Create Excel report\nconst workbook = new ExcelJS.Workbook();\nconst sheet = workbook.addWorksheet('Monthly P&L');\n\nsheet.addRow(['Category', 'Amount', 'YoY Change']);\nsheet.addRow(['Revenue', revenue, `${yoyChange}%`]);\nsheet.addRow(['Expenses', expenses, `${expenseChange}%`]);\nsheet.addRow(['Net Income', revenue - expenses, '']);\n\nconst buffer = await workbook.xlsx.writeBuffer();\nreturn { binary: { report: { data: buffer, mimeType: 'application/xlsx' } } };\n```\n\n**4. Executive Dashboard Update**\n- Push KPIs to Google Sheets\n- Update Tableau/Looker extracts\n- Slack summary to finance channel\n\n**5. Variance Alerts**\n```javascript\n// Alert on significant variances\nif (Math.abs(actualVsBudget) > 0.1) {\n await slack.send({\n channel: '#finance-alerts',\n text: `⚠️ Budget variance alert: ${category} is ${variance}% off target`\n });\n}\n```", "metadata": {"industry": "finance", "use_case": "reporting", "complexity": "intermediate"}}
|
| 6 |
+
{"instruction": "How do I build fraud detection workflows in n8n?", "output": "**Fraud Detection Automation with n8n**\n\n**1. Real-Time Transaction Scoring**\n```\nPayment Webhook\n ↓\nExtract Transaction Features\n ↓\nCall ML Model (Fraud Score)\n ↓\nDecision Engine:\n - Score < 30: Auto-approve\n - Score 30-70: Queue for review\n - Score > 70: Auto-block + Alert\n```\n\n**2. Feature Extraction**\n```javascript\nconst transaction = $input.first().json;\n\nconst features = {\n amount: transaction.amount,\n isNewDevice: !knownDevices.includes(transaction.deviceId),\n isNewLocation: !usualLocations.includes(transaction.country),\n velocityLast1h: await getTransactionCount(userId, '1h'),\n velocityLast24h: await getTransactionCount(userId, '24h'),\n isUnusualMerchant: !frequentMerchants.includes(transaction.merchantId),\n hourOfDay: new Date().getHours(),\n dayOfWeek: new Date().getDay(),\n accountAge: daysSinceAccountCreation(user.createdAt)\n};\n\nreturn features;\n```\n\n**3. ML Model Integration**\n```javascript\n// Call fraud detection API\nconst score = await $http.post('https://ml.company.com/fraud/score', {\n body: features,\n headers: { 'X-API-Key': $credentials.mlApiKey }\n});\n\nreturn { \n fraudScore: score.probability,\n riskFactors: score.top_factors \n};\n```\n\n**4. Alert & Action Workflow**\n```javascript\nif (fraudScore > 70) {\n // Block transaction\n await paymentGateway.declineTransaction(transactionId);\n \n // Alert fraud team\n await pagerDuty.trigger({\n severity: 'critical',\n summary: `Blocked suspicious transaction: $${amount}`,\n details: { transactionId, userId, riskFactors }\n });\n \n // Lock user account pending review\n await userService.suspendAccount(userId, 'fraud_review');\n}\n```\n\n**5. Feedback Loop**\n- Track false positives/negatives\n- Retrain model monthly\n- Update rules based on new patterns", "metadata": {"industry": "finance", "use_case": "fraud_detection", "complexity": "advanced"}}
|
| 7 |
+
{"instruction": "How do I automate contract management with n8n?", "output": "**Contract Management Automation**\n\n**1. Contract Lifecycle Workflow**\n```\nNew Contract Request\n ↓\nGenerate from Template (with variables)\n ↓\nInternal Review Queue\n ↓\nSend for Signature (DocuSign/PandaDoc)\n ↓\nTrack Signature Status\n ↓\nStore Executed Contract\n ↓\nSet Renewal Reminders\n```\n\n**2. Template Generation**\n```javascript\n// Merge template with contract data\nconst template = await getTemplate(contractType);\nconst merged = template\n .replace('{{client_name}}', client.name)\n .replace('{{effective_date}}', effectiveDate)\n .replace('{{term_length}}', termMonths)\n .replace('{{monthly_fee}}', formatCurrency(monthlyFee))\n .replace('{{payment_terms}}', paymentTerms);\n\n// Generate PDF\nconst pdf = await pdfService.htmlToPdf(merged);\nreturn { binary: { contract: { data: pdf } } };\n```\n\n**3. eSignature Integration**\n```javascript\n// Send via DocuSign\nconst envelope = await docusign.createEnvelope({\n emailSubject: `Please sign: ${contractName}`,\n documents: [{ \n documentBase64: contractPdf,\n name: contractName \n }],\n recipients: {\n signers: [\n { email: client.email, name: client.name, routingOrder: 1 },\n { email: company.legalEmail, name: 'Legal Team', routingOrder: 2 }\n ]\n },\n status: 'sent'\n});\n```\n\n**4. Status Tracking**\n```\nDocuSign Webhook (status change)\n ↓\nUpdate CRM Deal Stage\n ↓\nIF signed: \n → Store in Document Management\n → Create recurring billing\n → Notify account team\n```\n\n**5. Renewal Management**\n```javascript\n// 90-day renewal reminder\nconst expiringContracts = await db.query(`\n SELECT * FROM contracts \n WHERE end_date BETWEEN NOW() AND NOW() + INTERVAL '90 days'\n AND renewal_notified = false\n`);\n\nfor (const contract of expiringContracts) {\n await sendRenewalReminder(contract);\n await updateNotificationStatus(contract.id);\n}\n```", "metadata": {"industry": "legal", "use_case": "contracts", "complexity": "intermediate"}}
|
| 8 |
+
{"instruction": "How do I implement audit trails and compliance logging in n8n?", "output": "**Audit Trail Implementation for Compliance**\n\n**1. Central Logging Architecture**\n```\nAny Workflow Action\n ↓\nExecute Sub-Workflow: Log Audit Event\n ↓\nWrite to Immutable Log Store\n ↓\nIndex in Search System\n```\n\n**2. Audit Event Structure**\n```javascript\n// Standard audit event format\nconst auditEvent = {\n // WHO\n userId: $execution.customData.userId,\n userEmail: $execution.customData.userEmail,\n userRole: $execution.customData.userRole,\n ipAddress: $input.first().json.headers?.['x-forwarded-for'],\n \n // WHAT\n action: 'RECORD_UPDATED',\n resourceType: 'customer',\n resourceId: customerId,\n \n // WHEN\n timestamp: new Date().toISOString(),\n executionId: $execution.id,\n workflowId: $workflow.id,\n \n // DETAILS\n changes: {\n before: previousState,\n after: newState\n }\n};\n```\n\n**3. Immutable Storage**\n```javascript\n// Write to append-only log\nawait s3.putObject({\n Bucket: 'audit-logs',\n Key: `${date}/${nanoid()}.json`,\n Body: JSON.stringify(auditEvent),\n ObjectLockMode: 'COMPLIANCE',\n ObjectLockRetainUntilDate: futureDate(7, 'years')\n});\n\n// Also index for search\nawait elasticsearch.index({\n index: 'audit-logs',\n body: auditEvent\n});\n```\n\n**4. Compliance Queries**\n```javascript\n// Who accessed this record in last 30 days?\nconst accessLog = await elasticsearch.search({\n index: 'audit-logs',\n body: {\n query: {\n bool: {\n must: [\n { match: { resourceId: recordId } },\n { range: { timestamp: { gte: 'now-30d' } } }\n ]\n }\n }\n }\n});\n```\n\n**5. Compliance Report Generation**\n- Scheduled weekly/monthly reports\n- Export to PDF for auditors\n- Anomaly detection (unusual access patterns)", "metadata": {"industry": "legal", "use_case": "audit_trail", "complexity": "advanced"}}
|
| 9 |
+
{"instruction": "How do I automate student enrollment workflows with n8n?", "output": "**Student Enrollment Automation**\n\n**1. Enrollment Pipeline**\n```\nApplication Submission (Form/Portal)\n ↓\nDocument Verification\n ↓\nEligibility Check\n ↓\nAcceptance Decision\n ↓\nCourse Registration\n ↓\nLMS Account Creation\n ↓\nWelcome Communication\n```\n\n**2. Application Processing**\n```javascript\n// Receive application\nconst application = $input.first().json;\n\n// Verify required documents\nconst requiredDocs = ['transcript', 'id_proof', 'photo'];\nconst missingDocs = requiredDocs.filter(doc => !application.documents[doc]);\n\nif (missingDocs.length > 0) {\n await sendEmail({\n to: application.email,\n subject: 'Missing Documents for Your Application',\n body: `Please submit: ${missingDocs.join(', ')}`\n });\n return { status: 'pending_documents', missing: missingDocs };\n}\n\nreturn { status: 'complete', readyForReview: true };\n```\n\n**3. LMS Integration (Canvas/Moodle)**\n```javascript\n// Create student in LMS\nconst lmsUser = await canvas.createUser({\n user: {\n name: `${student.firstName} ${student.lastName}`,\n short_name: student.firstName,\n email: student.email,\n sis_user_id: student.studentId\n }\n});\n\n// Enroll in courses\nfor (const courseId of selectedCourses) {\n await canvas.enrollUser({\n enrollment: {\n user_id: lmsUser.id,\n type: 'StudentEnrollment',\n enrollment_state: 'active'\n }\n }, courseId);\n}\n```\n\n**4. Welcome Sequence**\n```\nDay 0: Welcome email + credentials\nDay 1: Campus tour video\nDay 3: Academic advisor intro\nDay 7: First week check-in\n```\n\n**5. Status Dashboard Update**\n- Push enrollment stats to admin dashboard\n- Update capacity tracking\n- Notify departments of new students", "metadata": {"industry": "education", "use_case": "enrollment", "complexity": "intermediate"}}
|
| 10 |
+
{"instruction": "How do I automate grading and notifications for students?", "output": "**Automated Grading & Notification System**\n\n**1. Assignment Submission Pipeline**\n```\nStudent Submits Assignment (LMS)\n ↓\nLMS Webhook to n8n\n ↓\nIF auto-gradeable:\n → Run auto-grader\n → Record score\nELSE:\n → Queue for instructor review\n ↓\nPost grade to LMS\n ↓\nStudent notification\n ↓\nIF grade < passing:\n → Trigger support intervention\n```\n\n**2. Auto-Grading Integration**\n```javascript\n// For coding assignments\nconst submission = $input.first().json;\n\n// Run tests in sandbox\nconst result = await codeRunner.evaluate({\n code: submission.studentCode,\n language: 'python',\n testCases: assignment.testCases,\n timeout: 30000\n});\n\nconst score = (result.passed / result.total) * 100;\n\nreturn {\n score,\n feedback: result.feedback,\n passedTests: result.passed,\n totalTests: result.total\n};\n```\n\n**3. Grade Posting**\n```javascript\n// Post to Canvas gradebook\nawait canvas.postGrade({\n courseId: course.id,\n assignmentId: assignment.id,\n studentId: student.sisId,\n grade: score,\n comment: feedback\n});\n\n// Notify student\nawait sendEmail({\n to: student.email,\n subject: `Grade Posted: ${assignment.name}`,\n body: `Your score: ${score}%\\n\\n${feedback}`\n});\n```\n\n**4. At-Risk Student Detection**\n```javascript\n// Check for struggling students\nconst atRiskStudents = await db.query(`\n SELECT student_id, AVG(score) as avg_score\n FROM grades \n WHERE course_id = $1\n GROUP BY student_id\n HAVING AVG(score) < 70\n`, [courseId]);\n\n// Alert academic advisors\nfor (const student of atRiskStudents) {\n await notifyAdvisor(student.student_id, 'low_performance');\n}\n```\n\n**5. Parent/Guardian Notifications**\n- Weekly progress summaries\n- Alert on failing grades\n- Attendance reports", "metadata": {"industry": "education", "use_case": "grading", "complexity": "intermediate"}}
|
docs-dataset/phase3_visual_cases.jsonl
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "What is the SaaS configurator in GoHighLevel and how do I use it?", "output": "**GoHighLevel SaaS Configurator**\n\nThe SaaS Configurator allows agencies to create white-labeled SaaS offerings:\n\n**Key Features:**\n1. **Branding Control**: Custom domain, logo, colors, favicon\n2. **Feature Gating**: Enable/disable features per plan tier\n3. **Pricing Configuration**: Set monthly/annual pricing for clients\n4. **Rebilling Markup**: Configure markup on SMS, calls, emails\n\n**Setup Steps:**\n1. Agency Settings → SaaS Configurator\n2. Create pricing tiers (Starter, Pro, Enterprise)\n3. Define feature access per tier\n4. Set rebilling markups\n5. Configure Stripe for automated billing\n6. Generate client signup links\n\n**Common Use Cases:**\n- Marketing agencies selling CRM access\n- Consultants offering automation platforms\n- Franchises with branded portals", "metadata": {"platform": "gohighlevel", "feature": "saas_configurator", "visual": true}}
|
| 2 |
+
{"instruction": "How do I set up automation workflows in GoHighLevel?", "output": "**GoHighLevel Workflow Automation**\n\nNavigate to: Automation → Workflows\n\n**Workflow Components:**\n\n**1. Triggers (Starting Points)**\n- Form Submitted\n- Appointment Booked/Cancelled\n- Tag Added/Removed\n- Pipeline Stage Changed\n- Invoice Paid\n- Birthday/Custom Date\n- Inbound Call\n- Email Opened/Clicked\n- Webhook Received\n\n**2. Actions (What Happens)**\n- Send Email/SMS\n- Add/Remove Tag\n- Update Contact Field\n- Move to Pipeline Stage\n- Create Opportunity\n- Assign to User\n- Wait/Delay\n- IF/ELSE Conditions\n- Webhook Call\n\n**Best Practices:**\n1. Name workflows descriptively\n2. Use folders for organization\n3. Test with dummy data first\n4. Enable 'Execute Once' for triggered actions\n5. Set up error notifications\n\n**Example: Lead Nurture Sequence**\n```\nTrigger: Form Submitted (Contact Form)\n→ Wait 5 minutes\n→ Send Email: Welcome\n→ Wait 1 day\n→ Send SMS: Did you receive our email?\n→ Wait 3 days\n→ IF no reply → Assign to Sales Rep\n```", "metadata": {"platform": "gohighlevel", "feature": "workflows", "visual": true}}
|
| 3 |
+
{"instruction": "How do I manage opportunities and sales pipelines in GoHighLevel?", "output": "**GoHighLevel Pipeline Management**\n\nNavigate to: Opportunities\n\n**Pipeline Views:**\n- **Kanban**: Drag-and-drop cards between stages\n- **List**: Table view with filtering/sorting\n- **Calendar**: View by expected close date\n\n**Creating Pipelines:**\n1. Go to Opportunities → Pipelines tab\n2. Click 'Add Pipeline'\n3. Define stages (e.g., Lead, Qualified, Proposal, Negotiation, Won, Lost)\n4. Set stage colors and icons\n5. Configure automation triggers per stage\n\n**Opportunity Card Fields:**\n- Monetary Value\n- Expected Close Date\n- Assigned User\n- Contact Information\n- Custom Fields\n- Activity History\n- Notes and Files\n\n**Pipeline Automation Ideas:**\n| Stage Change | Automation |\n|--------------|------------|\n| → Qualified | Assign to sales rep, send intro email |\n| → Proposal | Create task for follow-up |\n| → Won | Send thank you email, create invoice |\n| → Lost | Add to re-engagement nurture |\n\n**Reporting:**\n- Pipeline value by stage\n- Conversion rates stage-to-stage\n- Revenue forecasting\n- Rep performance metrics", "metadata": {"platform": "gohighlevel", "feature": "pipelines", "visual": true}}
|
| 4 |
+
{"instruction": "What integrations are available in GoHighLevel?", "output": "**GoHighLevel Integrations Hub**\n\nNavigate to: Settings → Integrations\n\n**Built-in Integrations:**\n\n| Category | Integrations |\n|----------|-------------|\n| **Payment** | Stripe, PayPal, Authorize.net |\n| **Calendar** | Google Calendar, Outlook, iCloud |\n| **Email** | Gmail, Outlook, Mailgun, SMTP |\n| **Social** | Facebook, Instagram, LinkedIn, TikTok |\n| **Ads** | Facebook Ads, Google Ads |\n| **Accounting** | QuickBooks, Xero |\n| **CRM Import** | HubSpot, Salesforce, Pipedrive |\n| **Communication** | Twilio, LeadConnector |\n| **Analytics** | Google Analytics, Facebook Pixel |\n| **Zoom** | Video conferencing for appointments |\n\n**API Access:**\n- Full REST API for custom integrations\n- Zapier/Make connections available\n- Webhook support for real-time events\n\n**OAuth Apps (Premium):**\n- Build custom marketplace apps\n- Sell integrations to other agencies\n- Revenue sharing with GHL\n\n**Tip:** Always test integrations in a sub-account before rolling out agency-wide.", "metadata": {"platform": "gohighlevel", "feature": "integrations", "visual": true}}
|
| 5 |
+
{"instruction": "How do I set up warehouse operations in Odoo Inventory?", "output": "**Odoo Warehouse Operations Setup**\n\nNavigate to: Inventory → Configuration → Warehouses\n\n**Warehouse Structure:**\n```\nWarehouse (WH)\n├── Input Zone (WH/Input)\n│ └── Quality Control (WH/Input/QC)\n├── Stock (WH/Stock)\n│ ├── Zone A (Fast movers)\n│ ├── Zone B (Medium movers)\n│ └── Zone C (Slow movers)\n└── Output Zone (WH/Output)\n └── Packing (WH/Output/Pack)\n```\n\n**Setting Up Routes:**\n1. Go to Inventory → Configuration → Routes\n2. Create routes for:\n - Buy → Receive → Stock\n - Pick → Pack → Ship\n - Cross-dock (direct to output)\n\n**Operation Types:**\n| Type | Purpose |\n|------|---------|\n| Receipts | Incoming goods |\n| Deliveries | Outgoing shipments |\n| Internal Transfers | Warehouse moves |\n| Manufacturing | Production orders |\n\n**Automation Options:**\n- Auto-reserve stock on order confirmation\n- Automatic reordering at min quantity\n- Wave picking for batch processing\n- Barcode scanning integration", "metadata": {"platform": "odoo", "module": "inventory", "visual": true}}
|
| 6 |
+
{"instruction": "How do I configure products with variants in Odoo?", "output": "**Odoo Product Variants Configuration**\n\nNavigate to: Inventory → Products → Products\n\n**Enabling Variants:**\n1. Go to Settings → Inventory\n2. Enable 'Variants'\n3. Create attribute types\n\n**Creating Attributes:**\n```\nAttribute: Color\nValues: Red, Blue, Green, Black\n\nAttribute: Size\nValues: S, M, L, XL\n\nAttribute: Material\nValues: Cotton, Polyester, Blend\n```\n\n**Variant Creation Modes:**\n- **Instantly**: Creates all combinations immediately\n- **Dynamically**: Creates on-demand when ordered\n\n**Example Product:**\n```\nProduct: T-Shirt\nAttributes: Color (3) × Size (4) = 12 variants\n\nSKU Pattern: TSHIRT-{COLOR}-{SIZE}\n→ TSHIRT-RED-S, TSHIRT-RED-M, etc.\n```\n\n**Variant-Specific Settings:**\n- Individual pricing per variant\n- Separate inventory tracking\n- Unique barcodes\n- Different suppliers\n- Variant-level images\n\n**Best Practices:**\n1. Use variant-level tracking for sizing\n2. Group by product for reporting\n3. Set default variant for quick entry", "metadata": {"platform": "odoo", "module": "products", "visual": true}}
|
| 7 |
+
{"instruction": "How do I set up multi-company accounting in Odoo?", "output": "**Odoo Multi-Company Accounting**\n\nNavigate to: Settings → Users → Companies\n\n**Setup Process:**\n\n**1. Create Companies**\n```\nParent Company: ABC Holdings\n├── Subsidiary 1: ABC Manufacturing\n├── Subsidiary 2: ABC Retail\n└── Subsidiary 3: ABC Services\n```\n\n**2. Configure Chart of Accounts**\nEach company needs its own:\n- Chart of Accounts\n- Fiscal Year settings\n- Tax configuration\n- Bank accounts\n\n**3. Inter-Company Transactions**\nEnable: Settings → General Settings → Inter-Company Transactions\n\nAuto-creates:\n- Purchase Order ↔ Sales Order\n- Invoices ↔ Bills\n- Journal entries for reconciliation\n\n**4. User Access**\n- Users can belong to multiple companies\n- Permission per company possible\n- Switch companies in top-right dropdown\n\n**Consolidated Reporting:**\n```\nConsolidation Company (ABC Holdings)\n ↓\nAggregates financials from all subsidiaries\n ↓\nElimination entries for inter-company\n ↓\nConsolidated P&L, Balance Sheet\n```\n\n**Tips:**\n- Use same currency for consolidation\n- Match fiscal periods across companies\n- Standardize COA numbering", "metadata": {"platform": "odoo", "module": "accounting", "visual": true}}
|
| 8 |
+
{"instruction": "Show me a complete eCommerce automation project using n8n", "output": "**Case Study: eCommerce Order Fulfillment Automation**\n\n**Client:** Mid-sized DTC fashion brand\n**Challenge:** Manual order processing causing 48-hour fulfillment delays\n**Solution:** End-to-end n8n automation\n\n---\n\n**Before Automation:**\n- Staff manually copying Shopify orders to spreadsheet\n- Warehouse team printing pick lists by hand\n- No inventory sync between platforms\n- Customer service responding to \"where's my order\" manually\n\n**Automation Architecture:**\n```\nShopify Order Created\n ↓\nn8n Webhook captures order\n ↓\nValidate inventory (check Shopify + WMS)\n ↓\nIF in stock:\n → Create shipping label (ShipStation)\n → Update order status\n → Send confirmation email\nELSE:\n → Backorder notification\n → Add to restock queue\n ↓\nTrack shipment status\n ↓\nSend delivery notification\n```\n\n**Workflows Built:**\n1. Order Processing (main flow)\n2. Inventory Sync (Shopify ↔ Warehouse)\n3. Customer Communication (5-email sequence)\n4. Return Processing\n5. Analytics Dashboard Update\n\n**Results (After 90 Days):**\n| Metric | Before | After | Improvement |\n|--------|--------|-------|-------------|\n| Fulfillment time | 48 hrs | 4 hrs | 92% faster |\n| Manual data entry | 6 hrs/day | 0 hrs | 100% eliminated |\n| Shipping errors | 5%/week | 0.2%/week | 96% reduction |\n| WISMO tickets | 120/week | 15/week | 87% reduction |\n\n**ROI:** $180,000/year saved in labor + error costs", "metadata": {"type": "case_study", "industry": "ecommerce", "complexity": "advanced"}}
|
| 9 |
+
{"instruction": "How do I calculate ROI for automation projects?", "output": "**Automation ROI Calculator Framework**\n\n**Formula:**\n```\nROI = (Annual Savings - Implementation Cost) / Implementation Cost × 100%\n```\n\n**Step 1: Measure Current State**\n\n| Manual Task | Time/Week | Hourly Rate | Weekly Cost |\n|-------------|-----------|-------------|-------------|\n| Data entry | 10 hrs | $25 | $250 |\n| Report generation | 5 hrs | $35 | $175 |\n| Email follow-ups | 8 hrs | $25 | $200 |\n| Error corrections | 3 hrs | $40 | $120 |\n| **Total** | **26 hrs** | | **$745/week** |\n\n**Annual manual cost: $745 × 52 = $38,740**\n\n**Step 2: Calculate Implementation Cost**\n\n| Item | Cost |\n|------|------|\n| n8n setup (self-hosted) | $0 - $500 |\n| Development time (40 hrs @ $100) | $4,000 |\n| n8n Cloud (if applicable) | $50/month = $600/year |\n| Maintenance (5 hrs/month @ $100) | $6,000/year |\n| **Total Year 1** | **$11,100** |\n\n**Step 3: Estimate Post-Automation**\n\n| Remaining Manual Work | Time/Week | Cost |\n|-----------------------|-----------|------|\n| Exception handling | 2 hrs | $50 |\n| Oversight/monitoring | 1 hr | $35 |\n| **Total** | **3 hrs** | **$85/week** |\n\n**Annual post-automation cost: $85 × 52 = $4,420**\n\n**Step 4: Calculate ROI**\n```\nAnnual Savings = $38,740 - $4,420 = $34,320\nYear 1 ROI = ($34,320 - $11,100) / $11,100 × 100% = 209%\nPayback Period = 4 months\n```\n\n**Intangible Benefits:**\n- Faster processing (customer satisfaction)\n- Fewer errors (brand reputation)\n- Scalability (handle 10x volume)\n- Employee focus on high-value work", "metadata": {"type": "case_study", "topic": "roi_calculation", "complexity": "intermediate"}}
|
| 10 |
+
{"instruction": "Show me a before/after comparison of a marketing automation implementation", "output": "**Before/After: Marketing Agency Automation**\n\n**Agency Profile:**\n- 15-person digital marketing agency\n- 40+ active clients\n- Services: Social media, email, paid ads\n\n---\n\n## BEFORE (Manual Processes)\n\n**Daily Routine:**\n```\n8:00 AM - Check all client Facebook pages manually\n9:00 AM - Download analytics from each platform\n10:00 AM - Build reports in spreadsheets\n11:00 AM - Send reports via email\n1:00 PM - Schedule social posts (Hootsuite)\n3:00 PM - Check lead forms, enter into CRMs\n4:00 PM - Send follow-up emails to leads\n5:00 PM - Update project management boards\n```\n\n**Pain Points:**\n- 4 hours/day on repetitive tasks per person\n- Inconsistent reporting formats\n- Leads going cold (24-48hr response time)\n- Human errors in data entry\n- No time for strategy work\n\n---\n\n## AFTER (n8n Automation)\n\n**Automated Workflows:**\n\n**1. Social Media Management**\n```\nSchedule: Every day 8 AM\n→ Check content calendar (Google Sheets)\n→ Pull approved posts\n→ Post to FB, IG, LinkedIn, Twitter\n→ Log performance to dashboard\n```\n\n**2. Lead Capture & Distribution**\n```\nTrigger: Form submission (any client)\n→ Identify client from form source\n→ Add to client's CRM (HubSpot/GHL/Salesforce)\n→ Send instant SMS: \"We'll call in 5 minutes\"\n→ Assign to available sales rep\n→ Create follow-up task\n```\n\n**3. Client Reporting**\n```\nSchedule: Every Friday 9 AM\n→ Pull metrics from all sources\n→ Generate client-specific PDF report\n→ Email to client with commentary\n→ Update master dashboard\n```\n\n**Results Comparison:**\n\n| Metric | Before | After |\n|--------|--------|-------|\n| Time on manual tasks | 4 hrs/day/person | 30 min/day |\n| Lead response time | 24-48 hrs | < 5 minutes |\n| Report generation | 2 hrs/client/month | 0 (automated) |\n| Client capacity | 40 clients | 100+ clients |\n| Billable hours | 60% | 85% |\n\n**Revenue Impact:**\n- Same team now handles 2.5x clients\n- $400K additional annual revenue\n- Client retention improved 35%", "metadata": {"type": "case_study", "industry": "marketing_agency", "complexity": "intermediate"}}
|
| 11 |
+
{"instruction": "How do I build automated dashboards with n8n?", "output": "**Automated Dashboard Building with n8n**\n\n**Architecture:**\n```\nData Sources → n8n (ETL) → Data Store → Visualization Tool\n```\n\n**Step 1: Data Collection Workflow**\n```javascript\n// Scheduled data refresh\nconst [\n salesData,\n marketingData,\n supportData\n] = await Promise.all([\n stripe.charges.list({ created: { gte: startOfMonth } }),\n googleAnalytics.getData({ metrics: ['sessions', 'conversions'] }),\n zendesk.tickets.list({ status: 'closed', created: '>30d' })\n]);\n\n// Transform and aggregate\nconst dashboard = {\n revenue: salesData.reduce((s, c) => s + c.amount, 0) / 100,\n newCustomers: salesData.filter(c => c.metadata.isNew).length,\n webSessions: marketingData.sessions,\n conversionRate: (marketingData.conversions / marketingData.sessions * 100).toFixed(2),\n ticketsResolved: supportData.length,\n avgResolutionTime: calculateAvgTime(supportData)\n};\n```\n\n**Step 2: Store in Google Sheets**\n```javascript\nawait googleSheets.appendRow({\n spreadsheetId: 'dashboard-data',\n range: 'DailyMetrics',\n values: [[\n new Date().toISOString(),\n dashboard.revenue,\n dashboard.newCustomers,\n dashboard.webSessions,\n dashboard.conversionRate\n ]]\n});\n```\n\n**Step 3: Visualization Options**\n\n| Tool | Integration | Best For |\n|------|-------------|----------|\n| Google Data Studio | Direct Sheets connection | Free, easy |\n| Tableau | API push or database | Enterprise |\n| Grafana | Database, Prometheus | Real-time |\n| Metabase | Database | Open-source |\n\n**Alerting Layer:**\n```javascript\n// Alert on anomalies\nif (dashboard.revenue < lastWeekAvg * 0.7) {\n await slack.send({\n channel: '#alerts',\n text: `⚠️ Revenue 30% below last week average`\n });\n}\n```", "metadata": {"category": "analytics", "use_case": "dashboards", "complexity": "intermediate"}}
|
| 12 |
+
{"instruction": "How do I track KPIs automatically with n8n?", "output": "**Automated KPI Tracking System**\n\n**1. Define Your KPIs**\n```javascript\nconst kpiConfig = {\n financial: [\n { name: 'MRR', source: 'stripe', formula: 'sum(subscriptions.amount)' },\n { name: 'Churn Rate', source: 'stripe', formula: 'cancelled/total * 100' },\n { name: 'LTV', source: 'stripe', formula: 'avgRevenue * avgLifespan' }\n ],\n marketing: [\n { name: 'CAC', source: 'multi', formula: 'adSpend / newCustomers' },\n { name: 'Lead Velocity', source: 'crm', formula: 'thisMonth.leads - lastMonth.leads' },\n { name: 'MQL→SQL Conversion', source: 'crm', formula: 'sql / mql * 100' }\n ],\n product: [\n { name: 'DAU', source: 'analytics', formula: 'activeUsers' },\n { name: 'Feature Adoption', source: 'analytics', formula: 'featureUsers / totalUsers' },\n { name: 'NPS', source: 'surveys', formula: 'promoters - detractors' }\n ]\n};\n```\n\n**2. Collection Workflow**\n```\nSchedule: Daily at 6 AM\n ↓\nFOR each KPI category:\n → Fetch data from source\n → Calculate metric\n → Compare to target\n → Store history\n ↓\nGenerate summary report\n ↓\nDistribute to stakeholders\n```\n\n**3. Trend Analysis**\n```javascript\n// Calculate week-over-week change\nconst currentValue = kpi.value;\nconst previousValue = await db.query(\n 'SELECT value FROM kpi_history WHERE name = $1 AND date = $2',\n [kpi.name, oneWeekAgo]\n);\n\nconst trend = {\n direction: currentValue > previousValue ? 'up' : 'down',\n change: ((currentValue - previousValue) / previousValue * 100).toFixed(1),\n status: currentValue >= kpi.target ? 'on_track' : 'behind'\n};\n```\n\n**4. Executive Summary Email**\n```\nSubject: Daily KPIs - January 1, 2026\n\n📊 Key Metrics Summary:\n━━━━━━━━━━━━━━━━━━━━━━\n✅ MRR: $125,000 (+5% WoW)\n✅ DAU: 15,234 (+12% WoW)\n⚠️ CAC: $125 (+8% WoW - above target)\n❌ Churn: 3.2% (target: 2.5%)\n\n[View Full Dashboard]\n```", "metadata": {"category": "analytics", "use_case": "kpi_tracking", "complexity": "intermediate"}}
|
| 13 |
+
{"instruction": "How do I build appointment booking automation with n8n?", "output": "**Appointment Booking Automation**\n\n**Complete Booking Flow:**\n```\n1. Customer books via calendar link\n2. n8n receives booking webhook\n3. Validate no conflicts\n4. Send confirmation (email + SMS)\n5. Add to Google Calendar\n6. Create CRM record\n7. Schedule reminders\n8. Post-appointment follow-up\n```\n\n**1. Webhook Handler**\n```javascript\n// Calendly/Cal.com webhook\nconst booking = $input.first().json;\n\nconst appointmentData = {\n clientName: booking.invitee.name,\n clientEmail: booking.invitee.email,\n clientPhone: booking.questions_and_answers.find(q => q.question === 'Phone')?.answer,\n dateTime: booking.event.start_time,\n duration: booking.event.duration,\n service: booking.event_type.name,\n staffMember: booking.event.host.email\n};\n```\n\n**2. Multi-Channel Confirmation**\n```javascript\n// Email confirmation\nawait sendEmail({\n to: appointmentData.clientEmail,\n subject: `Appointment Confirmed: ${formatDate(appointmentData.dateTime)}`,\n template: 'appointment_confirmation',\n data: appointmentData\n});\n\n// SMS confirmation\nawait twilio.sendSms({\n to: appointmentData.clientPhone,\n body: `Your appointment is confirmed for ${formatDateTime(appointmentData.dateTime)}. Reply CONFIRM to acknowledge.`\n});\n```\n\n**3. Reminder Schedule**\n```\n24 hours before:\n → Email reminder with prep instructions\n → Calendar notification\n\n2 hours before:\n → SMS reminder\n\n30 minutes before (for virtual):\n → Send meeting link\n```\n\n**4. No-Show Handling**\n```javascript\n// Check for check-in 15 min after start\nconst checkedIn = await checkAppointmentStatus(appointmentId);\n\nif (!checkedIn) {\n await markAsNoShow(appointmentId);\n await sendNoShowFollowup(appointmentData);\n await rescheduleLink(appointmentData.clientEmail);\n}\n```\n\n**5. Post-Appointment Automation**\n- Send thank you email\n- Request review/feedback\n- Schedule follow-up appointment\n- Update CRM with notes", "metadata": {"category": "scheduling", "use_case": "appointment_booking", "complexity": "intermediate"}}
|
| 14 |
+
{"instruction": "How do I set up resource scheduling automation?", "output": "**Resource Scheduling Automation with n8n**\n\n**Use Cases:**\n- Equipment booking (conference rooms, vehicles, machinery)\n- Staff shift scheduling\n- Facility reservations\n\n**1. Resource Availability Check**\n```javascript\n// Check if resource is available\nasync function checkAvailability(resourceId, startTime, endTime) {\n const conflicts = await db.query(`\n SELECT * FROM bookings\n WHERE resource_id = $1\n AND start_time < $3\n AND end_time > $2\n `, [resourceId, startTime, endTime]);\n \n return conflicts.length === 0;\n}\n\nconst isAvailable = await checkAvailability(\n resource.id,\n requestedStart,\n requestedEnd\n);\n\nif (!isAvailable) {\n // Find next available slot\n const nextSlot = await findNextAvailable(resource.id, requestedStart);\n return { available: false, suggestion: nextSlot };\n}\n```\n\n**2. Booking Creation Flow**\n```\nRequest Received\n ↓\nCheck Resource Availability\n ↓\nIF available:\n → Create Booking Record\n → Block Calendar Time\n → Send Confirmation\n → Schedule Prep/Cleanup Time\nELSE:\n → Suggest Alternatives\n → Add to Waitlist (optional)\n```\n\n**3. Conflict Prevention**\n```javascript\n// Database-level lock to prevent double booking\nawait db.transaction(async (trx) => {\n // Lock the resource row\n await trx.raw('SELECT * FROM resources WHERE id = $1 FOR UPDATE', [resourceId]);\n \n // Recheck availability inside transaction\n const conflicts = await trx.select().from('bookings')\n .where('resource_id', resourceId)\n .whereBetween('start_time', [start, end]);\n \n if (conflicts.length > 0) {\n throw new Error('Resource became unavailable');\n }\n \n // Create booking\n await trx.insert({\n resource_id: resourceId,\n user_id: userId,\n start_time: start,\n end_time: end\n }).into('bookings');\n});\n```\n\n**4. Utilization Reporting**\n```javascript\n// Weekly resource utilization report\nconst utilization = await db.query(`\n SELECT \n r.name as resource,\n COUNT(b.id) as bookings,\n SUM(EXTRACT(EPOCH FROM (b.end_time - b.start_time))) / 3600 as hours_used,\n (SUM(EXTRACT(EPOCH FROM (b.end_time - b.start_time))) / \n (7 * 24 * 3600) * 100) as utilization_pct\n FROM resources r\n LEFT JOIN bookings b ON r.id = b.resource_id\n WHERE b.start_time >= $1\n GROUP BY r.id\n`, [weekStart]);\n```", "metadata": {"category": "scheduling", "use_case": "resource_booking", "complexity": "advanced"}}
|
docs-dataset/quality_report.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total": 14260,
|
| 3 |
+
"unique": 12457,
|
| 4 |
+
"duplicates": 1803,
|
| 5 |
+
"empty_instruction": 0,
|
| 6 |
+
"empty_output": 7566,
|
| 7 |
+
"quality_score": 34.298737727910236
|
| 8 |
+
}
|
docs-dataset/qwen3_self_knowledge.jsonl
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"messages": [{"role": "user", "content": "What model are you based on?"}, {"role": "assistant", "content": "I am a fine-tuned version of Qwen3-VL-4B, a vision-language model from Alibaba's Qwen team. I was specifically trained on business automation, n8n workflows, GoHighLevel, and Odoo documentation to serve as a Business Automation Architect."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 2 |
+
{"messages": [{"role": "user", "content": "What is Qwen3-VL?"}, {"role": "assistant", "content": "Qwen3-VL is a vision-language model from Alibaba that can process both text and images. It comes in multiple sizes (4B, 8B, and larger). I am based on the 4B parameter version, fine-tuned with LoRA using Unsloth for business automation tasks."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 3 |
+
{"messages": [{"role": "user", "content": "What datasets were you trained on?"}, {"role": "assistant", "content": "I was trained on the n8n-Toolkit dataset hosted on HuggingFace (DavidrPatton/n8n-Toolkit). This includes over 6,000 examples covering n8n workflow automation, GoHighLevel CRM/marketing, Odoo ERP, MCP servers, debugging patterns, and visual UI documentation with paired screenshots."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 4 |
+
{"messages": [{"role": "user", "content": "What can you help with?"}, {"role": "assistant", "content": "I specialize in business automation tasks including: 1) Building n8n workflows for integration and automation, 2) GoHighLevel CRM, marketing automation, and agency management, 3) Odoo ERP modules like CRM, Sales, Inventory, and Accounting, 4) Debugging workflow errors, 5) Connecting APIs and automating business processes, 6) Understanding visual screenshots of these platforms."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 5 |
+
{"messages": [{"role": "user", "content": "Can you understand images?"}, {"role": "assistant", "content": "Yes! I am a vision-language model based on Qwen3-VL. I can analyze screenshots of n8n workflows, GoHighLevel dashboards, and Odoo interfaces to help you understand what you're seeing and suggest improvements."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 6 |
+
{"messages": [{"role": "user", "content": "How do I get the best results from you?"}, {"role": "assistant", "content": "For best results: 1) Be specific about your platform (n8n, GoHighLevel, or Odoo), 2) Describe your use case or business goal, 3) Include relevant context like node types or error messages, 4) For visual questions, include a screenshot if possible. I work best with structured, detailed questions."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 7 |
+
{"messages": [{"role": "user", "content": "What platforms do you know best?"}, {"role": "assistant", "content": "I have deep knowledge of: 1) **n8n** - workflow automation, nodes, expressions, error handling, 2) **GoHighLevel** - CRM, pipelines, automations, sub-accounts, white-labeling, 3) **Odoo** - CRM, Sales, Inventory, Accounting, HR, and Website modules. I can also help with general API integrations and MCP servers."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 8 |
+
{"messages": [{"role": "user", "content": "How were you fine-tuned?"}, {"role": "assistant", "content": "I was fine-tuned using Unsloth's FastVisionModel with LoRA (Low-Rank Adaptation) on a dataset of 6,000+ examples. The training used rank-16 LoRA adapters targeting attention and MLP layers, with a learning rate of 2e-4 and gradient accumulation. This approach is memory-efficient and preserves the base model's capabilities while adding domain expertise."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 9 |
+
{"messages": [{"role": "user", "content": "What is LoRA fine-tuning?"}, {"role": "assistant", "content": "LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning method. Instead of updating all model weights, LoRA adds small trainable matrices to key layers. This reduces memory requirements drastically (I was trained on a single GPU with 16GB VRAM) while still learning new domain knowledge effectively."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 10 |
+
{"messages": [{"role": "user", "content": "What is Unsloth?"}, {"role": "assistant", "content": "Unsloth is an open-source library that makes fine-tuning LLMs 2-5x faster with 70% less memory. It provides FastVisionModel for Qwen3-VL and handles LoRA configuration, 4-bit quantization, and gradient checkpointing automatically. My training used Unsloth for efficient GPU utilization."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 11 |
+
{"messages": [{"role": "user", "content": "How do I run inference with Qwen3-VL locally?"}, {"role": "assistant", "content": "To run Qwen3-VL locally with Unsloth:\n\n```python\nfrom unsloth import FastVisionModel\nimport torch\n\nmodel, tokenizer = FastVisionModel.from_pretrained(\n \"unsloth/Qwen3-VL-4B-unsloth-bnb-4bit\",\n load_in_4bit=True\n)\nFastVisionModel.for_inference(model)\n\n# For text-only\nmessages = [{\"role\": \"user\", \"content\": \"Your question\"}]\n\n# For images\nmessages = [{\"role\": \"user\", \"content\": [\n {\"type\": \"image\", \"image\": \"path/to/image.png\"},\n {\"type\": \"text\", \"text\": \"What is shown?\"}\n]}]\n\ninputs = tokenizer.apply_chat_template(messages, return_tensors=\"pt\")\noutputs = model.generate(**inputs, max_new_tokens=512)\nresponse = tokenizer.decode(outputs[0])\n```"}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 12 |
+
{"messages": [{"role": "user", "content": "How do I enable thinking mode in Qwen3?"}, {"role": "assistant", "content": "Qwen3 supports a 'thinking' mode for complex reasoning. Enable it by adding `enable_thinking=True`:\n\n```python\ntext = tokenizer.apply_chat_template(\n messages,\n tokenize=False,\n add_generation_prompt=True,\n enable_thinking=True # Enables <think>...</think> blocks\n)\n```\n\nThe model will output its reasoning in `<think>` tags before the final answer. For faster responses, set `enable_thinking=False`."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 13 |
+
{"messages": [{"role": "user", "content": "What are your limitations?"}, {"role": "assistant", "content": "My limitations include: 1) Knowledge cutoff from training data - I may not know about very recent platform updates, 2) I work best with n8n, GoHighLevel, and Odoo - other platforms may have less coverage, 3) Complex multi-step workflows may need iterative refinement, 4) Visual understanding is best for UI screenshots I was trained on, 5) I cannot execute code or access external systems directly."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 14 |
+
{"messages": [{"role": "user", "content": "How should I format questions about n8n workflows?"}, {"role": "assistant", "content": "For n8n workflow questions, include: 1) The trigger type (Manual, Webhook, Schedule, etc.), 2) Node types involved (HTTP Request, Function, Set, etc.), 3) The data source and destination, 4) Any error messages if debugging. Example: 'I have a webhook trigger that receives JSON, goes through a Set node, then HTTP Request to an API - I'm getting a 401 error on the HTTP node.'"}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
| 15 |
+
{"messages": [{"role": "user", "content": "How do I get help with GoHighLevel automations?"}, {"role": "assistant", "content": "For GoHighLevel automation help, specify: 1) The workflow trigger (form submission, tag added, pipeline stage change), 2) Actions you want to perform (send email, add tag, update contact field), 3) Conditions or filters needed, 4) Whether this is at agency or sub-account level. Include screenshots of your workflow builder if possible."}], "category": "qwen3_self_knowledge", "source": "qwen3_fine_tune_docs", "type": "self_knowledge"}
|
docs-dataset/qwen3_vl_evaluation.jsonl
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"messages": [{"role": "user", "content": "What is n8n?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 2 |
+
{"messages": [{"role": "user", "content": "How do I install n8n?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 3 |
+
{"messages": [{"role": "user", "content": "What's the difference between n8n cloud and self-hosted?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 4 |
+
{"messages": [{"role": "user", "content": "How do I pass data between nodes?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "type": "evaluation"}
|
| 5 |
+
{"messages": [{"role": "user", "content": "How do I handle errors in n8n?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 6 |
+
{"messages": [{"role": "user", "content": "How do I use environment variables in n8n?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 7 |
+
{"messages": [{"role": "user", "content": "How do I connect n8n to Slack?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 8 |
+
{"messages": [{"role": "user", "content": "How do I trigger a workflow from external events?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "automation", "type": "evaluation"}
|
| 9 |
+
{"messages": [{"role": "user", "content": "How do I schedule workflows to run periodically?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "automation", "type": "evaluation"}
|
| 10 |
+
{"messages": [{"role": "user", "content": "How do I implement retry logic?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "type": "evaluation"}
|
| 11 |
+
{"messages": [{"role": "user", "content": "How do I process items in parallel?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "type": "evaluation"}
|
| 12 |
+
{"messages": [{"role": "user", "content": "How do I secure my n8n webhook?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "api_integration", "platform": "n8n", "type": "evaluation"}
|
| 13 |
+
{"messages": [{"role": "user", "content": "My webhook isn't receiving data, what should I check?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "api_integration", "type": "evaluation"}
|
| 14 |
+
{"messages": [{"role": "user", "content": "I'm getting 401 errors, how do I fix it?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "type": "evaluation"}
|
| 15 |
+
{"messages": [{"role": "user", "content": "Why is my expression returning undefined?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "type": "evaluation"}
|
| 16 |
+
{"messages": [{"role": "user", "content": "When should I use n8n vs Zapier?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "api_integration", "platform": "n8n", "type": "evaluation"}
|
| 17 |
+
{"messages": [{"role": "user", "content": "Can n8n replace my current automation tool?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "automation", "platform": "n8n", "type": "evaluation"}
|
| 18 |
+
{"messages": [{"role": "user", "content": "How do I set up n8n for high availability?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "n8n", "type": "evaluation"}
|
| 19 |
+
{"messages": [{"role": "user", "content": "How do I implement multi-tenant workflows?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "automation", "type": "evaluation"}
|
| 20 |
+
{"messages": [{"role": "user", "content": "What does the GoHighLevel dashboard show?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "domain": "analytics", "platform": "gohighlevel", "type": "evaluation"}
|
| 21 |
+
{"messages": [{"role": "user", "content": "How do I navigate Odoo inventory module?"}, {"role": "assistant", "content": ""}], "category": "quality_check", "complexity": "intermediate", "platform": "odoo", "type": "evaluation", "industry": "manufacturing"}
|
docs-dataset/qwen3_vl_training.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0251e1c4883508b5375c58351cd0c3cdc85fab1c7c957dc49b02f23460c5111
|
| 3 |
+
size 65730026
|
docs-dataset/remaining_gaps.jsonl
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"instruction": "List the most common n8n nodes with their operations and authentication methods", "output": "# n8n Node Integration Matrix\n\n## Communication Nodes\n| Node | Operations | Auth Method | Common Use Cases |\n|------|------------|-------------|------------------|\n| Gmail | Send, Reply, Get, Delete, Draft | OAuth2 | Notifications, lead follow-up |\n| Slack | Post, Update, Upload, User Info | OAuth2/API Key | Team alerts, bot automation |\n| Discord | Send, Edit, Delete, Webhook | Webhook/Bot Token | Community notifications |\n| Telegram | Send Message, Edit, Get Updates | Bot Token | Alerts, chatbots |\n| Microsoft Teams | Post, Reply, Channel List | OAuth2 | Enterprise notifications |\n| Twilio | SMS Send, Call, WhatsApp | API Key + Secret | Multi-channel messaging |\n\n## CRM Nodes\n| Node | Operations | Auth Method | Common Use Cases |\n|------|------------|-------------|------------------|\n| HubSpot | Create/Update Contact, Deal, Company | OAuth2/API Key | Lead management |\n| Salesforce | CRUD on any object, SOQL | OAuth2 | Enterprise CRM |\n| Pipedrive | Deals, Persons, Orgs, Activities | API Token | Sales pipeline |\n| Zoho CRM | Leads, Contacts, Deals | OAuth2 | SMB CRM automation |\n| GoHighLevel | Contacts, Opportunities, Messages | API Key | Agency automation |\n\n## Database Nodes\n| Node | Operations | Auth Method | Common Use Cases |\n|------|------------|-------------|------------------|\n| PostgreSQL | Query, Insert, Update, Delete | Connection String | Data warehousing |\n| MySQL | Query, Insert, Update, Delete | Connection String | Legacy systems |\n| MongoDB | Find, Insert, Update, Aggregate | Connection String | NoSQL operations |\n| Supabase | Select, Insert, Upsert, RPC | API Key + URL | Real-time backends |\n| Airtable | List, Get, Create, Update | API Key | Spreadsheet-DB hybrid |\n| Google Sheets | Append, Update, Read, Clear | OAuth2 | Lightweight data storage |\n\n## AI/ML Nodes\n| Node | Operations | Auth Method | Common Use Cases |\n|------|------------|-------------|------------------|\n| OpenAI | Chat, Complete, Embed, Image | API Key | Content generation, chatbots |\n| Anthropic Claude | Message, Complete | API Key | Analysis, writing |\n| Google AI | Generate, Embed | API Key | Multi-modal AI |\n| Hugging Face | Inference | API Token | Custom models |\n\n## Marketing Nodes\n| Node | Operations | Auth Method | Common Use Cases |\n|------|------------|-------------|------------------|\n| Mailchimp | Subscribe, Campaign, Tag | API Key | Email marketing |\n| SendGrid | Send, Template | API Key | Transactional email |\n| Mailgun | Send, Validate | API Key + Domain | High-volume email |\n| ActiveCampaign | Contact, Deal, Automation | API Key | Marketing automation |\n\n## Storage Nodes\n| Node | Operations | Auth Method | Common Use Cases |\n|------|------------|-------------|------------------|\n| AWS S3 | Upload, Download, List, Delete | Access Key + Secret | File storage |\n| Google Drive | Upload, Download, Share | OAuth2 | Document management |\n| Dropbox | Upload, Download, Move | OAuth2 | File sync |\n| FTP/SFTP | Upload, Download, List | Username/Password or Key | Legacy file transfer |", "metadata": {"topic": "integration_matrix", "type": "reference"}}
|
| 2 |
+
{"instruction": "What HTTP Request configurations are needed for different API authentication types?", "output": "# HTTP Request Authentication Patterns\n\n## API Key in Header\n```json\n{\n \"name\": \"API Request\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://api.example.com/endpoint\",\n \"authentication\": \"genericCredentialType\",\n \"genericAuthType\": \"httpHeaderAuth\",\n \"options\": {\n \"headers\": {\n \"X-API-Key\": \"={{ $credentials.apiKey }}\"\n }\n }\n }\n}\n```\n\n## API Key in Query String\n```json\n{\n \"parameters\": {\n \"url\": \"https://api.example.com/endpoint\",\n \"qs\": {\n \"api_key\": \"={{ $credentials.apiKey }}\"\n }\n }\n}\n```\n\n## Bearer Token\n```json\n{\n \"parameters\": {\n \"authentication\": \"genericCredentialType\",\n \"genericAuthType\": \"httpHeaderAuth\",\n \"options\": {\n \"headers\": {\n \"Authorization\": \"Bearer {{ $credentials.token }}\"\n }\n }\n }\n}\n```\n\n## Basic Auth\n```json\n{\n \"parameters\": {\n \"authentication\": \"genericCredentialType\",\n \"genericAuthType\": \"httpBasicAuth\"\n },\n \"credentials\": {\n \"httpBasicAuth\": {\n \"user\": \"username\",\n \"password\": \"password\"\n }\n }\n}\n```\n\n## OAuth 2.0\n```json\n{\n \"parameters\": {\n \"authentication\": \"oAuth2Api\"\n },\n \"credentials\": {\n \"oAuth2Api\": {\n \"accessTokenUrl\": \"https://auth.example.com/oauth/token\",\n \"authorizationUrl\": \"https://auth.example.com/oauth/authorize\",\n \"clientId\": \"{{ $credentials.clientId }}\",\n \"clientSecret\": \"{{ $credentials.clientSecret }}\",\n \"scope\": \"read write\"\n }\n }\n}\n```\n\n## HMAC Signature\n```javascript\n// Code node for HMAC signing\nconst crypto = require('crypto');\nconst timestamp = Date.now().toString();\nconst payload = JSON.stringify($json);\nconst signature = crypto\n .createHmac('sha256', $env.API_SECRET)\n .update(timestamp + payload)\n .digest('hex');\n\nreturn {\n headers: {\n 'X-Timestamp': timestamp,\n 'X-Signature': signature\n },\n body: payload\n};\n```", "metadata": {"topic": "http_auth", "type": "reference"}}
|
| 3 |
+
{"instruction": "How do I implement CI/CD pipelines for n8n workflows?", "output": "# n8n CI/CD Pipeline Implementation\n\n## Git-Backed Workflows\n\n### 1. Export Workflows to Git\n```bash\n# Export all workflows\nn8n export:workflow --all --output=./workflows/\n\n# Export specific workflow\nn8n export:workflow --id=123 --output=./workflows/my-workflow.json\n```\n\n### 2. GitHub Actions Pipeline\n```yaml\n# .github/workflows/n8n-deploy.yml\nname: Deploy n8n Workflows\n\non:\n push:\n branches: [main]\n paths:\n - 'workflows/**'\n\njobs:\n validate:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n \n - name: Validate JSON\n run: |\n for file in workflows/*.json; do\n jq empty \"$file\" || exit 1\n done\n \n - name: Check for required nodes\n run: |\n for file in workflows/*.json; do\n if ! jq -e '.nodes | length > 0' \"$file\" > /dev/null; then\n echo \"Error: $file has no nodes\"\n exit 1\n fi\n done\n\n deploy:\n needs: validate\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n \n - name: Deploy to n8n\n env:\n N8N_API_KEY: ${{ secrets.N8N_API_KEY }}\n N8N_HOST: ${{ secrets.N8N_HOST }}\n run: |\n for file in workflows/*.json; do\n WORKFLOW_ID=$(jq -r '.id' \"$file\")\n curl -X PUT \"$N8N_HOST/api/v1/workflows/$WORKFLOW_ID\" \\\n -H \"X-N8N-API-KEY: $N8N_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d @\"$file\"\n done\n```\n\n## Testing Workflows\n```yaml\n test:\n runs-on: ubuntu-latest\n services:\n n8n:\n image: n8nio/n8n\n ports:\n - 5678:5678\n env:\n N8N_BASIC_AUTH_ACTIVE: false\n steps:\n - name: Import and test workflow\n run: |\n # Import workflow\n curl -X POST \"http://localhost:5678/api/v1/workflows\" \\\n -H \"Content-Type: application/json\" \\\n -d @workflows/test-workflow.json\n \n # Execute and verify\n RESULT=$(curl -X POST \"http://localhost:5678/webhook-test/test\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"test\": true}')\n \n echo \"$RESULT\" | jq -e '.success == true'\n```\n\n## Environment Management\n```yaml\n# workflows/config/production.env\nN8N_ENCRYPTION_KEY=prod-key-here\nDATABASE_URL=postgresql://prod-db\nWEBHOOK_URL=https://n8n.example.com\n\n# workflows/config/staging.env\nN8N_ENCRYPTION_KEY=staging-key\nDATABASE_URL=postgresql://staging-db\nWEBHOOK_URL=https://staging.n8n.example.com\n```", "metadata": {"topic": "cicd", "type": "devops"}}
|
| 4 |
+
{"instruction": "How do I deploy n8n on Kubernetes with auto-scaling?", "output": "# Kubernetes n8n Deployment with Auto-Scaling\n\n## Deployment Manifest\n```yaml\n# n8n-deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: n8n\n labels:\n app: n8n\nspec:\n replicas: 2\n selector:\n matchLabels:\n app: n8n\n template:\n metadata:\n labels:\n app: n8n\n spec:\n containers:\n - name: n8n\n image: n8nio/n8n:latest\n ports:\n - containerPort: 5678\n env:\n - name: N8N_ENCRYPTION_KEY\n valueFrom:\n secretKeyRef:\n name: n8n-secrets\n key: encryption-key\n - name: DB_TYPE\n value: postgresdb\n - name: DB_POSTGRESDB_HOST\n value: postgres-service\n - name: EXECUTIONS_MODE\n value: queue\n - name: QUEUE_BULL_REDIS_HOST\n value: redis-service\n resources:\n requests:\n memory: \"512Mi\"\n cpu: \"250m\"\n limits:\n memory: \"2Gi\"\n cpu: \"1000m\"\n livenessProbe:\n httpGet:\n path: /healthz\n port: 5678\n initialDelaySeconds: 30\n readinessProbe:\n httpGet:\n path: /healthz\n port: 5678\n---\napiVersion: v1\nkind: Service\nmetadata:\n name: n8n-service\nspec:\n selector:\n app: n8n\n ports:\n - port: 80\n targetPort: 5678\n type: ClusterIP\n```\n\n## Horizontal Pod Autoscaler\n```yaml\n# n8n-hpa.yaml\napiVersion: autoscaling/v2\nkind: HorizontalPodAutoscaler\nmetadata:\n name: n8n-hpa\nspec:\n scaleTargetRef:\n apiVersion: apps/v1\n kind: Deployment\n name: n8n\n minReplicas: 2\n maxReplicas: 10\n metrics:\n - type: Resource\n resource:\n name: cpu\n target:\n type: Utilization\n averageUtilization: 70\n - type: Resource\n resource:\n name: memory\n target:\n type: Utilization\n averageUtilization: 80\n behavior:\n scaleUp:\n stabilizationWindowSeconds: 60\n policies:\n - type: Pods\n value: 2\n periodSeconds: 60\n scaleDown:\n stabilizationWindowSeconds: 300\n```\n\n## Queue Workers (Scaling Execution)\n```yaml\n# n8n-worker.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: n8n-worker\nspec:\n replicas: 3\n template:\n spec:\n containers:\n - name: n8n-worker\n image: n8nio/n8n:latest\n command: [\"n8n\", \"worker\"]\n env:\n - name: EXECUTIONS_MODE\n value: queue\n - name: QUEUE_BULL_REDIS_HOST\n value: redis-service\n```\n\n## Ingress with SSL\n```yaml\napiVersion: networking.k8s.io/v1\nkind: Ingress\nmetadata:\n name: n8n-ingress\n annotations:\n cert-manager.io/cluster-issuer: letsencrypt-prod\nspec:\n tls:\n - hosts:\n - n8n.example.com\n secretName: n8n-tls\n rules:\n - host: n8n.example.com\n http:\n paths:\n - path: /\n pathType: Prefix\n backend:\n service:\n name: n8n-service\n port:\n number: 80\n```", "metadata": {"topic": "kubernetes", "type": "devops"}}
|
| 5 |
+
{"instruction": "How do I set up Docker Compose for n8n with PostgreSQL and Redis?", "output": "# n8n Docker Compose Production Setup\n\n## docker-compose.yml\n```yaml\nversion: '3.8'\n\nservices:\n n8n:\n image: n8nio/n8n:latest\n restart: always\n ports:\n - \"5678:5678\"\n environment:\n - N8N_HOST=n8n.example.com\n - N8N_PORT=5678\n - N8N_PROTOCOL=https\n - NODE_ENV=production\n - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}\n - WEBHOOK_URL=https://n8n.example.com/\n # Database\n - DB_TYPE=postgresdb\n - DB_POSTGRESDB_HOST=postgres\n - DB_POSTGRESDB_PORT=5432\n - DB_POSTGRESDB_DATABASE=n8n\n - DB_POSTGRESDB_USER=n8n\n - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}\n # Queue mode for scaling\n - EXECUTIONS_MODE=queue\n - QUEUE_BULL_REDIS_HOST=redis\n - QUEUE_BULL_REDIS_PORT=6379\n # Performance\n - EXECUTIONS_DATA_PRUNE=true\n - EXECUTIONS_DATA_MAX_AGE=168\n - GENERIC_TIMEZONE=America/New_York\n volumes:\n - n8n_data:/home/node/.n8n\n depends_on:\n - postgres\n - redis\n healthcheck:\n test: [\"CMD\", \"wget\", \"-q\", \"--spider\", \"http://localhost:5678/healthz\"]\n interval: 30s\n timeout: 10s\n retries: 3\n\n n8n-worker:\n image: n8nio/n8n:latest\n restart: always\n command: worker\n environment:\n - DB_TYPE=postgresdb\n - DB_POSTGRESDB_HOST=postgres\n - DB_POSTGRESDB_DATABASE=n8n\n - DB_POSTGRESDB_USER=n8n\n - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}\n - EXECUTIONS_MODE=queue\n - QUEUE_BULL_REDIS_HOST=redis\n - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}\n depends_on:\n - postgres\n - redis\n - n8n\n deploy:\n replicas: 2\n\n postgres:\n image: postgres:15-alpine\n restart: always\n environment:\n - POSTGRES_USER=n8n\n - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}\n - POSTGRES_DB=n8n\n volumes:\n - postgres_data:/var/lib/postgresql/data\n healthcheck:\n test: [\"CMD-SHELL\", \"pg_isready -U n8n\"]\n interval: 10s\n timeout: 5s\n retries: 5\n\n redis:\n image: redis:7-alpine\n restart: always\n volumes:\n - redis_data:/data\n healthcheck:\n test: [\"CMD\", \"redis-cli\", \"ping\"]\n interval: 10s\n timeout: 5s\n retries: 5\n\n caddy:\n image: caddy:2-alpine\n restart: always\n ports:\n - \"80:80\"\n - \"443:443\"\n volumes:\n - ./Caddyfile:/etc/caddy/Caddyfile\n - caddy_data:/data\n depends_on:\n - n8n\n\nvolumes:\n n8n_data:\n postgres_data:\n redis_data:\n caddy_data:\n```\n\n## Caddyfile (Reverse Proxy)\n```\nn8n.example.com {\n reverse_proxy n8n:5678\n}\n```\n\n## .env file\n```bash\nN8N_ENCRYPTION_KEY=your-32-char-encryption-key-here\nPOSTGRES_PASSWORD=your-secure-password-here\n```\n\n## Start Commands\n```bash\n# Start all services\ndocker-compose up -d\n\n# Scale workers\ndocker-compose up -d --scale n8n-worker=4\n\n# View logs\ndocker-compose logs -f n8n\n\n# Backup database\ndocker-compose exec postgres pg_dump -U n8n n8n > backup.sql\n```", "metadata": {"topic": "docker", "type": "devops"}}
|
| 6 |
+
{"instruction": "How do I build SMS marketing workflows with Twilio in n8n?", "output": "# SMS Marketing Automation with Twilio\n\n## Send SMS Campaign\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Get Subscribers\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"parameters\": {\n \"query\": \"SELECT phone, first_name, segment FROM subscribers WHERE sms_opt_in = true AND segment = '{{ $json.targetSegment }}'\"\n }\n },\n {\n \"name\": \"Personalize Message\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\n \"string\": [{\n \"name\": \"message\",\n \"value\": \"Hi {{ $json.first_name }}! {{ $json.campaignMessage }} Reply STOP to opt out.\"\n }]\n }\n }\n },\n {\n \"name\": \"Send SMS\",\n \"type\": \"n8n-nodes-base.twilio\",\n \"parameters\": {\n \"operation\": \"send\",\n \"from\": \"={{ $env.TWILIO_PHONE }}\",\n \"to\": \"={{ $json.phone }}\",\n \"message\": \"={{ $json.message }}\"\n }\n },\n {\n \"name\": \"Log Delivery\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"parameters\": {\n \"operation\": \"insert\",\n \"table\": \"sms_log\",\n \"columns\": \"phone, message_sid, status, sent_at\"\n }\n }\n ]\n}\n```\n\n## Handle Inbound SMS (Opt-out)\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Twilio Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\"path\": \"twilio-inbound\", \"method\": \"POST\"}\n },\n {\n \"name\": \"Parse Message\",\n \"type\": \"n8n-nodes-base.set\",\n \"parameters\": {\n \"values\": {\n \"string\": [\n {\"name\": \"from\", \"value\": \"={{ $json.From }}\"},\n {\"name\": \"body\", \"value\": \"={{ $json.Body.toLowerCase().trim() }}\"}\n ]\n }\n }\n },\n {\n \"name\": \"Check Opt-Out\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.body }}\",\n \"operation\": \"contains\",\n \"value2\": \"stop\"\n }]\n }\n }\n },\n {\n \"name\": \"Update Opt-Out Status\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"parameters\": {\n \"query\": \"UPDATE subscribers SET sms_opt_in = false WHERE phone = '{{ $json.from }}'\"\n }\n },\n {\n \"name\": \"Confirm Opt-Out\",\n \"type\": \"n8n-nodes-base.twilio\",\n \"parameters\": {\n \"operation\": \"send\",\n \"to\": \"={{ $json.from }}\",\n \"message\": \"You've been unsubscribed. Reply START to resubscribe.\"\n }\n }\n ]\n}\n```\n\n## SMS Drip Campaign\n```javascript\n// Day 0: Welcome SMS\n// Day 3: Value SMS\n// Day 7: Offer SMS\n\nconst campaigns = [\n { day: 0, message: \"Welcome to {brand}! Reply HELP for support.\" },\n { day: 3, message: \"Did you know? {tip}. Learn more: {link}\" },\n { day: 7, message: \"Special offer! Use code {code} for 20% off.\" }\n];\n\nconst daysSinceSignup = Math.floor((Date.now() - new Date($json.signup_date)) / 86400000);\nconst campaign = campaigns.find(c => c.day === daysSinceSignup);\n\nif (campaign) {\n return { send: true, message: campaign.message };\n}\nreturn { send: false };\n```", "metadata": {"topic": "sms_marketing", "type": "workflow"}}
|
| 7 |
+
{"instruction": "How do I integrate WhatsApp Business API with n8n?", "output": "# WhatsApp Business API Integration\n\n## Send WhatsApp Message (via Twilio)\n```json\n{\n \"name\": \"Send WhatsApp\",\n \"type\": \"n8n-nodes-base.twilio\",\n \"parameters\": {\n \"operation\": \"send\",\n \"from\": \"whatsapp:+14155238886\",\n \"to\": \"whatsapp:{{ $json.customerPhone }}\",\n \"message\": \"={{ $json.messageContent }}\"\n }\n}\n```\n\n## Send WhatsApp Template Message\n```json\n{\n \"name\": \"Send Template\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://graph.facebook.com/v18.0/{{ $env.WHATSAPP_PHONE_ID }}/messages\",\n \"method\": \"POST\",\n \"headers\": {\n \"Authorization\": \"Bearer {{ $env.WHATSAPP_TOKEN }}\",\n \"Content-Type\": \"application/json\"\n },\n \"body\": {\n \"messaging_product\": \"whatsapp\",\n \"to\": \"{{ $json.phone }}\",\n \"type\": \"template\",\n \"template\": {\n \"name\": \"order_confirmation\",\n \"language\": {\"code\": \"en\"},\n \"components\": [\n {\n \"type\": \"body\",\n \"parameters\": [\n {\"type\": \"text\", \"text\": \"{{ $json.customerName }}\"},\n {\"type\": \"text\", \"text\": \"{{ $json.orderNumber }}\"}\n ]\n }\n ]\n }\n }\n }\n}\n```\n\n## WhatsApp Webhook Handler\n```json\n{\n \"nodes\": [\n {\n \"name\": \"WhatsApp Webhook\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\"path\": \"whatsapp\", \"method\": \"POST\"}\n },\n {\n \"name\": \"Extract Message\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const entry = $json.entry?.[0];\\nconst change = entry?.changes?.[0];\\nconst message = change?.value?.messages?.[0];\\n\\nif (!message) return { type: 'status_update' };\\n\\nreturn {\\n from: message.from,\\n type: message.type,\\n text: message.text?.body || '',\\n timestamp: message.timestamp\\n};\"\n }\n },\n {\n \"name\": \"Route by Type\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": [\n {\"value\": \"text\"},\n {\"value\": \"image\"},\n {\"value\": \"location\"}\n ]\n }\n },\n {\n \"name\": \"Process Text\",\n \"type\": \"n8n-nodes-base.openAi\",\n \"parameters\": {\n \"prompt\": \"Customer message: {{ $json.text }}\\n\\nGenerate a helpful response.\"\n }\n },\n {\n \"name\": \"Reply\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://graph.facebook.com/v18.0/{{ $env.WHATSAPP_PHONE_ID }}/messages\",\n \"method\": \"POST\",\n \"body\": {\n \"messaging_product\": \"whatsapp\",\n \"to\": \"{{ $json.from }}\",\n \"type\": \"text\",\n \"text\": {\"body\": \"{{ $json.response }}\"}\n }\n }\n }\n ]\n}\n```\n\n## Multi-Channel Router\n```javascript\n// Route message to best channel\nconst customer = $json.customer;\nconst channelPriority = ['whatsapp', 'sms', 'email'];\n\nfor (const channel of channelPriority) {\n if (channel === 'whatsapp' && customer.whatsapp_opt_in) {\n return { channel: 'whatsapp', to: `whatsapp:${customer.phone}` };\n }\n if (channel === 'sms' && customer.sms_opt_in) {\n return { channel: 'sms', to: customer.phone };\n }\n if (channel === 'email' && customer.email_opt_in) {\n return { channel: 'email', to: customer.email };\n }\n}\nreturn { channel: 'none', reason: 'No opted-in channel' };\n```", "metadata": {"topic": "whatsapp", "type": "workflow"}}
|
| 8 |
+
{"instruction": "How do I build an omnichannel notification system in n8n?", "output": "# Omnichannel Notification System\n\n## Architecture\n```\nEvent \u2192 Determine Best Channel \u2192 Route \u2192 Send \u2192 Log \u2192 Track Delivery\n```\n\n## Main Workflow\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Notification Trigger\",\n \"type\": \"n8n-nodes-base.webhook\",\n \"parameters\": {\"path\": \"notify\"}\n },\n {\n \"name\": \"Get User Preferences\",\n \"type\": \"n8n-nodes-base.postgres\",\n \"parameters\": {\n \"query\": \"SELECT * FROM user_preferences WHERE user_id = '{{ $json.userId }}'\"\n }\n },\n {\n \"name\": \"Select Channel\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const prefs = $json;\\nconst priority = $json.priority || 'normal';\\n\\n// Urgent: Try all channels\\nif (priority === 'urgent') {\\n return { channels: ['push', 'sms', 'email'] };\\n}\\n\\n// Normal: Use preferred channel\\nconst preferred = prefs.preferred_channel || 'email';\\nreturn { channels: [preferred] };\"\n }\n },\n {\n \"name\": \"Split Channels\",\n \"type\": \"n8n-nodes-base.splitInBatches\",\n \"parameters\": {\"batchSize\": 1}\n },\n {\n \"name\": \"Route by Channel\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": [\n {\"value\": \"email\"},\n {\"value\": \"sms\"},\n {\"value\": \"push\"},\n {\"value\": \"whatsapp\"},\n {\"value\": \"slack\"}\n ]\n }\n }\n ]\n}\n```\n\n## Channel Implementations\n\n### Email (SendGrid)\n```json\n{\n \"name\": \"Send Email\",\n \"type\": \"n8n-nodes-base.sendGrid\",\n \"parameters\": {\n \"to\": \"={{ $json.email }}\",\n \"subject\": \"={{ $json.subject }}\",\n \"html\": \"={{ $json.htmlContent }}\"\n }\n}\n```\n\n### SMS (Twilio)\n```json\n{\n \"name\": \"Send SMS\",\n \"type\": \"n8n-nodes-base.twilio\",\n \"parameters\": {\n \"to\": \"={{ $json.phone }}\",\n \"message\": \"={{ $json.smsContent }}\"\n }\n}\n```\n\n### Push (OneSignal)\n```json\n{\n \"name\": \"Send Push\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"https://onesignal.com/api/v1/notifications\",\n \"method\": \"POST\",\n \"headers\": {\"Authorization\": \"Basic {{ $env.ONESIGNAL_KEY }}\"},\n \"body\": {\n \"app_id\": \"{{ $env.ONESIGNAL_APP }}\",\n \"include_player_ids\": [\"{{ $json.pushToken }}\"],\n \"contents\": {\"en\": \"{{ $json.pushContent }}\"}\n }\n }\n}\n```\n\n## Delivery Tracking\n```javascript\n// Log all notification attempts\nawait db.insert('notification_log', {\n user_id: $json.userId,\n channel: $json.channel,\n message_id: $json.messageId,\n status: $json.deliveryStatus,\n sent_at: new Date(),\n metadata: JSON.stringify($json.metadata)\n});\n\n// Update user's last contact timestamp\nawait db.update('users')\n .set({ last_contacted: new Date() })\n .where('id', $json.userId);\n```", "metadata": {"topic": "omnichannel_notifications", "type": "workflow"}}
|
| 9 |
+
{"instruction": "How do I integrate Airbyte with n8n for ETL pipelines?", "output": "# Airbyte + n8n ETL Integration\n\n## Trigger Airbyte Sync\n```json\n{\n \"name\": \"Trigger Airbyte Sync\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"http://airbyte:8000/api/v1/connections/sync\",\n \"method\": \"POST\",\n \"headers\": {\n \"Authorization\": \"Basic {{ Buffer.from('airbyte:password').toString('base64') }}\"\n },\n \"body\": {\n \"connectionId\": \"{{ $json.connectionId }}\"\n }\n }\n}\n```\n\n## Monitor Sync Status\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Trigger Sync\",\n \"type\": \"n8n-nodes-base.httpRequest\"\n },\n {\n \"name\": \"Wait\",\n \"type\": \"n8n-nodes-base.wait\",\n \"parameters\": {\"resume\": \"timeInterval\", \"interval\": 30}\n },\n {\n \"name\": \"Check Status\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"parameters\": {\n \"url\": \"http://airbyte:8000/api/v1/jobs/get\",\n \"body\": {\"id\": \"{{ $json.job.id }}\"}\n }\n },\n {\n \"name\": \"Is Complete?\",\n \"type\": \"n8n-nodes-base.if\",\n \"parameters\": {\n \"conditions\": {\n \"string\": [{\n \"value1\": \"={{ $json.job.status }}\",\n \"value2\": \"succeeded\"\n }]\n }\n }\n },\n {\n \"name\": \"Loop Back\",\n \"type\": \"n8n-nodes-base.noOp\"\n }\n ]\n}\n```\n\n## Post-Sync Processing\n```javascript\n// After Airbyte sync completes, process the data\nconst syncStats = $json.job.attempts[0].attempt.totalStats;\n\nreturn {\n recordsSynced: syncStats.recordsEmitted,\n bytesEmitted: syncStats.bytesEmitted,\n status: 'completed',\n nextSteps: ['transform', 'validate', 'notify']\n};\n```\n\n## Orchestration Pattern\n```\nSchedule \u2192 Trigger Airbyte \u2192 Wait for Completion \u2192 \nTransform in n8n \u2192 Load to Destination \u2192 Notify Team\n```", "metadata": {"topic": "airbyte", "type": "etl"}}
|
| 10 |
+
{"instruction": "How do I implement Change Data Capture with Debezium and n8n?", "output": "# Debezium CDC with n8n\n\n## Kafka Consumer for CDC Events\n```json\n{\n \"nodes\": [\n {\n \"name\": \"Kafka Trigger\",\n \"type\": \"n8n-nodes-base.kafkaTrigger\",\n \"parameters\": {\n \"topic\": \"dbserver1.inventory.customers\",\n \"groupId\": \"n8n-cdc-consumer\",\n \"options\": {\n \"fromBeginning\": false,\n \"jsonParse\": true\n }\n }\n },\n {\n \"name\": \"Parse CDC Event\",\n \"type\": \"n8n-nodes-base.code\",\n \"parameters\": {\n \"jsCode\": \"const event = $json;\\nreturn {\\n operation: event.op, // c=create, u=update, d=delete\\n before: event.before,\\n after: event.after,\\n source: {\\n table: event.source.table,\\n db: event.source.db,\\n ts_ms: event.ts_ms\\n }\\n};\"\n }\n },\n {\n \"name\": \"Route by Operation\",\n \"type\": \"n8n-nodes-base.switch\",\n \"parameters\": {\n \"rules\": [\n {\"value\": \"c\", \"label\": \"Insert\"},\n {\"value\": \"u\", \"label\": \"Update\"},\n {\"value\": \"d\", \"label\": \"Delete\"}\n ]\n }\n }\n ]\n}\n```\n\n## Handle Insert Events\n```javascript\n// New customer created\nconst customer = $json.after;\n\n// Sync to CRM\nawait triggerWorkflow('crm-sync', {\n action: 'create',\n data: customer\n});\n\n// Send welcome email\nawait triggerWorkflow('welcome-email', {\n email: customer.email,\n name: customer.name\n});\n\nreturn { processed: true, customerId: customer.id };\n```\n\n## Handle Update Events\n```javascript\n// Customer updated - detect what changed\nconst before = $json.before;\nconst after = $json.after;\n\nconst changes = {};\nfor (const key of Object.keys(after)) {\n if (before[key] !== after[key]) {\n changes[key] = { old: before[key], new: after[key] };\n }\n}\n\n// Special handling for email change\nif (changes.email) {\n await triggerWorkflow('email-verification', {\n customerId: after.id,\n newEmail: after.email\n });\n}\n\nreturn { changes, customerId: after.id };\n```\n\n## Debezium Connector Config\n```json\n{\n \"name\": \"postgres-connector\",\n \"config\": {\n \"connector.class\": \"io.debezium.connector.postgresql.PostgresConnector\",\n \"database.hostname\": \"postgres\",\n \"database.port\": \"5432\",\n \"database.user\": \"debezium\",\n \"database.password\": \"debezium\",\n \"database.dbname\": \"app\",\n \"database.server.name\": \"dbserver1\",\n \"table.include.list\": \"public.customers,public.orders\",\n \"plugin.name\": \"pgoutput\",\n \"slot.name\": \"debezium\",\n \"publication.name\": \"dbz_publication\"\n }\n}\n```", "metadata": {"topic": "debezium_cdc", "type": "etl"}}
|
| 11 |
+
{"instruction": "How do I write automated tests for n8n workflows?", "output": "# Automated Testing for n8n Workflows\n\n## Test Framework Setup\n```javascript\n// tests/workflow-tests.js\nconst axios = require('axios');\n\nconst N8N_URL = process.env.N8N_URL || 'http://localhost:5678';\nconst API_KEY = process.env.N8N_API_KEY;\n\nasync function testWorkflow(workflowId, testData, expectedOutput) {\n // Execute workflow\n const response = await axios.post(\n `${N8N_URL}/api/v1/workflows/${workflowId}/execute`,\n { data: testData },\n { headers: { 'X-N8N-API-KEY': API_KEY } }\n );\n \n // Wait for completion\n const executionId = response.data.executionId;\n let execution;\n do {\n await new Promise(r => setTimeout(r, 1000));\n execution = await axios.get(\n `${N8N_URL}/api/v1/executions/${executionId}`,\n { headers: { 'X-N8N-API-KEY': API_KEY } }\n );\n } while (execution.data.status === 'running');\n \n // Validate output\n const output = execution.data.data.resultData.lastNodeExecutionStack;\n return validateOutput(output, expectedOutput);\n}\n```\n\n## Test Cases\n```javascript\ndescribe('Lead Processing Workflow', () => {\n test('should score high-value lead correctly', async () => {\n const testData = {\n email: 'test@enterprise.com',\n company_size: 500,\n budget: 50000\n };\n \n const result = await testWorkflow('lead-scoring', testData);\n \n expect(result.score).toBeGreaterThan(70);\n expect(result.segment).toBe('enterprise');\n });\n \n test('should reject invalid email', async () => {\n const testData = {\n email: 'invalid-email',\n company_size: 10\n };\n \n const result = await testWorkflow('lead-scoring', testData);\n \n expect(result.error).toBe('Invalid email format');\n });\n \n test('should handle timeout gracefully', async () => {\n const testData = {\n email: 'slow@test.com',\n simulate_delay: true\n };\n \n const result = await testWorkflow('lead-scoring', testData, { timeout: 5000 });\n \n expect(result.fallback_used).toBe(true);\n });\n});\n```\n\n## Webhook Testing\n```javascript\nasync function testWebhook(webhookPath, payload, expectedStatus = 200) {\n const response = await axios.post(\n `${N8N_URL}/webhook/${webhookPath}`,\n payload,\n { validateStatus: () => true }\n );\n \n return {\n status: response.status,\n data: response.data,\n passed: response.status === expectedStatus\n };\n}\n\n// Test examples\nawait testWebhook('order-received', { orderId: '123', items: [] }, 400); // Should fail validation\nawait testWebhook('order-received', { orderId: '123', items: [{sku: 'A1', qty: 2}] }, 200);\n```\n\n## CI Integration\n```yaml\n# .github/workflows/test.yml\njobs:\n test:\n runs-on: ubuntu-latest\n services:\n n8n:\n image: n8nio/n8n\n ports: ['5678:5678']\n steps:\n - uses: actions/checkout@v4\n - run: npm install\n - run: npm test\n env:\n N8N_URL: http://localhost:5678\n```", "metadata": {"topic": "testing", "type": "devops"}}
|
docs-dataset/saas_vision_dataset.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
docs-dataset/screenshots/enterprise_gaps/odoo_accounting_0.webp
ADDED
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_0.webp
ADDED
|
Git LFS Details
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_1.webp
ADDED
|
Git LFS Details
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_2.webp
ADDED
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_3.webp
ADDED
|
Git LFS Details
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_4.webp
ADDED
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_5.webp
ADDED
|
docs-dataset/screenshots/enterprise_gaps/odoo_studio_6.webp
ADDED
|
Git LFS Details
|
docs-dataset/screenshots/fieldroutes/fr_billing.png
ADDED
|
docs-dataset/screenshots/fieldroutes/fr_customers.png
ADDED
|
docs-dataset/screenshots/fieldroutes/fr_dashboard.png
ADDED
|
Git LFS Details
|
docs-dataset/screenshots/fieldroutes/fr_employees.png
ADDED
|
docs-dataset/screenshots/fieldroutes/fr_leads.png
ADDED
|
docs-dataset/screenshots/fieldroutes/fr_login.png
ADDED
|
docs-dataset/screenshots/fieldroutes/fr_marketing.png
ADDED
|
Git LFS Details
|
docs-dataset/screenshots/fieldroutes/fr_pricing_page.png
ADDED
|