@n8n/instance-ai 1.1.0 → 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/agent/instance-agent.js +17 -45
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/register-with-mastra.d.ts +1 -1
- package/dist/agent/register-with-mastra.js +5 -9
- package/dist/agent/register-with-mastra.js.map +1 -1
- package/dist/agent/sub-agent-briefing.d.ts +20 -0
- package/dist/agent/sub-agent-briefing.js +39 -0
- package/dist/agent/sub-agent-briefing.js.map +1 -0
- package/dist/agent/sub-agent-debriefing.d.ts +71 -0
- package/dist/agent/sub-agent-debriefing.js +39 -0
- package/dist/agent/sub-agent-debriefing.js.map +1 -0
- package/dist/agent/sub-agent-factory.d.ts +1 -1
- package/dist/agent/sub-agent-factory.js +15 -3
- package/dist/agent/sub-agent-factory.js.map +1 -1
- package/dist/agent/system-prompt.d.ts +1 -0
- package/dist/agent/system-prompt.js +67 -43
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/agent/tool-access.d.ts +2 -0
- package/dist/agent/tool-access.js +28 -0
- package/dist/agent/tool-access.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -1
- package/dist/domain-access/domain-gating.d.ts +1 -0
- package/dist/domain-access/domain-gating.js +3 -0
- package/dist/domain-access/domain-gating.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/memory/memory-config.js +1 -3
- package/dist/memory/memory-config.js.map +1 -1
- package/dist/parsers/structured-file-parser.d.ts +56 -0
- package/dist/parsers/structured-file-parser.js +354 -0
- package/dist/parsers/structured-file-parser.js.map +1 -0
- package/dist/planned-tasks/planned-task-service.js +6 -0
- package/dist/planned-tasks/planned-task-service.js.map +1 -1
- package/dist/runtime/background-task-manager.d.ts +2 -1
- package/dist/runtime/background-task-manager.js +13 -1
- package/dist/runtime/background-task-manager.js.map +1 -1
- package/dist/runtime/resumable-stream-executor.d.ts +6 -3
- package/dist/runtime/resumable-stream-executor.js +66 -119
- package/dist/runtime/resumable-stream-executor.js.map +1 -1
- package/dist/runtime/stream-runner.d.ts +2 -2
- package/dist/runtime/stream-runner.js +4 -25
- package/dist/runtime/stream-runner.js.map +1 -1
- package/dist/stream/consume-with-hitl.d.ts +4 -1
- package/dist/stream/consume-with-hitl.js +11 -2
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/stream/map-chunk.d.ts +1 -1
- package/dist/stream/map-chunk.js +20 -15
- package/dist/stream/map-chunk.js.map +1 -1
- package/dist/stream/work-summary-accumulator.d.ts +63 -0
- package/dist/stream/work-summary-accumulator.js +66 -0
- package/dist/stream/work-summary-accumulator.js.map +1 -0
- package/dist/tools/attachments/parse-file.tool.d.ts +90 -0
- package/dist/tools/attachments/parse-file.tool.js +135 -0
- package/dist/tools/attachments/parse-file.tool.js.map +1 -0
- package/dist/tools/best-practices/get-best-practices.tool.d.ts +6 -9
- package/dist/tools/best-practices/get-best-practices.tool.js +7 -5
- package/dist/tools/best-practices/get-best-practices.tool.js.map +1 -1
- package/dist/tools/best-practices/index.js +5 -29
- package/dist/tools/best-practices/index.js.map +1 -1
- package/dist/tools/best-practices/techniques.d.ts +1 -20
- package/dist/tools/best-practices/techniques.js +3 -36
- package/dist/tools/best-practices/techniques.js.map +1 -1
- package/dist/tools/credentials/delete-credential.tool.d.ts +13 -14
- package/dist/tools/credentials/delete-credential.tool.js +18 -11
- package/dist/tools/credentials/delete-credential.tool.js.map +1 -1
- package/dist/tools/credentials/get-credential.tool.d.ts +8 -2
- package/dist/tools/credentials/get-credential.tool.js +13 -7
- package/dist/tools/credentials/get-credential.tool.js.map +1 -1
- package/dist/tools/credentials/list-credentials.tool.d.ts +13 -3
- package/dist/tools/credentials/list-credentials.tool.js +50 -8
- package/dist/tools/credentials/list-credentials.tool.js.map +1 -1
- package/dist/tools/credentials/search-credential-types.tool.d.ts +7 -3
- package/dist/tools/credentials/search-credential-types.tool.js +7 -5
- package/dist/tools/credentials/search-credential-types.tool.js.map +1 -1
- package/dist/tools/credentials/setup-credentials.tool.d.ts +40 -44
- package/dist/tools/credentials/setup-credentials.tool.js +37 -31
- package/dist/tools/credentials/setup-credentials.tool.js.map +1 -1
- package/dist/tools/credentials/test-credential.tool.d.ts +7 -4
- package/dist/tools/credentials/test-credential.tool.js +5 -3
- package/dist/tools/credentials/test-credential.tool.js.map +1 -1
- package/dist/tools/data-tables/add-data-table-column.tool.d.ts +15 -19
- package/dist/tools/data-tables/add-data-table-column.tool.js +16 -9
- package/dist/tools/data-tables/add-data-table-column.tool.js.map +1 -1
- package/dist/tools/data-tables/create-data-table.tool.d.ts +26 -24
- package/dist/tools/data-tables/create-data-table.tool.js +49 -22
- package/dist/tools/data-tables/create-data-table.tool.js.map +1 -1
- package/dist/tools/data-tables/delete-data-table-column.tool.d.ts +13 -14
- package/dist/tools/data-tables/delete-data-table-column.tool.js +15 -8
- package/dist/tools/data-tables/delete-data-table-column.tool.js.map +1 -1
- package/dist/tools/data-tables/delete-data-table-rows.tool.d.ts +49 -15
- package/dist/tools/data-tables/delete-data-table-rows.tool.js +25 -9
- package/dist/tools/data-tables/delete-data-table-rows.tool.js.map +1 -1
- package/dist/tools/data-tables/delete-data-table.tool.d.ts +11 -14
- package/dist/tools/data-tables/delete-data-table.tool.js +17 -9
- package/dist/tools/data-tables/delete-data-table.tool.js.map +1 -1
- package/dist/tools/data-tables/get-data-table-schema.tool.d.ts +7 -8
- package/dist/tools/data-tables/get-data-table-schema.tool.js +5 -3
- package/dist/tools/data-tables/get-data-table-schema.tool.js.map +1 -1
- package/dist/tools/data-tables/insert-data-table-rows.tool.d.ts +14 -15
- package/dist/tools/data-tables/insert-data-table-rows.tool.js +22 -12
- package/dist/tools/data-tables/insert-data-table-rows.tool.js.map +1 -1
- package/dist/tools/data-tables/list-data-tables.tool.d.ts +7 -3
- package/dist/tools/data-tables/list-data-tables.tool.js +8 -6
- package/dist/tools/data-tables/list-data-tables.tool.js.map +1 -1
- package/dist/tools/data-tables/query-data-table-rows.tool.d.ts +49 -8
- package/dist/tools/data-tables/query-data-table-rows.tool.js +14 -12
- package/dist/tools/data-tables/query-data-table-rows.tool.js.map +1 -1
- package/dist/tools/data-tables/rename-data-table-column.tool.d.ts +15 -14
- package/dist/tools/data-tables/rename-data-table-column.tool.js +16 -9
- package/dist/tools/data-tables/rename-data-table-column.tool.js.map +1 -1
- package/dist/tools/data-tables/update-data-table-rows.tool.d.ts +51 -14
- package/dist/tools/data-tables/update-data-table-rows.tool.js +19 -9
- package/dist/tools/data-tables/update-data-table-rows.tool.js.map +1 -1
- package/dist/tools/executions/debug-execution.tool.d.ts +8 -2
- package/dist/tools/executions/debug-execution.tool.js +5 -3
- package/dist/tools/executions/debug-execution.tool.js.map +1 -1
- package/dist/tools/executions/get-execution.tool.d.ts +8 -2
- package/dist/tools/executions/get-execution.tool.js +5 -3
- package/dist/tools/executions/get-execution.tool.js.map +1 -1
- package/dist/tools/executions/get-node-output.tool.d.ts +14 -2
- package/dist/tools/executions/get-node-output.tool.js +14 -17
- package/dist/tools/executions/get-node-output.tool.js.map +1 -1
- package/dist/tools/executions/list-executions.tool.d.ts +11 -3
- package/dist/tools/executions/list-executions.tool.js +16 -14
- package/dist/tools/executions/list-executions.tool.js.map +1 -1
- package/dist/tools/executions/run-workflow.tool.d.ts +17 -15
- package/dist/tools/executions/run-workflow.tool.js +35 -25
- package/dist/tools/executions/run-workflow.tool.js.map +1 -1
- package/dist/tools/executions/stop-execution.tool.d.ts +7 -4
- package/dist/tools/executions/stop-execution.tool.js +8 -3
- package/dist/tools/executions/stop-execution.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +2 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.d.ts +67 -2380
- package/dist/tools/index.js +9 -15
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nodes/explore-node-resources.tool.d.ts +23 -10
- package/dist/tools/nodes/explore-node-resources.tool.js +27 -25
- package/dist/tools/nodes/explore-node-resources.tool.js.map +1 -1
- package/dist/tools/nodes/get-node-description.tool.d.ts +7 -20
- package/dist/tools/nodes/get-node-description.tool.js +5 -3
- package/dist/tools/nodes/get-node-description.tool.js.map +1 -1
- package/dist/tools/nodes/get-node-type-definition.tool.d.ts +29 -6
- package/dist/tools/nodes/get-node-type-definition.tool.js +9 -7
- package/dist/tools/nodes/get-node-type-definition.tool.js.map +1 -1
- package/dist/tools/nodes/get-suggested-nodes.tool.d.ts +7 -12
- package/dist/tools/nodes/get-suggested-nodes.tool.js +9 -7
- package/dist/tools/nodes/get-suggested-nodes.tool.js.map +1 -1
- package/dist/tools/nodes/list-nodes.tool.d.ts +7 -3
- package/dist/tools/nodes/list-nodes.tool.js +8 -6
- package/dist/tools/nodes/list-nodes.tool.js.map +1 -1
- package/dist/tools/nodes/node-search-engine.d.ts +1 -0
- package/dist/tools/nodes/node-search-engine.js +12 -9
- package/dist/tools/nodes/node-search-engine.js.map +1 -1
- package/dist/tools/nodes/search-nodes.tool.d.ts +12 -24
- package/dist/tools/nodes/search-nodes.tool.js +21 -17
- package/dist/tools/nodes/search-nodes.tool.js.map +1 -1
- package/dist/tools/orchestration/add-plan-item.tool.d.ts +5 -0
- package/dist/tools/orchestration/add-plan-item.tool.js +91 -0
- package/dist/tools/orchestration/add-plan-item.tool.js.map +1 -0
- package/dist/tools/orchestration/blueprint-accumulator.d.ts +50 -0
- package/dist/tools/orchestration/blueprint-accumulator.js +215 -0
- package/dist/tools/orchestration/blueprint-accumulator.js.map +1 -0
- package/dist/tools/orchestration/blueprint.schema.d.ts +271 -0
- package/dist/tools/orchestration/blueprint.schema.js +61 -0
- package/dist/tools/orchestration/blueprint.schema.js.map +1 -0
- package/dist/tools/orchestration/browser-credential-setup.tool.d.ts +15 -12
- package/dist/tools/orchestration/browser-credential-setup.tool.js +26 -21
- package/dist/tools/orchestration/browser-credential-setup.tool.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.d.ts +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.js +43 -149
- package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +11 -4
- package/dist/tools/orchestration/build-workflow-agent.tool.js +50 -82
- package/dist/tools/orchestration/build-workflow-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/cancel-background-task.tool.d.ts +7 -3
- package/dist/tools/orchestration/cancel-background-task.tool.js +5 -3
- package/dist/tools/orchestration/cancel-background-task.tool.js.map +1 -1
- package/dist/tools/orchestration/correct-background-task.tool.d.ts +9 -3
- package/dist/tools/orchestration/correct-background-task.tool.js +8 -6
- package/dist/tools/orchestration/correct-background-task.tool.js.map +1 -1
- package/dist/tools/orchestration/data-table-agent.prompt.d.ts +1 -1
- package/dist/tools/orchestration/data-table-agent.prompt.js +20 -0
- package/dist/tools/orchestration/data-table-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/data-table-agent.tool.d.ts +9 -4
- package/dist/tools/orchestration/data-table-agent.tool.js +22 -25
- package/dist/tools/orchestration/data-table-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/delegate.schemas.d.ts +12 -0
- package/dist/tools/orchestration/delegate.schemas.js +17 -0
- package/dist/tools/orchestration/delegate.schemas.js.map +1 -1
- package/dist/tools/orchestration/delegate.tool.d.ts +1 -10
- package/dist/tools/orchestration/delegate.tool.js +40 -41
- package/dist/tools/orchestration/delegate.tool.js.map +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.d.ts +1 -0
- package/dist/tools/orchestration/plan-agent-prompt.js +76 -0
- package/dist/tools/orchestration/plan-agent-prompt.js.map +1 -0
- package/dist/tools/orchestration/plan-with-agent.tool.d.ts +2 -0
- package/dist/tools/orchestration/plan-with-agent.tool.js +277 -0
- package/dist/tools/orchestration/plan-with-agent.tool.js.map +1 -0
- package/dist/tools/orchestration/plan.tool.d.ts +7 -39
- package/dist/tools/orchestration/plan.tool.js +15 -13
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +23 -3
- package/dist/tools/orchestration/report-verification-verdict.tool.js +27 -28
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/research-with-agent.tool.d.ts +11 -4
- package/dist/tools/orchestration/research-with-agent.tool.js +25 -21
- package/dist/tools/orchestration/research-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/submit-plan.tool.d.ts +3 -0
- package/dist/tools/orchestration/submit-plan.tool.js +81 -0
- package/dist/tools/orchestration/submit-plan.tool.js.map +1 -0
- package/dist/tools/orchestration/update-tasks.tool.d.ts +1 -9
- package/dist/tools/orchestration/update-tasks.tool.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +13 -7
- package/dist/tools/orchestration/verify-built-workflow.tool.js +14 -15
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/shared/ask-user.tool.d.ts +42 -31
- package/dist/tools/shared/ask-user.tool.js +16 -15
- package/dist/tools/shared/ask-user.tool.js.map +1 -1
- package/dist/tools/templates/search-template-parameters.tool.d.ts +14 -7
- package/dist/tools/templates/search-template-parameters.tool.js +17 -15
- package/dist/tools/templates/search-template-parameters.tool.js.map +1 -1
- package/dist/tools/templates/search-template-structures.tool.d.ts +11 -8
- package/dist/tools/templates/search-template-structures.tool.js +13 -11
- package/dist/tools/templates/search-template-structures.tool.js.map +1 -1
- package/dist/tools/web-research/fetch-url.tool.d.ts +9 -23
- package/dist/tools/web-research/fetch-url.tool.js +30 -14
- package/dist/tools/web-research/fetch-url.tool.js.map +1 -1
- package/dist/tools/web-research/web-search.tool.d.ts +12 -2
- package/dist/tools/web-research/web-search.tool.js +20 -18
- package/dist/tools/web-research/web-search.tool.js.map +1 -1
- package/dist/tools/workflows/apply-workflow-credentials.tool.d.ts +11 -5
- package/dist/tools/workflows/apply-workflow-credentials.tool.js +7 -5
- package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.d.ts +26 -5
- package/dist/tools/workflows/build-workflow.tool.js +23 -20
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/delete-workflow.tool.d.ts +13 -14
- package/dist/tools/workflows/delete-workflow.tool.js +15 -11
- package/dist/tools/workflows/delete-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/get-workflow-as-code.tool.d.ts +6 -10
- package/dist/tools/workflows/get-workflow-as-code.tool.js +5 -3
- package/dist/tools/workflows/get-workflow-as-code.tool.js.map +1 -1
- package/dist/tools/workflows/get-workflow-version.tool.d.ts +8 -16
- package/dist/tools/workflows/get-workflow-version.tool.js +6 -4
- package/dist/tools/workflows/get-workflow-version.tool.js.map +1 -1
- package/dist/tools/workflows/get-workflow.tool.d.ts +7 -15
- package/dist/tools/workflows/get-workflow.tool.js +5 -3
- package/dist/tools/workflows/get-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/list-workflow-versions.tool.d.ts +11 -3
- package/dist/tools/workflows/list-workflow-versions.tool.js +13 -11
- package/dist/tools/workflows/list-workflow-versions.tool.js.map +1 -1
- package/dist/tools/workflows/list-workflows.tool.d.ts +9 -10
- package/dist/tools/workflows/list-workflows.tool.js +12 -10
- package/dist/tools/workflows/list-workflows.tool.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.d.ts +29 -11
- package/dist/tools/workflows/materialize-node-type.tool.js +9 -7
- package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
- package/dist/tools/workflows/publish-workflow.tool.d.ts +6 -20
- package/dist/tools/workflows/publish-workflow.tool.js +29 -24
- package/dist/tools/workflows/publish-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/restore-workflow-version.tool.d.ts +13 -15
- package/dist/tools/workflows/restore-workflow-version.tool.js +15 -8
- package/dist/tools/workflows/restore-workflow-version.tool.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.service.d.ts +0 -1
- package/dist/tools/workflows/setup-workflow.service.js +23 -6
- package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.tool.d.ts +7 -144
- package/dist/tools/workflows/setup-workflow.tool.js +10 -14
- package/dist/tools/workflows/setup-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/submit-workflow.tool.d.ts +12 -9
- package/dist/tools/workflows/submit-workflow.tool.js +15 -17
- package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/unpublish-workflow.tool.d.ts +13 -15
- package/dist/tools/workflows/unpublish-workflow.tool.js +15 -11
- package/dist/tools/workflows/unpublish-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/update-workflow-version.tool.d.ts +13 -3
- package/dist/tools/workflows/update-workflow-version.tool.js +12 -10
- package/dist/tools/workflows/update-workflow-version.tool.js.map +1 -1
- package/dist/tools/workflows/write-sandbox-file.tool.d.ts +9 -9
- package/dist/tools/workflows/write-sandbox-file.tool.js +8 -6
- package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
- package/dist/tools/workspace/cleanup-test-executions.tool.d.ts +15 -14
- package/dist/tools/workspace/cleanup-test-executions.tool.js +19 -15
- package/dist/tools/workspace/cleanup-test-executions.tool.js.map +1 -1
- package/dist/tools/workspace/create-folder.tool.d.ts +15 -16
- package/dist/tools/workspace/create-folder.tool.js +25 -12
- package/dist/tools/workspace/create-folder.tool.js.map +1 -1
- package/dist/tools/workspace/delete-folder.tool.d.ts +19 -14
- package/dist/tools/workspace/delete-folder.tool.js +24 -17
- package/dist/tools/workspace/delete-folder.tool.js.map +1 -1
- package/dist/tools/workspace/list-folders.tool.d.ts +7 -3
- package/dist/tools/workspace/list-folders.tool.js +5 -3
- package/dist/tools/workspace/list-folders.tool.js.map +1 -1
- package/dist/tools/workspace/list-projects.tool.d.ts +3 -3
- package/dist/tools/workspace/list-projects.tool.js +3 -1
- package/dist/tools/workspace/list-projects.tool.js.map +1 -1
- package/dist/tools/workspace/list-tags.tool.d.ts +3 -6
- package/dist/tools/workspace/list-tags.tool.js +3 -1
- package/dist/tools/workspace/list-tags.tool.js.map +1 -1
- package/dist/tools/workspace/move-workflow-to-folder.tool.d.ts +17 -14
- package/dist/tools/workspace/move-workflow-to-folder.tool.js +20 -16
- package/dist/tools/workspace/move-workflow-to-folder.tool.js.map +1 -1
- package/dist/tools/workspace/tag-workflow.tool.d.ts +15 -14
- package/dist/tools/workspace/tag-workflow.tool.js +16 -12
- package/dist/tools/workspace/tag-workflow.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +1 -0
- package/dist/tracing/langsmith-tracing.js +47 -57
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/types.d.ts +24 -50
- package/dist/utils/eval-agents.d.ts +10 -0
- package/dist/utils/eval-agents.js +54 -0
- package/dist/utils/eval-agents.js.map +1 -0
- package/dist/workflow-builder/sdk-prompt-sections.d.ts +1 -4
- package/dist/workflow-builder/sdk-prompt-sections.js +5 -513
- package/dist/workflow-builder/sdk-prompt-sections.js.map +1 -1
- package/dist/workflow-loop/guidance.js +3 -5
- package/dist/workflow-loop/guidance.js.map +1 -1
- package/dist/workspace/daytona-filesystem.js +15 -1
- package/dist/workspace/daytona-filesystem.js.map +1 -1
- package/package.json +15 -9
- package/dist/memory/working-memory-template.d.ts +0 -1
- package/dist/memory/working-memory-template.js +0 -25
- package/dist/memory/working-memory-template.js.map +0 -1
- package/dist/runtime/working-memory-tracing.d.ts +0 -19
- package/dist/runtime/working-memory-tracing.js +0 -111
- package/dist/runtime/working-memory-tracing.js.map +0 -1
- package/dist/tools/best-practices/guides/chatbot.d.ts +0 -1
- package/dist/tools/best-practices/guides/chatbot.js +0 -111
- package/dist/tools/best-practices/guides/chatbot.js.map +0 -1
- package/dist/tools/best-practices/guides/content-generation.d.ts +0 -1
- package/dist/tools/best-practices/guides/content-generation.js +0 -108
- package/dist/tools/best-practices/guides/content-generation.js.map +0 -1
- package/dist/tools/best-practices/guides/data-extraction.d.ts +0 -1
- package/dist/tools/best-practices/guides/data-extraction.js +0 -115
- package/dist/tools/best-practices/guides/data-extraction.js.map +0 -1
- package/dist/tools/best-practices/guides/data-persistence.d.ts +0 -1
- package/dist/tools/best-practices/guides/data-persistence.js +0 -198
- package/dist/tools/best-practices/guides/data-persistence.js.map +0 -1
- package/dist/tools/best-practices/guides/data-transformation.d.ts +0 -1
- package/dist/tools/best-practices/guides/data-transformation.js +0 -139
- package/dist/tools/best-practices/guides/data-transformation.js.map +0 -1
- package/dist/tools/best-practices/guides/document-processing.d.ts +0 -1
- package/dist/tools/best-practices/guides/document-processing.js +0 -326
- package/dist/tools/best-practices/guides/document-processing.js.map +0 -1
- package/dist/tools/best-practices/guides/form-input.d.ts +0 -1
- package/dist/tools/best-practices/guides/form-input.js +0 -166
- package/dist/tools/best-practices/guides/form-input.js.map +0 -1
- package/dist/tools/best-practices/guides/notification.d.ts +0 -1
- package/dist/tools/best-practices/guides/notification.js +0 -128
- package/dist/tools/best-practices/guides/notification.js.map +0 -1
- package/dist/tools/best-practices/guides/scheduling.d.ts +0 -1
- package/dist/tools/best-practices/guides/scheduling.js +0 -145
- package/dist/tools/best-practices/guides/scheduling.js.map +0 -1
- package/dist/tools/best-practices/guides/scraping-and-research.d.ts +0 -1
- package/dist/tools/best-practices/guides/scraping-and-research.js +0 -151
- package/dist/tools/best-practices/guides/scraping-and-research.js.map +0 -1
- package/dist/tools/best-practices/guides/triage.d.ts +0 -1
- package/dist/tools/best-practices/guides/triage.js +0 -142
- package/dist/tools/best-practices/guides/triage.js.map +0 -1
- package/dist/tools/filesystem/get-file-tree.tool.d.ts +0 -22
- package/dist/tools/filesystem/get-file-tree.tool.js +0 -64
- package/dist/tools/filesystem/get-file-tree.tool.js.map +0 -1
- package/dist/tools/filesystem/list-files.tool.d.ts +0 -30
- package/dist/tools/filesystem/list-files.tool.js +0 -100
- package/dist/tools/filesystem/list-files.tool.js.map +0 -1
- package/dist/tools/filesystem/read-file.tool.d.ts +0 -25
- package/dist/tools/filesystem/read-file.tool.js +0 -83
- package/dist/tools/filesystem/read-file.tool.js.map +0 -1
- package/dist/tools/filesystem/search-files.tool.d.ts +0 -31
- package/dist/tools/filesystem/search-files.tool.js +0 -96
- package/dist/tools/filesystem/search-files.tool.js.map +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WORKING_MEMORY_TEMPLATE = void 0;
|
|
4
|
-
exports.WORKING_MEMORY_TEMPLATE = `
|
|
5
|
-
# User Context
|
|
6
|
-
- **Name**:
|
|
7
|
-
- **Role**:
|
|
8
|
-
- **Organization**:
|
|
9
|
-
|
|
10
|
-
# Workflow Preferences
|
|
11
|
-
- **Preferred trigger types**:
|
|
12
|
-
- **Common integrations used**:
|
|
13
|
-
- **Workflow naming conventions**:
|
|
14
|
-
- **Error handling patterns**:
|
|
15
|
-
|
|
16
|
-
# Active Project
|
|
17
|
-
<!-- Keep only the ONE project the user is currently working on. Replace when the user switches projects. -->
|
|
18
|
-
- **Project**:
|
|
19
|
-
- **Status**:
|
|
20
|
-
- **Key details**:
|
|
21
|
-
|
|
22
|
-
# Known Issues
|
|
23
|
-
<!-- Only unresolved issues. Remove when fixed. -->
|
|
24
|
-
`;
|
|
25
|
-
//# sourceMappingURL=working-memory-template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"working-memory-template.js","sourceRoot":"","sources":["../../src/memory/working-memory-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBtC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface StreamHandleLike {
|
|
2
|
-
runId?: string;
|
|
3
|
-
text?: Promise<string>;
|
|
4
|
-
steps?: Promise<unknown[]>;
|
|
5
|
-
usage?: Promise<unknown>;
|
|
6
|
-
totalUsage?: Promise<unknown>;
|
|
7
|
-
}
|
|
8
|
-
interface WorkingMemoryContextTraceOptions {
|
|
9
|
-
phase: 'initial' | 'resume';
|
|
10
|
-
agentId: string;
|
|
11
|
-
threadId: string;
|
|
12
|
-
agentRole?: string;
|
|
13
|
-
input?: unknown;
|
|
14
|
-
memory?: unknown;
|
|
15
|
-
resumeData?: unknown;
|
|
16
|
-
enabled?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function traceWorkingMemoryContext<T extends StreamHandleLike>(options: WorkingMemoryContextTraceOptions, fn: () => Promise<T>): Promise<T>;
|
|
19
|
-
export {};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.traceWorkingMemoryContext = traceWorkingMemoryContext;
|
|
4
|
-
const langsmith_tracing_1 = require("../tracing/langsmith-tracing");
|
|
5
|
-
const stream_helpers_1 = require("../utils/stream-helpers");
|
|
6
|
-
function countLines(value) {
|
|
7
|
-
return value === '' ? 0 : value.split(/\r?\n/u).length;
|
|
8
|
-
}
|
|
9
|
-
function getWorkingMemoryBinding(memory) {
|
|
10
|
-
if (!(0, stream_helpers_1.isRecord)(memory)) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
const resourceId = typeof memory.resource === 'string' ? memory.resource : undefined;
|
|
14
|
-
const threadId = typeof memory.thread === 'string' ? memory.thread : undefined;
|
|
15
|
-
if (!resourceId && !threadId) {
|
|
16
|
-
return undefined;
|
|
17
|
-
}
|
|
18
|
-
return {
|
|
19
|
-
...(resourceId ? { resourceId } : {}),
|
|
20
|
-
...(threadId ? { threadId } : {}),
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function getWorkingMemoryRole(resourceId) {
|
|
24
|
-
if (!resourceId) {
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
const separatorIndex = resourceId.indexOf(':');
|
|
28
|
-
if (separatorIndex === -1 || separatorIndex === resourceId.length - 1) {
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
return resourceId.slice(separatorIndex + 1);
|
|
32
|
-
}
|
|
33
|
-
function summarizeInput(value) {
|
|
34
|
-
if (typeof value === 'string') {
|
|
35
|
-
return {
|
|
36
|
-
input_type: 'text',
|
|
37
|
-
input_chars: value.length,
|
|
38
|
-
input_lines: countLines(value),
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
if (Array.isArray(value)) {
|
|
42
|
-
return {
|
|
43
|
-
input_type: 'array',
|
|
44
|
-
input_items: value.length,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
if ((0, stream_helpers_1.isRecord)(value)) {
|
|
48
|
-
return {
|
|
49
|
-
input_type: 'object',
|
|
50
|
-
input_keys: Object.keys(value).length,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
if (value === undefined) {
|
|
54
|
-
return {};
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
input_type: typeof value,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function summarizeResumeData(resumeData) {
|
|
61
|
-
if (!(0, stream_helpers_1.isRecord)(resumeData)) {
|
|
62
|
-
return {};
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
...(typeof resumeData.requestId === 'string' ? { request_id: resumeData.requestId } : {}),
|
|
66
|
-
...(typeof resumeData.toolCallId === 'string' ? { tool_call_id: resumeData.toolCallId } : {}),
|
|
67
|
-
...(typeof resumeData.runId === 'string' ? { mastra_run_id: resumeData.runId } : {}),
|
|
68
|
-
resume_payload_keys: Object.keys(resumeData).length,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function summarizeStreamHandle(stream) {
|
|
72
|
-
return {
|
|
73
|
-
status: 'stream_ready',
|
|
74
|
-
...(typeof stream.runId === 'string' && stream.runId.length > 0
|
|
75
|
-
? { mastra_run_id: stream.runId }
|
|
76
|
-
: {}),
|
|
77
|
-
has_text: stream.text !== undefined,
|
|
78
|
-
has_steps: stream.steps !== undefined,
|
|
79
|
-
has_usage: stream.usage !== undefined || stream.totalUsage !== undefined,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
async function traceWorkingMemoryContext(options, fn) {
|
|
83
|
-
const binding = getWorkingMemoryBinding(options.memory);
|
|
84
|
-
const shouldTrace = options.enabled ?? Boolean(binding);
|
|
85
|
-
if (!shouldTrace) {
|
|
86
|
-
return await fn();
|
|
87
|
-
}
|
|
88
|
-
return await (0, langsmith_tracing_1.withCurrentTraceSpan)({
|
|
89
|
-
name: 'prepare_context',
|
|
90
|
-
tags: ['memory', 'prompt', 'internal'],
|
|
91
|
-
metadata: {
|
|
92
|
-
agent_id: options.agentId,
|
|
93
|
-
...(options.agentRole ? { agent_role: options.agentRole } : {}),
|
|
94
|
-
phase: options.phase,
|
|
95
|
-
memory_enabled: true,
|
|
96
|
-
prepare_context: 'working_memory',
|
|
97
|
-
...(binding?.resourceId ? { resource_id: binding.resourceId } : {}),
|
|
98
|
-
...(binding?.threadId ? { memory_thread_id: binding.threadId } : {}),
|
|
99
|
-
...(getWorkingMemoryRole(binding?.resourceId)
|
|
100
|
-
? { memory_role: getWorkingMemoryRole(binding?.resourceId) }
|
|
101
|
-
: {}),
|
|
102
|
-
},
|
|
103
|
-
inputs: {
|
|
104
|
-
thread_id: options.threadId,
|
|
105
|
-
...summarizeInput(options.input),
|
|
106
|
-
...summarizeResumeData(options.resumeData),
|
|
107
|
-
},
|
|
108
|
-
processOutputs: summarizeStreamHandle,
|
|
109
|
-
}, fn);
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=working-memory-tracing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"working-memory-tracing.js","sourceRoot":"","sources":["../../src/runtime/working-memory-tracing.ts"],"names":[],"mappings":";;AAuHA,8DAmCC;AA1JD,oEAAoE;AACpE,4DAAmD;AA0BnD,SAAS,UAAU,CAAC,KAAa;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AAI;YACpB,eAAe,EAAE,gBAAgB;YACjC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnE,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,GAAG,CAAC,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC;gBAC5C,CAAC,CAAC,EAAE,WAAW,EAAE,oBAAoB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;gBAC5D,CAAC,CAAC,EAAE,CAAC;SACN;QACD,MAAM,EAAE;YACP,SAAS,EAAE,OAAO,CAAC,QAAQ;YAC3B,GAAG,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC;YAChC,GAAG,mBAAmB,CAAC,OAAO,CAAC,UAAU,CAAC;SAC1C;QACD,cAAc,EAAE,qBAAqB;KACrC,EACD,EAAE,CACF,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getDocumentation(): string;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDocumentation = getDocumentation;
|
|
4
|
-
function getDocumentation() {
|
|
5
|
-
return `# Best Practices: Chatbot Workflows
|
|
6
|
-
|
|
7
|
-
## Workflow Design
|
|
8
|
-
|
|
9
|
-
Break chatbot logic into manageable steps and use error handling nodes (IF, Switch) with fallback mechanisms to manage unexpected inputs.
|
|
10
|
-
|
|
11
|
-
Most chatbots run through external platforms like Slack, Telegram, or WhatsApp rather than through the n8n chat interface - if the user requests a service like this don't use the built in chat interface nodes. But, the n8n chat node is easier to get started with tests. If the user mentions chatting but does not mention a service then use the built in n8n chat node.
|
|
12
|
-
|
|
13
|
-
CRITICAL: The user may ask to be able to chat to a workflow as well as trigger it via some other method, for example scheduling information gathering but also being able to chat with the agent - in scenarios like this the two separate workflows MUST be connected through shared memory, vector stores, data storage, or direct connections.
|
|
14
|
-
|
|
15
|
-
Example pattern:
|
|
16
|
-
- Schedule Trigger -> News Gathering Agent -> [memory node via ai_memory]
|
|
17
|
-
- Chat Trigger -> Chatbot Agent -> [SAME memory node via ai_memory]
|
|
18
|
-
- Result: Both agents share conversation/context history, enabling the chatbot to discuss gathered news
|
|
19
|
-
|
|
20
|
-
For the chatbot always use the same chat node type as used for response. If Telegram has been requested trigger the chatbot via telegram AND
|
|
21
|
-
respond via telegram - do not mix chatbot interfaces.
|
|
22
|
-
|
|
23
|
-
## Context & Memory Management
|
|
24
|
-
|
|
25
|
-
Always utilise memory in chatbot agent nodes - providing context gives you full conversation history and more control over context.
|
|
26
|
-
Memory nodes enable the bot to handle follow-up questions by maintaining short-term conversation history.
|
|
27
|
-
|
|
28
|
-
Include information with the user prompt such as timestamp, user ID, or session metadata. This enriches context without relying solely on memory and user prompt.
|
|
29
|
-
|
|
30
|
-
If there are other agents involved in the workflow you should share memory between the chatbot and those other agents where it makes sense.
|
|
31
|
-
Connect the same memory node to multiple agents to enable data sharing and context continuity.
|
|
32
|
-
|
|
33
|
-
## Context Engineering & AI Agent Output
|
|
34
|
-
|
|
35
|
-
It can be beneficial to respond to the user as a tool of the chatbot agent rather than using the agent output - this allows the agent to loop/carry out multiple responses if necessary.
|
|
36
|
-
This will require adding a note to the system prompt for the agent to tell it to use the tool to respond to the user.
|
|
37
|
-
|
|
38
|
-
## Message Attribution
|
|
39
|
-
|
|
40
|
-
n8n chatbots often attach the attribution "n8n workflow" to messages by default - you must disable this setting which will
|
|
41
|
-
often be called "Append n8n Attribution" for nodes that support it, add this setting and set it to false.
|
|
42
|
-
|
|
43
|
-
## Recommended Nodes
|
|
44
|
-
|
|
45
|
-
### Chat Trigger (@n8n/n8n-nodes-langchain.chatTrigger)
|
|
46
|
-
|
|
47
|
-
Purpose: Entry point for user messages in n8n-hosted chat interfaces
|
|
48
|
-
|
|
49
|
-
Pitfalls:
|
|
50
|
-
|
|
51
|
-
- Most production chatbots use external platforms (Slack, Telegram) rather than n8n's chat interface
|
|
52
|
-
|
|
53
|
-
### AI Agent (@n8n/n8n-nodes-langchain.agent)
|
|
54
|
-
|
|
55
|
-
Purpose: Orchestrates logic, tool use, and LLM calls for intelligent responses.
|
|
56
|
-
|
|
57
|
-
Unless user asks for a node by name, always use the AI Agent node over provider-specific nodes (like OpenAI, Google Gemini) or use-case-specific AI nodes (like Message a model) for chatbot workflows. The AI Agent node provides better orchestration, tool integration, and memory management capabilities essential for conversational interfaces.
|
|
58
|
-
For example, for "create a chatbot using OpenAI", implement: AI Agent -- OpenAI Chat Model.
|
|
59
|
-
|
|
60
|
-
### Chat Model Nodes
|
|
61
|
-
|
|
62
|
-
- OpenAI Chat Model (@n8n/n8n-nodes-langchain.lmChatOpenAi)
|
|
63
|
-
- Google Gemini Chat Model (@n8n/n8n-nodes-langchain.lmChatGoogleGemini)
|
|
64
|
-
- xAI Grok Chat Model (@n8n/n8n-nodes-langchain.lmChatXAiGrok)
|
|
65
|
-
- DeepSeek Chat Model (@n8n/n8n-nodes-langchain.lmChatDeepSeek)
|
|
66
|
-
|
|
67
|
-
Purpose: Connect to LLMs for natural, context-aware responses
|
|
68
|
-
|
|
69
|
-
### Simple Memory (@n8n/n8n-nodes-langchain.memoryBufferWindow)
|
|
70
|
-
|
|
71
|
-
Purpose: Maintains short-term conversation history for context continuity
|
|
72
|
-
|
|
73
|
-
### HTTP Request (n8n-nodes-base.httpRequest)
|
|
74
|
-
|
|
75
|
-
Purpose: Fetches external data to enrich chatbot responses with real-time or organizational information
|
|
76
|
-
|
|
77
|
-
### Database Nodes & Google Sheets
|
|
78
|
-
|
|
79
|
-
- Data Table (n8n-nodes-base.dataTable)
|
|
80
|
-
- Postgres (n8n-nodes-base.postgres)
|
|
81
|
-
- MySQL (n8n-nodes-base.mySql)
|
|
82
|
-
- MongoDB (n8n-nodes-base.mongoDb)
|
|
83
|
-
- Google Sheets (n8n-nodes-base.googleSheets)
|
|
84
|
-
|
|
85
|
-
Purpose: Store conversation logs, retrieve structured data, or maintain user preferences
|
|
86
|
-
|
|
87
|
-
### IF / Switch
|
|
88
|
-
|
|
89
|
-
- If (n8n-nodes-base.if)
|
|
90
|
-
- Switch (n8n-nodes-base.switch)
|
|
91
|
-
|
|
92
|
-
Purpose: Conditional logic and error handling for routing messages or managing conversation state
|
|
93
|
-
|
|
94
|
-
### Integration Nodes
|
|
95
|
-
|
|
96
|
-
- Slack (n8n-nodes-base.slack)
|
|
97
|
-
- Telegram (n8n-nodes-base.telegram)
|
|
98
|
-
- WhatsApp Business Cloud (n8n-nodes-base.whatsApp)
|
|
99
|
-
- Discord (n8n-nodes-base.discord)
|
|
100
|
-
|
|
101
|
-
Purpose: Multi-channel support for deploying chatbots on popular messaging platforms
|
|
102
|
-
|
|
103
|
-
## Common Pitfalls to Avoid
|
|
104
|
-
|
|
105
|
-
### Leaving Chatbot Disconnected
|
|
106
|
-
|
|
107
|
-
When a workflow has multiple triggers (e.g., scheduled data collection + chatbot interaction), the chatbot MUST have access to the data
|
|
108
|
-
generated by the workflow. Connect the chatbot through shared memory, vector stores, data storage, or direct data flow connections.
|
|
109
|
-
`;
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=chatbot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/chatbot.ts"],"names":[],"mappings":";;AAAA,4CA0GC;AA1GD,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGP,CAAC;AACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getDocumentation(): string;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDocumentation = getDocumentation;
|
|
4
|
-
function getDocumentation() {
|
|
5
|
-
return `# Best Practices: Content Generation Workflows
|
|
6
|
-
|
|
7
|
-
## Workflow Design
|
|
8
|
-
|
|
9
|
-
Break complex tasks into sequential steps (e.g., generate text, create image, compose video) for modularity and easier troubleshooting.
|
|
10
|
-
|
|
11
|
-
## Node Selection Guidelines
|
|
12
|
-
|
|
13
|
-
Always prefer built-in n8n nodes over HTTP Request nodes when a dedicated node exists for the service or API you need to integrate with. Built-in nodes provide:
|
|
14
|
-
- Pre-configured authentication handling
|
|
15
|
-
- Optimized data structures and field mappings
|
|
16
|
-
- Better error handling and user experience
|
|
17
|
-
- Simplified setup without manual API configuration
|
|
18
|
-
|
|
19
|
-
Only use HTTP Request nodes when no built-in node exists for the service, or when you need to access an API endpoint not covered by the built-in node's operations.
|
|
20
|
-
|
|
21
|
-
## Multi-Modal Content Generation - MANDATORY
|
|
22
|
-
|
|
23
|
-
When the user's request involves specific generative AI models or media-focused platforms, the workflow MUST include the appropriate media generation node from a
|
|
24
|
-
provider-specific node. The finished workflow MUST contain the relevant video, audio, or image generation capability.
|
|
25
|
-
|
|
26
|
-
Prompts that require multi-modal generation nodes:
|
|
27
|
-
|
|
28
|
-
Video Generation:
|
|
29
|
-
- Model mentions: Sora, Nano Banana, Veo, Runway, Pika
|
|
30
|
-
- Platform mentions: YouTube content, TikTok videos, Instagram Reels, video ads, short-form video
|
|
31
|
-
- Task mentions: generate video, create video, video from text, animate
|
|
32
|
-
|
|
33
|
-
Image Generation:
|
|
34
|
-
- Model mentions: DALL-E, Midjourney, Stable Diffusion, Imagen
|
|
35
|
-
- Platform mentions: thumbnails, social media graphics, product images, marketing visuals
|
|
36
|
-
- Task mentions: generate image, create artwork, design graphic, visualize
|
|
37
|
-
|
|
38
|
-
Audio Generation:
|
|
39
|
-
- Model mentions: ElevenLabs, text-to-speech, TTS
|
|
40
|
-
- Platform mentions: podcast audio, voiceovers, narration, audio content
|
|
41
|
-
- Task mentions: generate voice, create audio, synthesize speech, clone voice
|
|
42
|
-
|
|
43
|
-
If anything like the examples above are mentioned in the prompt, include the appropriate
|
|
44
|
-
provider node (OpenAI for DALL-E/Sora, Google Gemini for Nano Banana/Imagen, etc.)
|
|
45
|
-
with the media generation operation configured.
|
|
46
|
-
|
|
47
|
-
## Content-Specific Guidance
|
|
48
|
-
|
|
49
|
-
For text generation, validate and sanitize input/output to avoid malformed data. When generating images, prefer binary data over URLs for uploads to avoid media type errors.
|
|
50
|
-
|
|
51
|
-
## Recommended Nodes
|
|
52
|
-
|
|
53
|
-
### OpenAI (@n8n/n8n-nodes-langchain.openAi)
|
|
54
|
-
|
|
55
|
-
Purpose: GPT-based text generation, DALL-E image generation, text-to-speech (TTS), and audio transcription, SORA for video generation
|
|
56
|
-
|
|
57
|
-
### xAI Grok Chat Model (@n8n/n8n-nodes-langchain.lmChatXAiGrok)
|
|
58
|
-
|
|
59
|
-
Purpose: Conversational AI and text generation
|
|
60
|
-
|
|
61
|
-
### Google Gemini Chat Model (@n8n/n8n-nodes-langchain.lmChatGoogleGemini)
|
|
62
|
-
|
|
63
|
-
Purpose: Image analysis and generation, video generation from text prompts using nano banana, multimodal content creation
|
|
64
|
-
|
|
65
|
-
### ElevenLabs
|
|
66
|
-
|
|
67
|
-
Purpose: Natural-sounding AI voice generation
|
|
68
|
-
|
|
69
|
-
Note: Use HTTP Request node or a community node to integrate with ElevenLabs API
|
|
70
|
-
|
|
71
|
-
### HTTP Request (n8n-nodes-base.httpRequest)
|
|
72
|
-
|
|
73
|
-
Purpose: Integrating with other LLM and content generation APIs (e.g., Jasper, Writesonic, Anthropic, HuggingFace)
|
|
74
|
-
|
|
75
|
-
### Edit Image (n8n-nodes-base.editImage)
|
|
76
|
-
|
|
77
|
-
Purpose: Manipulating images - resize, crop, rotate, and format conversion
|
|
78
|
-
|
|
79
|
-
Pitfalls:
|
|
80
|
-
|
|
81
|
-
- Ensure input is valid binary image data
|
|
82
|
-
- Check output format compatibility with downstream nodes
|
|
83
|
-
|
|
84
|
-
### Markdown (n8n-nodes-base.markdown)
|
|
85
|
-
|
|
86
|
-
Purpose: Formatting and converting text to HTML or Markdown reports
|
|
87
|
-
|
|
88
|
-
### Facebook Graph API (n8n-nodes-base.facebookGraphApi)
|
|
89
|
-
|
|
90
|
-
Purpose: Uploading videos and images to Instagram and Facebook
|
|
91
|
-
|
|
92
|
-
Pitfalls:
|
|
93
|
-
|
|
94
|
-
- Use binary data fields rather than URLs for media uploads to prevent "media type" errors
|
|
95
|
-
- Verify page IDs and access tokens have correct permissions
|
|
96
|
-
|
|
97
|
-
### Wait (n8n-nodes-base.wait)
|
|
98
|
-
|
|
99
|
-
Purpose: Handling delays in video processing/uploading and respecting API rate limits
|
|
100
|
-
|
|
101
|
-
## Common Pitfalls to Avoid
|
|
102
|
-
|
|
103
|
-
Binary Data Handling: For media uploads, use binary fields rather than URLs to prevent "media type" errors, especially with Facebook and Instagram APIs. Download media to binary data first, then upload from binary rather than passing URLs.
|
|
104
|
-
|
|
105
|
-
Async Processing: For long-running content generation tasks (especially video), implement proper wait/polling mechanisms. Don't assume instant completion - many AI services process requests asynchronously.
|
|
106
|
-
`;
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=content-generation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-generation.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/content-generation.ts"],"names":[],"mappings":";;AAAA,4CAuGC;AAvGD,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGP,CAAC;AACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getDocumentation(): string;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDocumentation = getDocumentation;
|
|
4
|
-
function getDocumentation() {
|
|
5
|
-
return `# Best Practices: Data Extraction Workflows
|
|
6
|
-
|
|
7
|
-
## Node Selection by Data Type
|
|
8
|
-
|
|
9
|
-
Choose the right node for your data source. Use Extract From File for CSV, Excel, PDF, and text files to convert binary data to JSON for further processing.
|
|
10
|
-
|
|
11
|
-
Use Information Extractor or AI nodes for extracting structured data from unstructured text such as PDFs or emails using LLMs.
|
|
12
|
-
|
|
13
|
-
For binary data, ensure you use nodes like Extract From File to handle files properly.
|
|
14
|
-
|
|
15
|
-
### Referencing Binary Data from Other Nodes
|
|
16
|
-
When you need to reference binary data from a previous node, use this syntax:
|
|
17
|
-
- Expression: '{{ $('Node Name').item.binary.property_name }}' or {{ $binary.property_name }} if previous item
|
|
18
|
-
- Example for Gmail attachments: '{{ $('Gmail Trigger').item.binary.attachment_0 }}' or {{ $binary.attachment_0 }} if previous item
|
|
19
|
-
- Example for webhook data: '{{ $('Webhook').item.binary.data }}' or {{ $binary.data }} if previous item
|
|
20
|
-
- Important: The property name depends on how the previous node names the binary data
|
|
21
|
-
|
|
22
|
-
## Data Structure & Type Management
|
|
23
|
-
|
|
24
|
-
Normalize data structure early in your workflow. Use transformation nodes like Split Out, Aggregate, or Set to ensure your data matches n8n's expected structure: an array of objects with a json key.
|
|
25
|
-
Not transforming incoming data to n8n's expected format causes downstream node failures.
|
|
26
|
-
|
|
27
|
-
When working with large amounts of information, n8n's display can be hard to view. Use the Edit Fields node to help organize and view data more clearly during development and debugging.
|
|
28
|
-
|
|
29
|
-
## Large File Handling
|
|
30
|
-
|
|
31
|
-
Process files in batches or use sub-workflows to avoid memory issues. For large binary files, consider enabling filesystem mode (N8N_DEFAULT_BINARY_DATA_MODE=filesystem) if self-hosted, to store binary data on disk instead of memory.
|
|
32
|
-
|
|
33
|
-
Processing too many items or large files at once can crash your instance. Always batch or split processing for large datasets to manage memory effectively.
|
|
34
|
-
|
|
35
|
-
## Binary Data Management
|
|
36
|
-
|
|
37
|
-
Binary data can be lost if intermediate nodes (like Set or Code) do not have "Include Other Input Fields" enabled, especially in sub-workflows. Always verify binary data is preserved through your workflow pipeline.
|
|
38
|
-
|
|
39
|
-
## AI-Powered Extraction
|
|
40
|
-
|
|
41
|
-
Leverage AI for unstructured data using nodes like Information Extractor or Summarization Chain to extract structured data from unstructured sources such as PDFs, emails, or web pages.
|
|
42
|
-
|
|
43
|
-
## Recommended Nodes
|
|
44
|
-
|
|
45
|
-
### Loop Over Items (n8n-nodes-base.splitInBatches)
|
|
46
|
-
|
|
47
|
-
Purpose: Looping over a set of items extracted from a data set, for example if pulling a lot of data
|
|
48
|
-
from a Google Sheet or database then looping over the items is required. This node MUST be used
|
|
49
|
-
if the user mentions a large amount of data, it is necessary to batch the data to process all of it.
|
|
50
|
-
|
|
51
|
-
### Extract From File (n8n-nodes-base.extractFromFile)
|
|
52
|
-
|
|
53
|
-
Purpose: Converts binary data from CSV, Excel, PDF, and text files to JSON for processing
|
|
54
|
-
|
|
55
|
-
Pitfalls:
|
|
56
|
-
|
|
57
|
-
- Ensure the correct binary field name is specified in the node configuration
|
|
58
|
-
- Verify file format compatibility before extraction
|
|
59
|
-
|
|
60
|
-
### HTML Extract (n8n-nodes-base.htmlExtract)
|
|
61
|
-
|
|
62
|
-
Purpose: Scrapes data from web pages using CSS selectors
|
|
63
|
-
|
|
64
|
-
### Split Out (n8n-nodes-base.splitOut)
|
|
65
|
-
|
|
66
|
-
Purpose: Processes arrays of items individually for sequential operations.
|
|
67
|
-
Example: If retrieving a JSON array using a HTTP request, this will return a single item,
|
|
68
|
-
containing that array. If you wish to use a Loop Over Items (n8n-nodes-base.splitInBatches) node,
|
|
69
|
-
then you will need to split out the array into items before looping over it. In a scenario like
|
|
70
|
-
this a split out node MUST be used before looping over the items.
|
|
71
|
-
|
|
72
|
-
### Edit Fields (Set) (n8n-nodes-base.set)
|
|
73
|
-
|
|
74
|
-
Purpose: Data transformation and mapping to normalize structure
|
|
75
|
-
|
|
76
|
-
Pitfalls:
|
|
77
|
-
|
|
78
|
-
- Enable "Include Other Input Fields" to preserve binary data
|
|
79
|
-
- Pay attention to data types - mixing types causes unexpected failures
|
|
80
|
-
|
|
81
|
-
### Information Extractor (@n8n/n8n-nodes-langchain.informationExtractor)
|
|
82
|
-
|
|
83
|
-
Purpose: AI-powered extraction of structured data from unstructured text
|
|
84
|
-
|
|
85
|
-
Pitfalls:
|
|
86
|
-
|
|
87
|
-
- Requires proper schema definition for extraction
|
|
88
|
-
|
|
89
|
-
### Summarization Chain (@n8n/n8n-nodes-langchain.chainSummarization)
|
|
90
|
-
|
|
91
|
-
Purpose: Summarizes large text blocks using AI for condensed information extraction
|
|
92
|
-
|
|
93
|
-
Pitfalls:
|
|
94
|
-
|
|
95
|
-
- Context window limits may truncate very long documents
|
|
96
|
-
- Verify summary quality matches requirements
|
|
97
|
-
|
|
98
|
-
### HTTP Request (n8n-nodes-base.httpRequest)
|
|
99
|
-
|
|
100
|
-
Purpose: Fetches data from APIs or web pages for extraction
|
|
101
|
-
|
|
102
|
-
### Code (n8n-nodes-base.code)
|
|
103
|
-
|
|
104
|
-
Purpose: Custom logic for complex data transformations
|
|
105
|
-
|
|
106
|
-
## Common Pitfalls to Avoid
|
|
107
|
-
|
|
108
|
-
Data Type Confusion: People often mix up data types - n8n can be very lenient but it can lead to problems. Pay close attention to what type you are getting and ensure consistency throughout the workflow.
|
|
109
|
-
|
|
110
|
-
Binary Data Loss: Binary data can be lost if intermediate nodes (Set, Code) do not have "Include Other Input Fields" enabled, especially in sub-workflows. Always verify binary data preservation.
|
|
111
|
-
|
|
112
|
-
Large Data Display Issues: n8n displaying large amounts of information can be hard to view during development. Use the Edit Fields node to help organize and view data more clearly.
|
|
113
|
-
`;
|
|
114
|
-
}
|
|
115
|
-
//# sourceMappingURL=data-extraction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-extraction.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/data-extraction.ts"],"names":[],"mappings":";;AAAA,4CA8GC;AA9GD,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GP,CAAC;AACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getDocumentation(): string;
|