@atom8n/ai-workflow-builder 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/responder.agent.d.ts +21 -0
- package/dist/agents/responder.agent.js +71 -0
- package/dist/agents/responder.agent.js.map +1 -0
- package/dist/agents/supervisor.agent.d.ts +31 -0
- package/dist/agents/supervisor.agent.js +68 -0
- package/dist/agents/supervisor.agent.js.map +1 -0
- package/dist/ai-workflow-builder-agent.service.d.ts +32 -0
- package/dist/ai-workflow-builder-agent.service.js +236 -0
- package/dist/ai-workflow-builder-agent.service.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -0
- package/dist/chains/conversation-compact.d.ts +7 -0
- package/dist/chains/conversation-compact.js +56 -0
- package/dist/chains/conversation-compact.js.map +1 -0
- package/dist/chains/parameter-updater.d.ts +16 -0
- package/dist/chains/parameter-updater.js +112 -0
- package/dist/chains/parameter-updater.js.map +1 -0
- package/dist/chains/prompt-categorization.d.ts +3 -0
- package/dist/chains/prompt-categorization.js +31 -0
- package/dist/chains/prompt-categorization.js.map +1 -0
- package/dist/chains/test/integration/test-helpers.d.ts +3 -0
- package/dist/chains/test/integration/test-helpers.js +16 -0
- package/dist/chains/test/integration/test-helpers.js.map +1 -0
- package/dist/chains/workflow-name.d.ts +4 -0
- package/dist/chains/workflow-name.js +22 -0
- package/dist/chains/workflow-name.js.map +1 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +18 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors/index.d.ts +52 -0
- package/dist/errors/index.js +137 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/llm-config.d.ts +11 -0
- package/dist/llm-config.js +126 -0
- package/dist/llm-config.js.map +1 -0
- package/dist/multi-agent-workflow-subgraphs.d.ts +122 -0
- package/dist/multi-agent-workflow-subgraphs.js +159 -0
- package/dist/multi-agent-workflow-subgraphs.js.map +1 -0
- package/dist/parent-graph-state.d.ts +27 -0
- package/dist/parent-graph-state.js +47 -0
- package/dist/parent-graph-state.js.map +1 -0
- package/dist/prompts/agents/builder.prompt.d.ts +1 -0
- package/dist/prompts/agents/builder.prompt.js +320 -0
- package/dist/prompts/agents/builder.prompt.js.map +1 -0
- package/dist/prompts/agents/configurator.prompt.d.ts +2 -0
- package/dist/prompts/agents/configurator.prompt.js +143 -0
- package/dist/prompts/agents/configurator.prompt.js.map +1 -0
- package/dist/prompts/agents/discovery.prompt.d.ts +11 -0
- package/dist/prompts/agents/discovery.prompt.js +260 -0
- package/dist/prompts/agents/discovery.prompt.js.map +1 -0
- package/dist/prompts/agents/responder.prompt.d.ts +1 -0
- package/dist/prompts/agents/responder.prompt.js +41 -0
- package/dist/prompts/agents/responder.prompt.js.map +1 -0
- package/dist/prompts/agents/supervisor.prompt.d.ts +1 -0
- package/dist/prompts/agents/supervisor.prompt.js +43 -0
- package/dist/prompts/agents/supervisor.prompt.js.map +1 -0
- package/dist/prompts/builder/index.d.ts +2 -0
- package/dist/prompts/builder/index.js +7 -0
- package/dist/prompts/builder/index.js.map +1 -0
- package/dist/prompts/builder/prompt-builder.d.ts +17 -0
- package/dist/prompts/builder/prompt-builder.js +147 -0
- package/dist/prompts/builder/prompt-builder.js.map +1 -0
- package/dist/prompts/builder/types.d.ts +22 -0
- package/dist/prompts/builder/types.js +3 -0
- package/dist/prompts/builder/types.js.map +1 -0
- package/dist/prompts/chains/categorization.prompt.d.ts +43 -0
- package/dist/prompts/chains/categorization.prompt.js +86 -0
- package/dist/prompts/chains/categorization.prompt.js.map +1 -0
- package/dist/prompts/chains/compact.prompt.d.ts +2 -0
- package/dist/prompts/chains/compact.prompt.js +16 -0
- package/dist/prompts/chains/compact.prompt.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.js +141 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/index.d.ts +6 -0
- package/dist/prompts/chains/parameter-updater/examples/index.js +16 -0
- package/dist/prompts/chains/parameter-updater/examples/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.js +83 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.js +151 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.js +54 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.js +131 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.js +74 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js +70 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.js +28 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.js +139 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.js +159 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/index.d.ts +10 -0
- package/dist/prompts/chains/parameter-updater/guides/index.js +24 -0
- package/dist/prompts/chains/parameter-updater/guides/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.js +99 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.js +94 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.js +75 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.js +96 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.js +31 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js +76 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/index.d.ts +8 -0
- package/dist/prompts/chains/parameter-updater/index.js +35 -0
- package/dist/prompts/chains/parameter-updater/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/instance-url.d.ts +1 -0
- package/dist/prompts/chains/parameter-updater/instance-url.js +15 -0
- package/dist/prompts/chains/parameter-updater/instance-url.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.d.ts +4 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.js +52 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/registry.d.ts +4 -0
- package/dist/prompts/chains/parameter-updater/registry.js +66 -0
- package/dist/prompts/chains/parameter-updater/registry.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/types.d.ts +18 -0
- package/dist/prompts/chains/parameter-updater/types.js +3 -0
- package/dist/prompts/chains/parameter-updater/types.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/utils.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/utils.js +16 -0
- package/dist/prompts/chains/parameter-updater/utils.js.map +1 -0
- package/dist/prompts/chains/workflow-name.prompt.d.ts +2 -0
- package/dist/prompts/chains/workflow-name.prompt.js +11 -0
- package/dist/prompts/chains/workflow-name.prompt.js.map +1 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.js +50 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/legacy-agent.prompt.d.ts +6 -0
- package/dist/prompts/legacy-agent.prompt.js +594 -0
- package/dist/prompts/legacy-agent.prompt.js.map +1 -0
- package/dist/session-manager.service.d.ts +16 -0
- package/dist/session-manager.service.js +125 -0
- package/dist/session-manager.service.js.map +1 -0
- package/dist/subgraphs/builder.subgraph.d.ts +132 -0
- package/dist/subgraphs/builder.subgraph.js +173 -0
- package/dist/subgraphs/builder.subgraph.js.map +1 -0
- package/dist/subgraphs/configurator.subgraph.d.ts +142 -0
- package/dist/subgraphs/configurator.subgraph.js +173 -0
- package/dist/subgraphs/configurator.subgraph.js.map +1 -0
- package/dist/subgraphs/discovery.subgraph.d.ts +158 -0
- package/dist/subgraphs/discovery.subgraph.js +221 -0
- package/dist/subgraphs/discovery.subgraph.js.map +1 -0
- package/dist/subgraphs/subgraph-interface.d.ts +23 -0
- package/dist/subgraphs/subgraph-interface.js +7 -0
- package/dist/subgraphs/subgraph-interface.js.map +1 -0
- package/dist/tools/add-node.tool.d.ts +54 -0
- package/dist/tools/add-node.tool.js +176 -0
- package/dist/tools/add-node.tool.js.map +1 -0
- package/dist/tools/best-practices/chatbot.d.ts +7 -0
- package/dist/tools/best-practices/chatbot.js +118 -0
- package/dist/tools/best-practices/chatbot.js.map +1 -0
- package/dist/tools/best-practices/content-generation.d.ts +7 -0
- package/dist/tools/best-practices/content-generation.js +115 -0
- package/dist/tools/best-practices/content-generation.js.map +1 -0
- package/dist/tools/best-practices/data-analysis.d.ts +7 -0
- package/dist/tools/best-practices/data-analysis.js +367 -0
- package/dist/tools/best-practices/data-analysis.js.map +1 -0
- package/dist/tools/best-practices/data-extraction.d.ts +7 -0
- package/dist/tools/best-practices/data-extraction.js +122 -0
- package/dist/tools/best-practices/data-extraction.js.map +1 -0
- package/dist/tools/best-practices/data-transformation.d.ts +7 -0
- package/dist/tools/best-practices/data-transformation.js +162 -0
- package/dist/tools/best-practices/data-transformation.js.map +1 -0
- package/dist/tools/best-practices/document-processing.d.ts +7 -0
- package/dist/tools/best-practices/document-processing.js +335 -0
- package/dist/tools/best-practices/document-processing.js.map +1 -0
- package/dist/tools/best-practices/enrichment.d.ts +7 -0
- package/dist/tools/best-practices/enrichment.js +271 -0
- package/dist/tools/best-practices/enrichment.js.map +1 -0
- package/dist/tools/best-practices/form-input.d.ts +7 -0
- package/dist/tools/best-practices/form-input.js +173 -0
- package/dist/tools/best-practices/form-input.js.map +1 -0
- package/dist/tools/best-practices/human-in-the-loop.d.ts +7 -0
- package/dist/tools/best-practices/human-in-the-loop.js +268 -0
- package/dist/tools/best-practices/human-in-the-loop.js.map +1 -0
- package/dist/tools/best-practices/index.d.ts +3 -0
- package/dist/tools/best-practices/index.js +29 -0
- package/dist/tools/best-practices/index.js.map +1 -0
- package/dist/tools/best-practices/knowledge-base.d.ts +7 -0
- package/dist/tools/best-practices/knowledge-base.js +268 -0
- package/dist/tools/best-practices/knowledge-base.js.map +1 -0
- package/dist/tools/best-practices/monitoring.d.ts +7 -0
- package/dist/tools/best-practices/monitoring.js +178 -0
- package/dist/tools/best-practices/monitoring.js.map +1 -0
- package/dist/tools/best-practices/notification.d.ts +7 -0
- package/dist/tools/best-practices/notification.js +229 -0
- package/dist/tools/best-practices/notification.js.map +1 -0
- package/dist/tools/best-practices/scheduling.d.ts +7 -0
- package/dist/tools/best-practices/scheduling.js +281 -0
- package/dist/tools/best-practices/scheduling.js.map +1 -0
- package/dist/tools/best-practices/scraping-and-research.d.ts +7 -0
- package/dist/tools/best-practices/scraping-and-research.js +161 -0
- package/dist/tools/best-practices/scraping-and-research.js.map +1 -0
- package/dist/tools/best-practices/triage.d.ts +7 -0
- package/dist/tools/best-practices/triage.js +211 -0
- package/dist/tools/best-practices/triage.js.map +1 -0
- package/dist/tools/builder-tools.d.ts +16 -0
- package/dist/tools/builder-tools.js +36 -0
- package/dist/tools/builder-tools.js.map +1 -0
- package/dist/tools/categorize-prompt.tool.d.ts +5 -0
- package/dist/tools/categorize-prompt.tool.js +85 -0
- package/dist/tools/categorize-prompt.tool.js.map +1 -0
- package/dist/tools/connect-nodes.tool.d.ts +22 -0
- package/dist/tools/connect-nodes.tool.js +231 -0
- package/dist/tools/connect-nodes.tool.js.map +1 -0
- package/dist/tools/engines/node-search-engine.d.ts +16 -0
- package/dist/tools/engines/node-search-engine.js +123 -0
- package/dist/tools/engines/node-search-engine.js.map +1 -0
- package/dist/tools/get-best-practices.tool.d.ts +33 -0
- package/dist/tools/get-best-practices.tool.js +94 -0
- package/dist/tools/get-best-practices.tool.js.map +1 -0
- package/dist/tools/get-node-examples.tool.d.ts +119 -0
- package/dist/tools/get-node-examples.tool.js +189 -0
- package/dist/tools/get-node-examples.tool.js.map +1 -0
- package/dist/tools/get-node-parameter.tool.d.ts +4 -0
- package/dist/tools/get-node-parameter.tool.js +114 -0
- package/dist/tools/get-node-parameter.tool.js.map +1 -0
- package/dist/tools/get-workflow-examples.tool.d.ts +34 -0
- package/dist/tools/get-workflow-examples.tool.js +138 -0
- package/dist/tools/get-workflow-examples.tool.js.map +1 -0
- package/dist/tools/helpers/index.d.ts +4 -0
- package/dist/tools/helpers/index.js +21 -0
- package/dist/tools/helpers/index.js.map +1 -0
- package/dist/tools/helpers/progress.d.ts +9 -0
- package/dist/tools/helpers/progress.js +126 -0
- package/dist/tools/helpers/progress.js.map +1 -0
- package/dist/tools/helpers/response.d.ts +7 -0
- package/dist/tools/helpers/response.js +33 -0
- package/dist/tools/helpers/response.js.map +1 -0
- package/dist/tools/helpers/state.d.ts +14 -0
- package/dist/tools/helpers/state.js +85 -0
- package/dist/tools/helpers/state.js.map +1 -0
- package/dist/tools/helpers/validation.d.ts +13 -0
- package/dist/tools/helpers/validation.js +83 -0
- package/dist/tools/helpers/validation.js.map +1 -0
- package/dist/tools/node-details.tool.d.ts +31 -0
- package/dist/tools/node-details.tool.js +201 -0
- package/dist/tools/node-details.tool.js.map +1 -0
- package/dist/tools/node-search.tool.d.ts +62 -0
- package/dist/tools/node-search.tool.js +155 -0
- package/dist/tools/node-search.tool.js.map +1 -0
- package/dist/tools/remove-connection.tool.d.ts +24 -0
- package/dist/tools/remove-connection.tool.js +234 -0
- package/dist/tools/remove-connection.tool.js.map +1 -0
- package/dist/tools/remove-node.tool.d.ts +4 -0
- package/dist/tools/remove-node.tool.js +106 -0
- package/dist/tools/remove-node.tool.js.map +1 -0
- package/dist/tools/update-node-parameters.tool.d.ts +5 -0
- package/dist/tools/update-node-parameters.tool.js +156 -0
- package/dist/tools/update-node-parameters.tool.js.map +1 -0
- package/dist/tools/utils/connection-parameters.utils.d.ts +8 -0
- package/dist/tools/utils/connection-parameters.utils.js +47 -0
- package/dist/tools/utils/connection-parameters.utils.js.map +1 -0
- package/dist/tools/utils/connection.utils.d.ts +15 -0
- package/dist/tools/utils/connection.utils.js +321 -0
- package/dist/tools/utils/connection.utils.js.map +1 -0
- package/dist/tools/utils/mermaid.utils.d.ts +13 -0
- package/dist/tools/utils/mermaid.utils.js +647 -0
- package/dist/tools/utils/mermaid.utils.js.map +1 -0
- package/dist/tools/utils/node-configuration.utils.d.ts +13 -0
- package/dist/tools/utils/node-configuration.utils.js +75 -0
- package/dist/tools/utils/node-configuration.utils.js.map +1 -0
- package/dist/tools/utils/node-creation.utils.d.ts +8 -0
- package/dist/tools/utils/node-creation.utils.js +56 -0
- package/dist/tools/utils/node-creation.utils.js.map +1 -0
- package/dist/tools/utils/node-positioning.utils.d.ts +17 -0
- package/dist/tools/utils/node-positioning.utils.js +87 -0
- package/dist/tools/utils/node-positioning.utils.js.map +1 -0
- package/dist/tools/utils/parameter-update.utils.d.ts +6 -0
- package/dist/tools/utils/parameter-update.utils.js +75 -0
- package/dist/tools/utils/parameter-update.utils.js.map +1 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.d.ts +2 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js +542 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js.map +1 -0
- package/dist/tools/validate-configuration.tool.d.ts +4 -0
- package/dist/tools/validate-configuration.tool.js +70 -0
- package/dist/tools/validate-configuration.tool.js.map +1 -0
- package/dist/tools/validate-structure.tool.d.ts +4 -0
- package/dist/tools/validate-structure.tool.js +66 -0
- package/dist/tools/validate-structure.tool.js.map +1 -0
- package/dist/tools/validate-workflow.tool.d.ts +5 -0
- package/dist/tools/validate-workflow.tool.js +73 -0
- package/dist/tools/validate-workflow.tool.js.map +1 -0
- package/dist/tools/web/templates.d.ts +23 -0
- package/dist/tools/web/templates.js +106 -0
- package/dist/tools/web/templates.js.map +1 -0
- package/dist/types/best-practices.d.ts +6 -0
- package/dist/types/best-practices.js +3 -0
- package/dist/types/best-practices.js.map +1 -0
- package/dist/types/categorization.d.ts +23 -0
- package/dist/types/categorization.js +38 -0
- package/dist/types/categorization.js.map +1 -0
- package/dist/types/config.d.ts +55 -0
- package/dist/types/config.js +3 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/connections.d.ts +30 -0
- package/dist/types/connections.js +3 -0
- package/dist/types/connections.js.map +1 -0
- package/dist/types/coordination.d.ts +42 -0
- package/dist/types/coordination.js +23 -0
- package/dist/types/coordination.js.map +1 -0
- package/dist/types/discovery-types.d.ts +12 -0
- package/dist/types/discovery-types.js +3 -0
- package/dist/types/discovery-types.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/langchain.d.ts +3 -0
- package/dist/types/langchain.js +15 -0
- package/dist/types/langchain.js.map +1 -0
- package/dist/types/messages.d.ts +32 -0
- package/dist/types/messages.js +3 -0
- package/dist/types/messages.js.map +1 -0
- package/dist/types/nodes.d.ts +27 -0
- package/dist/types/nodes.js +3 -0
- package/dist/types/nodes.js.map +1 -0
- package/dist/types/sessions.d.ts +8 -0
- package/dist/types/sessions.js +34 -0
- package/dist/types/sessions.js.map +1 -0
- package/dist/types/streaming.d.ts +33 -0
- package/dist/types/streaming.js +3 -0
- package/dist/types/streaming.js.map +1 -0
- package/dist/types/tools.d.ts +120 -0
- package/dist/types/tools.js +3 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/utils.js +3 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/web/templates.d.ts +45 -0
- package/dist/types/web/templates.js +37 -0
- package/dist/types/web/templates.js.map +1 -0
- package/dist/types/workflow.d.ts +31 -0
- package/dist/types/workflow.js +3 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/utils/cache-control/helpers.d.ts +5 -0
- package/dist/utils/cache-control/helpers.js +126 -0
- package/dist/utils/cache-control/helpers.js.map +1 -0
- package/dist/utils/cache-control/index.d.ts +1 -0
- package/dist/utils/cache-control/index.js +9 -0
- package/dist/utils/cache-control/index.js.map +1 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.d.ts +3 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.js +10 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.js.map +1 -0
- package/dist/utils/context-builders.d.ts +10 -0
- package/dist/utils/context-builders.js +71 -0
- package/dist/utils/context-builders.js.map +1 -0
- package/dist/utils/coordination-log.d.ts +15 -0
- package/dist/utils/coordination-log.js +75 -0
- package/dist/utils/coordination-log.js.map +1 -0
- package/dist/utils/http-proxy-agent.d.ts +2 -0
- package/dist/utils/http-proxy-agent.js +16 -0
- package/dist/utils/http-proxy-agent.js.map +1 -0
- package/dist/utils/node-helpers.d.ts +2 -0
- package/dist/utils/node-helpers.js +54 -0
- package/dist/utils/node-helpers.js.map +1 -0
- package/dist/utils/operations-processor.d.ts +14 -0
- package/dist/utils/operations-processor.js +196 -0
- package/dist/utils/operations-processor.js.map +1 -0
- package/dist/utils/state-modifier.d.ts +32 -0
- package/dist/utils/state-modifier.js +112 -0
- package/dist/utils/state-modifier.js.map +1 -0
- package/dist/utils/state-reducers.d.ts +3 -0
- package/dist/utils/state-reducers.js +20 -0
- package/dist/utils/state-reducers.js.map +1 -0
- package/dist/utils/stream-processor.d.ts +20 -0
- package/dist/utils/stream-processor.js +277 -0
- package/dist/utils/stream-processor.js.map +1 -0
- package/dist/utils/subgraph-helpers.d.ts +16 -0
- package/dist/utils/subgraph-helpers.js +117 -0
- package/dist/utils/subgraph-helpers.js.map +1 -0
- package/dist/utils/token-usage.d.ts +21 -0
- package/dist/utils/token-usage.js +45 -0
- package/dist/utils/token-usage.js.map +1 -0
- package/dist/utils/tool-executor.d.ts +3 -0
- package/dist/utils/tool-executor.js +108 -0
- package/dist/utils/tool-executor.js.map +1 -0
- package/dist/utils/trim-workflow-context.d.ts +2 -0
- package/dist/utils/trim-workflow-context.js +53 -0
- package/dist/utils/trim-workflow-context.js.map +1 -0
- package/dist/utils/workflow-validation.d.ts +2 -0
- package/dist/utils/workflow-validation.js +37 -0
- package/dist/utils/workflow-validation.js.map +1 -0
- package/dist/validation/checks/agent-prompt.d.ts +3 -0
- package/dist/validation/checks/agent-prompt.js +47 -0
- package/dist/validation/checks/agent-prompt.js.map +1 -0
- package/dist/validation/checks/connections.d.ts +4 -0
- package/dist/validation/checks/connections.js +163 -0
- package/dist/validation/checks/connections.js.map +1 -0
- package/dist/validation/checks/credentials.d.ts +3 -0
- package/dist/validation/checks/credentials.js +125 -0
- package/dist/validation/checks/credentials.js.map +1 -0
- package/dist/validation/checks/from-ai.d.ts +4 -0
- package/dist/validation/checks/from-ai.js +62 -0
- package/dist/validation/checks/from-ai.js.map +1 -0
- package/dist/validation/checks/index.d.ts +7 -0
- package/dist/validation/checks/index.js +18 -0
- package/dist/validation/checks/index.js.map +1 -0
- package/dist/validation/checks/nodes.d.ts +4 -0
- package/dist/validation/checks/nodes.js +44 -0
- package/dist/validation/checks/nodes.js.map +1 -0
- package/dist/validation/checks/tools.d.ts +4 -0
- package/dist/validation/checks/tools.js +38 -0
- package/dist/validation/checks/tools.js.map +1 -0
- package/dist/validation/checks/trigger.d.ts +8 -0
- package/dist/validation/checks/trigger.js +33 -0
- package/dist/validation/checks/trigger.js.map +1 -0
- package/dist/validation/programmatic.d.ts +3 -0
- package/dist/validation/programmatic.js +24 -0
- package/dist/validation/programmatic.js.map +1 -0
- package/dist/validation/types.d.ts +52 -0
- package/dist/validation/types.js +31 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation/utils/expressions.d.ts +3 -0
- package/dist/validation/utils/expressions.js +37 -0
- package/dist/validation/utils/expressions.js.map +1 -0
- package/dist/validation/utils/is-tool.d.ts +2 -0
- package/dist/validation/utils/is-tool.js +7 -0
- package/dist/validation/utils/is-tool.js.map +1 -0
- package/dist/validation/utils/node-type-map.d.ts +8 -0
- package/dist/validation/utils/node-type-map.js +50 -0
- package/dist/validation/utils/node-type-map.js.map +1 -0
- package/dist/validation/utils/resolve-connections.d.ts +8 -0
- package/dist/validation/utils/resolve-connections.js +64 -0
- package/dist/validation/utils/resolve-connections.js.map +1 -0
- package/dist/workflow-builder-agent.d.ts +72 -0
- package/dist/workflow-builder-agent.js +401 -0
- package/dist/workflow-builder-agent.js.map +1 -0
- package/dist/workflow-state.d.ts +26 -0
- package/dist/workflow-state.js +79 -0
- package/dist/workflow-state.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormInputBestPractices = void 0;
|
|
4
|
+
const categorization_1 = require("../../types/categorization");
|
|
5
|
+
class FormInputBestPractices {
|
|
6
|
+
technique = categorization_1.WorkflowTechnique.FORM_INPUT;
|
|
7
|
+
version = '1.0.0';
|
|
8
|
+
documentation = `# Best Practices: Form Input Workflows
|
|
9
|
+
|
|
10
|
+
## Workflow Design
|
|
11
|
+
|
|
12
|
+
### Critical: Always Store Raw Form Data
|
|
13
|
+
|
|
14
|
+
ALWAYS store raw form responses to a persistent data storage destination even if the primary purpose of the workflow is
|
|
15
|
+
to trigger another action (like sending to an API or triggering a notification). This allows users to monitor
|
|
16
|
+
form responses as part of the administration of their workflow.
|
|
17
|
+
|
|
18
|
+
Required storage destinations include:
|
|
19
|
+
- Google Sheets node
|
|
20
|
+
- Airtable node
|
|
21
|
+
- n8n Data Tables
|
|
22
|
+
- PostgreSQL/MySQL/MongoDB nodes
|
|
23
|
+
- Any other database or spreadsheet service
|
|
24
|
+
|
|
25
|
+
IMPORTANT: Simply using Set or Merge nodes is NOT sufficient. These nodes only transform data in memory - they do not
|
|
26
|
+
persist data. You must use an actual storage node (like Google Sheets, Airtable, or Data Tables) to write the data.
|
|
27
|
+
|
|
28
|
+
Storage Requirements:
|
|
29
|
+
- Store the un-edited user input immediately after the form steps are complete
|
|
30
|
+
- Do not store only a summary or edited version of the user's inputs - store the raw data
|
|
31
|
+
- For single-step forms: store immediately after the form trigger
|
|
32
|
+
- For multi-step forms: store immediately after aggregating all steps with Set/Merge nodes
|
|
33
|
+
- The storage node should appear in the workflow right after data collection/aggregation
|
|
34
|
+
|
|
35
|
+
## Message Attribution
|
|
36
|
+
|
|
37
|
+
n8n forms attach the attribution "n8n workflow" to messages by default - you must disable this setting which will
|
|
38
|
+
often be called "Append n8n Attribution" for the n8n form nodes, add this setting and set it to false.
|
|
39
|
+
|
|
40
|
+
## Multi-Step Forms
|
|
41
|
+
|
|
42
|
+
Build multi-step forms by chaining multiple Form nodes together. Each Form node represents a page or step in your form
|
|
43
|
+
sequence. Use the n8n Form Trigger node to start the workflow and display the first form page to the user.
|
|
44
|
+
|
|
45
|
+
## Data Collection & Aggregation
|
|
46
|
+
|
|
47
|
+
Collect and merge all user responses from each form step before writing to your destination (e.g., Data Table). Use
|
|
48
|
+
Set or Merge nodes to combine data as needed. Make sure your JSON keys match the column names in your destination for
|
|
49
|
+
automatic mapping.
|
|
50
|
+
|
|
51
|
+
## Conditional Logic & Branching
|
|
52
|
+
|
|
53
|
+
Use IF or Switch nodes to direct users to different form pages based on their previous answers. This enables dynamic
|
|
54
|
+
form flows where the path changes based on user input, creating personalized form experiences.
|
|
55
|
+
|
|
56
|
+
## Dynamic Form Fields
|
|
57
|
+
|
|
58
|
+
For forms that require dynamic options (e.g., dropdowns populated from an API or previous step), generate the form
|
|
59
|
+
definition in a Code node and pass it to the Form node as JSON. You can define forms using JSON for dynamic or
|
|
60
|
+
conditional fields, and even generate form fields dynamically using a Code node if needed.
|
|
61
|
+
|
|
62
|
+
## Input Validation
|
|
63
|
+
|
|
64
|
+
Validate user input between steps to ensure data quality. If input is invalid, loop back to the relevant form step with
|
|
65
|
+
an error message to guide the user to correct their submission. This prevents bad data from entering your system.
|
|
66
|
+
|
|
67
|
+
## Recommended Nodes
|
|
68
|
+
|
|
69
|
+
### n8n Form Trigger (n8n-nodes-base.formTrigger)
|
|
70
|
+
|
|
71
|
+
Purpose: Starts the workflow and displays the first form page to the user
|
|
72
|
+
|
|
73
|
+
Pitfalls:
|
|
74
|
+
|
|
75
|
+
- Use the Production URL for live forms; the Test URL is for development and debugging only
|
|
76
|
+
- Ensure the form trigger is properly configured before sharing URLs with users
|
|
77
|
+
|
|
78
|
+
### n8n Form (n8n-nodes-base.form)
|
|
79
|
+
|
|
80
|
+
Purpose: Displays form pages in multi-step form sequences
|
|
81
|
+
|
|
82
|
+
Pitfalls:
|
|
83
|
+
|
|
84
|
+
- Each Form node represents one page/step in your form
|
|
85
|
+
- You can define forms using JSON for dynamic or conditional fields
|
|
86
|
+
- Generate form fields dynamically using a Code node if needed for complex scenarios
|
|
87
|
+
|
|
88
|
+
### Storage Nodes
|
|
89
|
+
|
|
90
|
+
Purpose: Persist raw form data to a storage destination, preference should be for built-in n8n tables
|
|
91
|
+
but use the most applicable node depending on the user's request.
|
|
92
|
+
|
|
93
|
+
Required nodes (use at least one):
|
|
94
|
+
- Data table (n8n-nodes-base.dataTable): Built-in n8n storage for quick setup - preferred
|
|
95
|
+
- Google Sheets (n8n-nodes-base.googleSheets): Best for simple spreadsheet storage
|
|
96
|
+
- Airtable (n8n-nodes-base.airtable): Best for structured database with relationships
|
|
97
|
+
- Postgres (n8n-nodes-base.postgres) / MySQL (n8n-nodes-base.mySql) / MongoDB (n8n-nodes-base.mongoDb): For production database storage
|
|
98
|
+
|
|
99
|
+
Pitfalls:
|
|
100
|
+
|
|
101
|
+
- Every form workflow MUST include a storage node that actually writes data to a destination
|
|
102
|
+
- Set and Merge nodes alone are NOT sufficient - they only transform data in memory
|
|
103
|
+
- The storage node should be placed immediately after the form trigger (single-step) or after data aggregation (multi-step)
|
|
104
|
+
|
|
105
|
+
### Code (n8n-nodes-base.code)
|
|
106
|
+
|
|
107
|
+
Purpose: Processes form data, generates dynamic form definitions, or implements custom validation logic
|
|
108
|
+
|
|
109
|
+
### Edit Fields (Set) (n8n-nodes-base.set)
|
|
110
|
+
|
|
111
|
+
Purpose: Aggregates and transforms form data between steps (NOT for storage - use a storage node)
|
|
112
|
+
|
|
113
|
+
### Merge (n8n-nodes-base.merge)
|
|
114
|
+
|
|
115
|
+
Purpose: Combines data from multiple form steps into a single dataset (NOT for storage - use a storage node)
|
|
116
|
+
|
|
117
|
+
Pitfalls:
|
|
118
|
+
|
|
119
|
+
- Ensure data from all form steps is properly merged before writing to destination
|
|
120
|
+
- Use appropriate merge modes (append, merge by key, etc.) for your use case
|
|
121
|
+
- Remember: Merge prepares data but does not store it - add a storage node after Merge
|
|
122
|
+
|
|
123
|
+
### If (n8n-nodes-base.if)
|
|
124
|
+
|
|
125
|
+
Purpose: Routes users to different form pages based on their previous answers
|
|
126
|
+
|
|
127
|
+
### Switch (n8n-nodes-base.switch)
|
|
128
|
+
|
|
129
|
+
Purpose: Implements multi-path conditional routing in complex forms
|
|
130
|
+
|
|
131
|
+
Pitfalls:
|
|
132
|
+
|
|
133
|
+
- Include a default case to handle unexpected input values
|
|
134
|
+
- Keep routing logic clear and maintainable
|
|
135
|
+
|
|
136
|
+
## Common Pitfalls to Avoid
|
|
137
|
+
|
|
138
|
+
### Missing Raw Form Response Storage
|
|
139
|
+
|
|
140
|
+
When building n8n forms it is recommended to always store the raw form response to some form of data storage (Googlesheets, Airtable, etc)
|
|
141
|
+
for administration later. It is CRITICAL if you create a n8n form node that you store the raw output with a storage node.
|
|
142
|
+
|
|
143
|
+
### Data Loss in Multi-Step Forms
|
|
144
|
+
|
|
145
|
+
Aggregate all form step data using Set/Merge nodes before writing to your destination. Failing to merge data from multiple steps
|
|
146
|
+
can result in incomplete form submissions being stored. After merging, ensure you write the complete dataset to a storage node.
|
|
147
|
+
|
|
148
|
+
### Poor User Experience
|
|
149
|
+
|
|
150
|
+
Use the Form Ending page type to show a completion message or redirect users after submission.
|
|
151
|
+
Without a proper ending, users may be confused about whether their submission was successful.
|
|
152
|
+
|
|
153
|
+
### Invalid Data
|
|
154
|
+
|
|
155
|
+
Implement validation between form steps to catch errors early. Without validation, invalid data can
|
|
156
|
+
propagate through your workflow and corrupt your destination data.
|
|
157
|
+
|
|
158
|
+
### Complex Field Generation
|
|
159
|
+
|
|
160
|
+
When generating dynamic form fields, ensure the JSON structure exactly matches what the Form
|
|
161
|
+
node expects. Test thoroughly with the Test URL before going live.
|
|
162
|
+
|
|
163
|
+
### Mapping Errors
|
|
164
|
+
|
|
165
|
+
When writing to Google Sheets or other destinations, ensure field names match exactly. Mismatched names
|
|
166
|
+
will cause data to be written to wrong columns or fail entirely.
|
|
167
|
+
`;
|
|
168
|
+
getDocumentation() {
|
|
169
|
+
return this.documentation;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.FormInputBestPractices = FormInputBestPractices;
|
|
173
|
+
//# sourceMappingURL=form-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-input.js","sourceRoot":"","sources":["../../../src/tools/best-practices/form-input.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAE3D,MAAa,sBAAsB;IACzB,SAAS,GAAG,kCAAiB,CAAC,UAAU,CAAC;IACzC,OAAO,GAAG,OAAO,CAAC;IAEV,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+JjC,CAAC;IAED,gBAAgB;QACf,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CACD;AAxKD,wDAwKC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BestPracticesDocument } from '../../types/best-practices';
|
|
2
|
+
export declare class HumanInTheLoopBestPractices implements BestPracticesDocument {
|
|
3
|
+
readonly technique: "human_in_the_loop";
|
|
4
|
+
readonly version = "1.0.0";
|
|
5
|
+
private readonly documentation;
|
|
6
|
+
getDocumentation(): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HumanInTheLoopBestPractices = void 0;
|
|
4
|
+
const categorization_1 = require("../../types/categorization");
|
|
5
|
+
class HumanInTheLoopBestPractices {
|
|
6
|
+
technique = categorization_1.WorkflowTechnique.HUMAN_IN_THE_LOOP;
|
|
7
|
+
version = '1.0.0';
|
|
8
|
+
documentation = `# Best Practices: Human-in-the-Loop Workflows
|
|
9
|
+
|
|
10
|
+
## Workflow Design
|
|
11
|
+
|
|
12
|
+
Structure workflows in three stages: Automation → Human Decision → Resume Processing. The Wait node is the core component for implementing pauses.
|
|
13
|
+
|
|
14
|
+
Break the workflow into clear stages:
|
|
15
|
+
1. **Initial Automation**: Execute automated steps leading to the decision point (data extraction, AI content generation, etc.)
|
|
16
|
+
2. **Human Notification**: Send notification with resume URL via preferred channel (Email, Slack, Telegram)
|
|
17
|
+
3. **Wait for Response**: Configure Wait node with appropriate resume condition
|
|
18
|
+
4. **Process Decision**: Use IF/Switch nodes to branch based on human input
|
|
19
|
+
|
|
20
|
+
Example pattern:
|
|
21
|
+
- Trigger → Generate Content → Email (with resume URLs) → Wait Node → IF (decision) → Publish/Reject
|
|
22
|
+
- HTTP Request (fetch data) → Filter → Email Manager → Wait (On Webhook) → Switch (approval status) → Database Update
|
|
23
|
+
|
|
24
|
+
CRITICAL: Always include the $execution.resumeUrl in notification messages. This unique URL resumes the specific workflow execution when accessed.
|
|
25
|
+
|
|
26
|
+
## Wait Node Configuration
|
|
27
|
+
|
|
28
|
+
The Wait node supports four resume conditions:
|
|
29
|
+
- **After Time Interval**: Resume after fixed delay (not for human decisions)
|
|
30
|
+
- **At Specified Time**: Resume at specific date/time (not for human decisions)
|
|
31
|
+
- **On Webhook Call**: Resume when URL is accessed (ideal for link-based approvals)
|
|
32
|
+
- **On Form Submitted**: Resume when user submits n8n-hosted form (best for structured input)
|
|
33
|
+
|
|
34
|
+
For human-in-the-loop, use "On Webhook Call" or "On Form Submitted" modes.
|
|
35
|
+
|
|
36
|
+
### Webhook Configuration
|
|
37
|
+
- Set HTTP method (GET for simple links, POST for data)
|
|
38
|
+
- Configure authentication if needed (None for private URLs, Basic/Token for security)
|
|
39
|
+
- Enable "Ignore Bots" to prevent email scanners/chat bots from triggering
|
|
40
|
+
- Use Webhook Suffix for multiple wait points in same workflow
|
|
41
|
+
|
|
42
|
+
### Form Configuration
|
|
43
|
+
- Design form fields directly in Wait node
|
|
44
|
+
- Specify field types, labels, validation
|
|
45
|
+
- Form automatically hosts at resume URL
|
|
46
|
+
- Submitted data merges with workflow context
|
|
47
|
+
|
|
48
|
+
## Timeout Management
|
|
49
|
+
|
|
50
|
+
Always configure "Limit Wait Time" to prevent infinite waits:
|
|
51
|
+
- Set maximum wait duration (e.g., 48 hours)
|
|
52
|
+
- Or specify absolute deadline date
|
|
53
|
+
- Handle timeout case in workflow logic
|
|
54
|
+
- Check if resumed by timeout (no webhook/form data present)
|
|
55
|
+
|
|
56
|
+
## Communication Patterns
|
|
57
|
+
|
|
58
|
+
### Direct Link Method
|
|
59
|
+
Include $execution.resumeUrl directly in messages:
|
|
60
|
+
|
|
61
|
+
Email: Click to [Approve]({{$execution.resumeUrl}}?decision=approve) or [Reject]({{$execution.resumeUrl}}?decision=reject)
|
|
62
|
+
Slack: Please review and click: {{$execution.resumeUrl}}
|
|
63
|
+
|
|
64
|
+
### Platform Response Method
|
|
65
|
+
For responses within platform (Slack reply, email response):
|
|
66
|
+
- Use separate trigger workflow to catch responses
|
|
67
|
+
- Correlate to correct execution via ID
|
|
68
|
+
- Call resume URL programmatically
|
|
69
|
+
- More complex but keeps interaction native
|
|
70
|
+
|
|
71
|
+
## Data Handling
|
|
72
|
+
|
|
73
|
+
The Wait node preserves all prior workflow data when resuming:
|
|
74
|
+
- Original context remains available
|
|
75
|
+
- New input data (form/webhook) adds to context
|
|
76
|
+
- Access webhook data via $json after Wait node
|
|
77
|
+
- Query parameters available in $json.query
|
|
78
|
+
- Form fields merge directly into JSON output
|
|
79
|
+
|
|
80
|
+
## Recommended Nodes
|
|
81
|
+
|
|
82
|
+
### Wait (n8n-nodes-base.wait)
|
|
83
|
+
|
|
84
|
+
**Purpose**: Core node for pausing workflow execution until human input
|
|
85
|
+
|
|
86
|
+
**Key Settings**:
|
|
87
|
+
- Resume: "On Webhook Call" or "On Form Submitted"
|
|
88
|
+
- Authentication: Configure based on security needs
|
|
89
|
+
- Ignore Bots: Enable to prevent accidental triggers
|
|
90
|
+
- Limit Wait Time: Set timeout to prevent infinite waits
|
|
91
|
+
|
|
92
|
+
**Use Cases**:
|
|
93
|
+
- Approval workflows
|
|
94
|
+
- Data collection from humans
|
|
95
|
+
- Multi-step verification processes
|
|
96
|
+
|
|
97
|
+
**Best Practices**:
|
|
98
|
+
- Always include timeout handling
|
|
99
|
+
- Use unique webhook suffixes for multiple waits
|
|
100
|
+
- Test resume URLs during development
|
|
101
|
+
|
|
102
|
+
### Email (n8n-nodes-base.emailSend)
|
|
103
|
+
|
|
104
|
+
**Purpose**: Send notifications with resume links to users
|
|
105
|
+
|
|
106
|
+
**Use Cases**:
|
|
107
|
+
- Approval request emails
|
|
108
|
+
- Data verification requests
|
|
109
|
+
- Task assignment notifications
|
|
110
|
+
|
|
111
|
+
**Best Practices**:
|
|
112
|
+
- Include clear call-to-action buttons
|
|
113
|
+
- Embed resume URL as hyperlinks
|
|
114
|
+
- Provide context about the decision needed
|
|
115
|
+
|
|
116
|
+
### Slack (n8n-nodes-base.slack)
|
|
117
|
+
|
|
118
|
+
**Purpose**: Send notifications via Slack with resume links
|
|
119
|
+
|
|
120
|
+
**Best Practices**:
|
|
121
|
+
- Wrap URLs in <> to prevent unfurling
|
|
122
|
+
- Use clear message formatting
|
|
123
|
+
- Consider using blocks for rich formatting
|
|
124
|
+
|
|
125
|
+
### Telegram (n8n-nodes-base.telegram)
|
|
126
|
+
|
|
127
|
+
**Purpose**: Send notifications via Telegram
|
|
128
|
+
|
|
129
|
+
**Best Practices**:
|
|
130
|
+
- Enable "Ignore Bots" in Wait node
|
|
131
|
+
- Use inline keyboards for better UX
|
|
132
|
+
- Keep messages concise
|
|
133
|
+
|
|
134
|
+
### IF (n8n-nodes-base.if)
|
|
135
|
+
|
|
136
|
+
**Purpose**: Branch workflow based on human decision
|
|
137
|
+
|
|
138
|
+
**Use Cases**:
|
|
139
|
+
- Route approved vs rejected items
|
|
140
|
+
- Check if response was received (vs timeout)
|
|
141
|
+
- Validate input data
|
|
142
|
+
|
|
143
|
+
**Best Practices**:
|
|
144
|
+
- Handle all possible decision values
|
|
145
|
+
- Include default/timeout branch
|
|
146
|
+
- Use clear condition names
|
|
147
|
+
|
|
148
|
+
### Switch (n8n-nodes-base.switch)
|
|
149
|
+
|
|
150
|
+
**Purpose**: Multi-way branching for complex decisions
|
|
151
|
+
|
|
152
|
+
**Use Cases**:
|
|
153
|
+
- Multiple approval levels
|
|
154
|
+
- Various response options
|
|
155
|
+
- Status-based routing
|
|
156
|
+
|
|
157
|
+
### HTTP Request (n8n-nodes-base.httpRequest)
|
|
158
|
+
|
|
159
|
+
**Purpose**: Call external APIs after human decision
|
|
160
|
+
|
|
161
|
+
**Use Cases**:
|
|
162
|
+
- Update external systems
|
|
163
|
+
- Trigger downstream processes
|
|
164
|
+
- Log decisions to external services
|
|
165
|
+
|
|
166
|
+
### Database Nodes
|
|
167
|
+
|
|
168
|
+
**MySQL** (n8n-nodes-base.mySql), **Postgres** (n8n-nodes-base.postgres), **MongoDB** (n8n-nodes-base.mongoDb):
|
|
169
|
+
- Store approval history
|
|
170
|
+
- Update record status after decision
|
|
171
|
+
- Log human inputs for audit
|
|
172
|
+
|
|
173
|
+
### Google Sheets (n8n-nodes-base.googleSheets)
|
|
174
|
+
|
|
175
|
+
**Purpose**: Track decisions and maintain approval logs
|
|
176
|
+
|
|
177
|
+
**Use Cases**:
|
|
178
|
+
- Approval tracking spreadsheets
|
|
179
|
+
- Decision audit logs
|
|
180
|
+
- User response collection
|
|
181
|
+
|
|
182
|
+
## Common Pitfalls to Avoid
|
|
183
|
+
|
|
184
|
+
### Accidental Resume Triggers
|
|
185
|
+
|
|
186
|
+
**Problem**: Email clients or chat apps preview links and trigger resume unintentionally.
|
|
187
|
+
|
|
188
|
+
**Solution**:
|
|
189
|
+
- Enable "Ignore Bots" option in Wait node
|
|
190
|
+
- Wrap Slack URLs in <> to prevent unfurling
|
|
191
|
+
- Use authentication for sensitive workflows
|
|
192
|
+
- Educate users to click only when ready
|
|
193
|
+
|
|
194
|
+
### Missing Timeouts
|
|
195
|
+
|
|
196
|
+
**Problem**: Workflow waits forever if human never responds.
|
|
197
|
+
|
|
198
|
+
**Solution**:
|
|
199
|
+
- Always set "Limit Wait Time" (e.g., 3 days)
|
|
200
|
+
- Handle timeout scenario in workflow logic
|
|
201
|
+
- Send reminder before deadline
|
|
202
|
+
- Escalate to another person if timeout occurs
|
|
203
|
+
|
|
204
|
+
### Lost Context After Wait
|
|
205
|
+
|
|
206
|
+
**Problem**: Assuming data is lost after Wait node resumes.
|
|
207
|
+
|
|
208
|
+
**Solution**:
|
|
209
|
+
- Wait node preserves all prior data automatically
|
|
210
|
+
- New input merges with existing context
|
|
211
|
+
- Test data structure after resume
|
|
212
|
+
- Use expressions to access both old and new data
|
|
213
|
+
|
|
214
|
+
### Security Issues with Resume URLs
|
|
215
|
+
|
|
216
|
+
**Problem**: Resume URLs exposed to unauthorized users.
|
|
217
|
+
|
|
218
|
+
**Solution**:
|
|
219
|
+
- Treat resume URLs as secrets
|
|
220
|
+
- Use authentication options for sensitive workflows
|
|
221
|
+
- Send only through private channels
|
|
222
|
+
- Consider IP whitelisting if needed
|
|
223
|
+
|
|
224
|
+
### Multiple Wait Node Confusion
|
|
225
|
+
|
|
226
|
+
**Problem**: Using same webhook URL for different wait points.
|
|
227
|
+
|
|
228
|
+
**Solution**:
|
|
229
|
+
- Use unique Webhook Suffix for each Wait node
|
|
230
|
+
- Generate fresh $execution.resumeUrl for each wait
|
|
231
|
+
- Label wait points clearly
|
|
232
|
+
- Document which URL corresponds to which decision
|
|
233
|
+
|
|
234
|
+
### Not Handling All Response Types
|
|
235
|
+
|
|
236
|
+
**Problem**: Only handling expected responses, not edge cases.
|
|
237
|
+
|
|
238
|
+
**Solution**:
|
|
239
|
+
- Handle timeout case explicitly
|
|
240
|
+
- Provide default action for unexpected inputs
|
|
241
|
+
- Validate form data before processing
|
|
242
|
+
- Log all decisions for debugging
|
|
243
|
+
|
|
244
|
+
### Workflow State Persistence
|
|
245
|
+
|
|
246
|
+
**Problem**: Worrying about resource consumption during wait.
|
|
247
|
+
|
|
248
|
+
**Solution**:
|
|
249
|
+
- Waiting executions are saved to database, not running
|
|
250
|
+
- No worker threads consumed during wait
|
|
251
|
+
- Can have hundreds of paused workflows
|
|
252
|
+
- Survives n8n restarts (state in database)
|
|
253
|
+
|
|
254
|
+
### Complex Parallel Approvals
|
|
255
|
+
|
|
256
|
+
**Problem**: Need multiple people to approve before continuing.
|
|
257
|
+
|
|
258
|
+
**Solution**:
|
|
259
|
+
- Use separate Wait node per approver
|
|
260
|
+
- Or create sub-workflow per approver
|
|
261
|
+
- Use Merge node to synchronize branches
|
|
262
|
+
- Consider approval tracking in database`;
|
|
263
|
+
getDocumentation() {
|
|
264
|
+
return this.documentation;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
exports.HumanInTheLoopBestPractices = HumanInTheLoopBestPractices;
|
|
268
|
+
//# sourceMappingURL=human-in-the-loop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"human-in-the-loop.js","sourceRoot":"","sources":["../../../src/tools/best-practices/human-in-the-loop.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAE3D,MAAa,2BAA2B;IAC9B,SAAS,GAAG,kCAAiB,CAAC,iBAAiB,CAAC;IAChD,OAAO,GAAG,OAAO,CAAC;IAEV,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCA8PO,CAAC;IAEzC,gBAAgB;QACf,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CACD;AAvQD,kEAuQC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentation = void 0;
|
|
4
|
+
const categorization_1 = require("../../types/categorization");
|
|
5
|
+
const chatbot_1 = require("./chatbot");
|
|
6
|
+
const content_generation_1 = require("./content-generation");
|
|
7
|
+
const data_extraction_1 = require("./data-extraction");
|
|
8
|
+
const data_transformation_1 = require("./data-transformation");
|
|
9
|
+
const document_processing_1 = require("./document-processing");
|
|
10
|
+
const form_input_1 = require("./form-input");
|
|
11
|
+
const scraping_and_research_1 = require("./scraping-and-research");
|
|
12
|
+
exports.documentation = {
|
|
13
|
+
[categorization_1.WorkflowTechnique.SCRAPING_AND_RESEARCH]: new scraping_and_research_1.ScrapingAndResearchBestPractices(),
|
|
14
|
+
[categorization_1.WorkflowTechnique.CHATBOT]: new chatbot_1.ChatbotBestPractices(),
|
|
15
|
+
[categorization_1.WorkflowTechnique.CONTENT_GENERATION]: new content_generation_1.ContentGenerationBestPractices(),
|
|
16
|
+
[categorization_1.WorkflowTechnique.DATA_ANALYSIS]: undefined,
|
|
17
|
+
[categorization_1.WorkflowTechnique.DATA_EXTRACTION]: new data_extraction_1.DataExtractionBestPractices(),
|
|
18
|
+
[categorization_1.WorkflowTechnique.DATA_TRANSFORMATION]: new data_transformation_1.DataTransformationBestPractices(),
|
|
19
|
+
[categorization_1.WorkflowTechnique.DOCUMENT_PROCESSING]: new document_processing_1.DocumentProcessingBestPractices(),
|
|
20
|
+
[categorization_1.WorkflowTechnique.ENRICHMENT]: undefined,
|
|
21
|
+
[categorization_1.WorkflowTechnique.FORM_INPUT]: new form_input_1.FormInputBestPractices(),
|
|
22
|
+
[categorization_1.WorkflowTechnique.KNOWLEDGE_BASE]: undefined,
|
|
23
|
+
[categorization_1.WorkflowTechnique.NOTIFICATION]: undefined,
|
|
24
|
+
[categorization_1.WorkflowTechnique.TRIAGE]: undefined,
|
|
25
|
+
[categorization_1.WorkflowTechnique.HUMAN_IN_THE_LOOP]: undefined,
|
|
26
|
+
[categorization_1.WorkflowTechnique.MONITORING]: undefined,
|
|
27
|
+
[categorization_1.WorkflowTechnique.SCHEDULING]: undefined,
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/best-practices/index.ts"],"names":[],"mappings":";;;AACA,2DAAuF;AAEvF,uCAAiD;AACjD,6DAAsE;AAEtE,uDAAgE;AAChE,+DAAwE;AACxE,+DAAwE;AAExE,6CAAsD;AAKtD,mEAA2E;AAI9D,QAAA,aAAa,GAAqE;IAC9F,CAAC,kCAAiB,CAAC,qBAAqB,CAAC,EAAE,IAAI,wDAAgC,EAAE;IACjF,CAAC,kCAAiB,CAAC,OAAO,CAAC,EAAE,IAAI,8BAAoB,EAAE;IACvD,CAAC,kCAAiB,CAAC,kBAAkB,CAAC,EAAE,IAAI,mDAA8B,EAAE;IAC5E,CAAC,kCAAiB,CAAC,aAAa,CAAC,EAAE,SAAS;IAC5C,CAAC,kCAAiB,CAAC,eAAe,CAAC,EAAE,IAAI,6CAA2B,EAAE;IACtE,CAAC,kCAAiB,CAAC,mBAAmB,CAAC,EAAE,IAAI,qDAA+B,EAAE;IAC9E,CAAC,kCAAiB,CAAC,mBAAmB,CAAC,EAAE,IAAI,qDAA+B,EAAE;IAC9E,CAAC,kCAAiB,CAAC,UAAU,CAAC,EAAE,SAAS;IACzC,CAAC,kCAAiB,CAAC,UAAU,CAAC,EAAE,IAAI,mCAAsB,EAAE;IAC5D,CAAC,kCAAiB,CAAC,cAAc,CAAC,EAAE,SAAS;IAC7C,CAAC,kCAAiB,CAAC,YAAY,CAAC,EAAE,SAAS;IAC3C,CAAC,kCAAiB,CAAC,MAAM,CAAC,EAAE,SAAS;IACrC,CAAC,kCAAiB,CAAC,iBAAiB,CAAC,EAAE,SAAS;IAChD,CAAC,kCAAiB,CAAC,UAAU,CAAC,EAAE,SAAS;IACzC,CAAC,kCAAiB,CAAC,UAAU,CAAC,EAAE,SAAS;CACzC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BestPracticesDocument } from '../../types/best-practices';
|
|
2
|
+
export declare class KnowledgeBaseBestPractices implements BestPracticesDocument {
|
|
3
|
+
readonly technique: "knowledge_base";
|
|
4
|
+
readonly version = "1.0.0";
|
|
5
|
+
private readonly documentation;
|
|
6
|
+
getDocumentation(): string;
|
|
7
|
+
}
|