@n8n/n8n-nodes-langchain 1.100.0 → 1.101.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.
Files changed (178) hide show
  1. package/dist/credentials/WeaviateApi.credentials.js +164 -0
  2. package/dist/credentials/WeaviateApi.credentials.js.map +1 -0
  3. package/dist/known/credentials.json +7 -0
  4. package/dist/known/nodes.json +4 -0
  5. package/dist/nodes/agents/Agent/Agent.node.js +5 -2
  6. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  7. package/dist/nodes/agents/Agent/V1/AgentV1.node.js +1 -4
  8. package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -1
  9. package/dist/nodes/agents/Agent/V2/AgentV2.node.js +23 -6
  10. package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -1
  11. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +0 -1
  12. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
  13. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js +29 -1
  14. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js.map +1 -1
  15. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js +94 -4
  16. package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js.map +1 -1
  17. package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js.map +1 -1
  18. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +0 -1
  19. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -1
  20. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +0 -1
  21. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
  22. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +0 -1
  23. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -1
  24. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +0 -1
  25. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
  26. package/dist/nodes/code/Code.node.js.map +1 -1
  27. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +0 -2
  28. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
  29. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +0 -2
  30. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -1
  31. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +0 -2
  32. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
  33. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +0 -2
  34. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
  35. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +0 -2
  36. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -1
  37. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js +0 -2
  38. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js.map +1 -1
  39. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +0 -2
  40. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
  41. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +0 -2
  42. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -1
  43. package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js +0 -2
  44. package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js.map +1 -1
  45. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +0 -2
  46. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
  47. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +0 -2
  48. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -1
  49. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +0 -2
  50. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -1
  51. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +0 -2
  52. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
  53. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +4 -5
  54. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  55. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +0 -3
  56. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
  57. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +6 -6
  58. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  59. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +3 -1
  60. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
  61. package/dist/nodes/llms/LMCohere/LmCohere.node.js +0 -3
  62. package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
  63. package/dist/nodes/llms/LMOllama/LmOllama.node.js +0 -3
  64. package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
  65. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +3 -4
  66. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
  67. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +0 -3
  68. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
  69. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +1 -5
  70. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
  71. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +3 -4
  72. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
  73. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +3 -4
  74. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -1
  75. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +0 -3
  76. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
  77. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +0 -3
  78. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -1
  79. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +1 -4
  80. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -1
  81. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +0 -3
  82. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -1
  83. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +3 -3
  84. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
  85. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +3 -4
  86. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -1
  87. package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
  88. package/dist/nodes/llms/N8nNonEstimatingTracing.js.map +1 -1
  89. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js +1 -1
  90. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js.map +1 -1
  91. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +0 -2
  92. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
  93. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +0 -2
  94. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
  95. package/dist/nodes/memory/MemoryManager/MemoryManager.node.js +0 -2
  96. package/dist/nodes/memory/MemoryManager/MemoryManager.node.js.map +1 -1
  97. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +0 -2
  98. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
  99. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +0 -2
  100. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -1
  101. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +0 -2
  102. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
  103. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +0 -2
  104. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
  105. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +0 -2
  106. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
  107. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +0 -2
  108. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
  109. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +0 -2
  110. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
  111. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +0 -1
  112. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
  113. package/dist/nodes/rerankers/RerankerCohere/RerankerCohere.node.js.map +1 -1
  114. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +0 -1
  115. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
  116. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +0 -1
  117. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
  118. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +0 -2
  119. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
  120. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
  121. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +0 -2
  122. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
  123. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +0 -2
  124. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
  125. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +0 -2
  126. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
  127. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TokenTextSplitter.js.map +1 -1
  128. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +0 -2
  129. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
  130. package/dist/nodes/tools/ToolCode/ToolCode.node.js +0 -2
  131. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
  132. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +0 -2
  133. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -1
  134. package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -1
  135. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +0 -2
  136. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
  137. package/dist/nodes/tools/ToolThink/ToolThink.node.js.map +1 -1
  138. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +0 -2
  139. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
  140. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +0 -2
  141. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -1
  142. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +0 -2
  143. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -1
  144. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +0 -2
  145. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -1
  146. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -1
  147. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +215 -153
  148. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
  149. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +1 -1
  150. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
  151. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +0 -1
  152. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
  153. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +0 -1
  154. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
  155. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +2 -2
  156. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
  157. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
  158. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
  159. package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js +242 -0
  160. package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js.map +1 -0
  161. package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js +127 -0
  162. package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js.map +1 -0
  163. package/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg +2 -0
  164. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +0 -1
  165. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -1
  166. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +15 -2
  167. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -1
  168. package/dist/nodes/vector_store/shared/descriptions.js +26 -2
  169. package/dist/nodes/vector_store/shared/descriptions.js.map +1 -1
  170. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +0 -1
  171. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -1
  172. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +1 -1
  173. package/dist/types/credentials.json +1 -0
  174. package/dist/types/nodes.json +4 -3
  175. package/dist/utils/httpProxyAgent.js +20 -6
  176. package/dist/utils/httpProxyAgent.js.map +1 -1
  177. package/dist/utils/logWrapper.js.map +1 -1
  178. package/package.json +21 -15
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v1/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport type { INodeTypeDescription } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport {\n\tinputSchemaField,\n\tjsonSchemaExampleField,\n\tschemaTypeField,\n} from '../../../../utils/descriptions';\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tversion: [1, 1.1, 1.2, 1.3],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tcodex: {\n\t\tcategories: ['AI'],\n\t\tsubcategories: {\n\t\t\tAI: ['Tools'],\n\t\t\tTools: ['Recommended Tools'],\n\t\t},\n\t\tresources: {\n\t\t\tprimaryDocumentation: [\n\t\t\t\t{\n\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\t// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node\n\tinputs: [],\n\t// eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'My_Color_Tool',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [1],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { gte: 1.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separted names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow ID',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'string',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t\t'@version': [{ _cnd: { lte: 1.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow to execute',\n\t\t\thint: 'Can be found in the URL of the workflow',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t\t'@version': [{ _cnd: { gte: 1.2 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t\t},\n\t\t// ----------------------------------\n\t\t// For all\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Field to Return',\n\t\t\tname: 'responsePropertyName',\n\t\t\ttype: 'string',\n\t\t\tdefault: 'response',\n\t\t\trequired: true,\n\t\t\thint: 'The field in the last-executed node of the workflow that contains the response',\n\t\t\tdescription:\n\t\t\t\t'Where to find the data that this tool should return. n8n will look in the output of the last-executed node of the workflow for a field with this name, and return its value.',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { lt: 1.3 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Extra Workflow Inputs',\n\t\t\tname: 'fields',\n\t\t\tplaceholder: 'Add Value',\n\t\t\ttype: 'fixedCollection',\n\t\t\tdescription:\n\t\t\t\t\"These will be output by the 'execute workflow' trigger of the workflow being called\",\n\t\t\ttypeOptions: {\n\t\t\t\tmultipleValues: true,\n\t\t\t\tsortable: true,\n\t\t\t},\n\t\t\tdefault: {},\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'values',\n\t\t\t\t\tdisplayName: 'Values',\n\t\t\t\t\tvalues: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tplaceholder: 'e.g. fieldName',\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'Name of the field to set the value of. Supports dot-notation. Example: data.person[0].name.',\n\t\t\t\t\t\t\trequiresDataPath: 'single',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Type',\n\t\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\tdescription: 'The field value type',\n\t\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'String',\n\t\t\t\t\t\t\t\t\tvalue: 'stringValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Number',\n\t\t\t\t\t\t\t\t\tvalue: 'numberValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Boolean',\n\t\t\t\t\t\t\t\t\tvalue: 'booleanValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Array',\n\t\t\t\t\t\t\t\t\tvalue: 'arrayValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Object',\n\t\t\t\t\t\t\t\t\tvalue: 'objectValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tdefault: 'stringValue',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'stringValue',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['stringValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'string',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'numberValue',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['numberValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'number',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'booleanValue',\n\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\tdefault: 'true',\n\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'True',\n\t\t\t\t\t\t\t\t\tvalue: 'true',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'False',\n\t\t\t\t\t\t\t\t\tvalue: 'false',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['booleanValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'boolean',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'arrayValue',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tplaceholder: 'e.g. [ arrayItem1, arrayItem2, arrayItem3 ]',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['arrayValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'array',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'objectValue',\n\t\t\t\t\t\t\ttype: 'json',\n\t\t\t\t\t\t\tdefault: '={}',\n\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\trows: 2,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['objectValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'object',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t// ----------------------------------\n\t\t// Output Parsing\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Specify Input Schema',\n\t\t\tname: 'specifyInputSchema',\n\t\t\ttype: 'boolean',\n\t\t\tdescription:\n\t\t\t\t'Whether to specify the schema for the function. This would require the LLM to provide the input in the correct format and would validate it against the schema.',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: false,\n\t\t},\n\t\t{ ...schemaTypeField, displayOptions: { show: { specifyInputSchema: [true] } } },\n\t\tjsonSchemaExampleField,\n\t\tinputSchemaField,\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAoC;AAEpC,0BAIO;AACP,0BAA6C;AAEtC,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,SAAS,CAAC,GAAG,KAAK,KAAK,GAAG;AAAA,EAC1B,aAAa;AAAA,EACb,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,YAAY,CAAC,IAAI;AAAA,IACjB,eAAe;AAAA,MACd,IAAI,CAAC,OAAO;AAAA,MACZ,OAAO,CAAC,mBAAmB;AAAA,IAC5B;AAAA,IACA,WAAW;AAAA,MACV,sBAAsB;AAAA,QACrB;AAAA,UACC,KAAK;AAAA,QACN;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA;AAAA,EAEA,QAAQ,CAAC;AAAA;AAAA,EAET,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AAA,gBACR;AAAA,kBACC,MAAM;AAAA,kBACN,OAAO;AAAA,gBACR;AAAA,gBACA;AAAA,kBACC,MAAM;AAAA,kBACN,OAAO;AAAA,gBACR;AAAA,cACD;AAAA,cACA,gBAAgB;AAAA,gBACf,MAAM;AAAA,kBACL,MAAM,CAAC,cAAc;AAAA,gBACtB;AAAA,cACD;AAAA,cACA,cAAc;AAAA,cACd,iCAAiC;AAAA,YAClC;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aAAa;AAAA,cACb,gBAAgB;AAAA,gBACf,MAAM;AAAA,kBACL,MAAM,CAAC,YAAY;AAAA,gBACpB;AAAA,cACD;AAAA,cACA,cAAc;AAAA,cACd,iCAAiC;AAAA,YAClC;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aAAa;AAAA,gBACZ,MAAM;AAAA,cACP;AAAA,cACA,gBAAgB;AAAA,gBACf,MAAM;AAAA,kBACL,MAAM,CAAC,aAAa;AAAA,gBACrB;AAAA,cACD;AAAA,cACA,cAAc;AAAA,cACd,iCAAiC;AAAA,YAClC;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aACC;AAAA,MACD,kBAAkB;AAAA,MAClB,SAAS;AAAA,IACV;AAAA,IACA,EAAE,GAAG,qCAAiB,gBAAgB,EAAE,MAAM,EAAE,oBAAoB,CAAC,IAAI,EAAE,EAAE,EAAE;AAAA,IAC/E;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v1/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n\nimport type { INodeTypeDescription } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport {\n\tinputSchemaField,\n\tjsonSchemaExampleField,\n\tschemaTypeField,\n} from '../../../../utils/descriptions';\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tversion: [1, 1.1, 1.2, 1.3],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tcodex: {\n\t\tcategories: ['AI'],\n\t\tsubcategories: {\n\t\t\tAI: ['Tools'],\n\t\t\tTools: ['Recommended Tools'],\n\t\t},\n\t\tresources: {\n\t\t\tprimaryDocumentation: [\n\t\t\t\t{\n\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\n\tinputs: [],\n\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'My_Color_Tool',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [1],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { gte: 1.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separted names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow ID',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'string',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t\t'@version': [{ _cnd: { lte: 1.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow to execute',\n\t\t\thint: 'Can be found in the URL of the workflow',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t\t'@version': [{ _cnd: { gte: 1.2 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t\t},\n\t\t// ----------------------------------\n\t\t// For all\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Field to Return',\n\t\t\tname: 'responsePropertyName',\n\t\t\ttype: 'string',\n\t\t\tdefault: 'response',\n\t\t\trequired: true,\n\t\t\thint: 'The field in the last-executed node of the workflow that contains the response',\n\t\t\tdescription:\n\t\t\t\t'Where to find the data that this tool should return. n8n will look in the output of the last-executed node of the workflow for a field with this name, and return its value.',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { lt: 1.3 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Extra Workflow Inputs',\n\t\t\tname: 'fields',\n\t\t\tplaceholder: 'Add Value',\n\t\t\ttype: 'fixedCollection',\n\t\t\tdescription:\n\t\t\t\t\"These will be output by the 'execute workflow' trigger of the workflow being called\",\n\t\t\ttypeOptions: {\n\t\t\t\tmultipleValues: true,\n\t\t\t\tsortable: true,\n\t\t\t},\n\t\t\tdefault: {},\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'values',\n\t\t\t\t\tdisplayName: 'Values',\n\t\t\t\t\tvalues: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Name',\n\t\t\t\t\t\t\tname: 'name',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tplaceholder: 'e.g. fieldName',\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'Name of the field to set the value of. Supports dot-notation. Example: data.person[0].name.',\n\t\t\t\t\t\t\trequiresDataPath: 'single',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Type',\n\t\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\tdescription: 'The field value type',\n\t\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'String',\n\t\t\t\t\t\t\t\t\tvalue: 'stringValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Number',\n\t\t\t\t\t\t\t\t\tvalue: 'numberValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Boolean',\n\t\t\t\t\t\t\t\t\tvalue: 'booleanValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Array',\n\t\t\t\t\t\t\t\t\tvalue: 'arrayValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'Object',\n\t\t\t\t\t\t\t\t\tvalue: 'objectValue',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tdefault: 'stringValue',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'stringValue',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['stringValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'string',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'numberValue',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['numberValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'number',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'booleanValue',\n\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\tdefault: 'true',\n\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'True',\n\t\t\t\t\t\t\t\t\tvalue: 'true',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tname: 'False',\n\t\t\t\t\t\t\t\t\tvalue: 'false',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['booleanValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'boolean',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'arrayValue',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tplaceholder: 'e.g. [ arrayItem1, arrayItem2, arrayItem3 ]',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['arrayValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'array',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\tname: 'objectValue',\n\t\t\t\t\t\t\ttype: 'json',\n\t\t\t\t\t\t\tdefault: '={}',\n\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\trows: 2,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\ttype: ['objectValue'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalidateType: 'object',\n\t\t\t\t\t\t\tignoreValidationDuringExecution: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t// ----------------------------------\n\t\t// Output Parsing\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Specify Input Schema',\n\t\t\tname: 'specifyInputSchema',\n\t\t\ttype: 'boolean',\n\t\t\tdescription:\n\t\t\t\t'Whether to specify the schema for the function. This would require the LLM to provide the input in the correct format and would validate it against the schema.',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: false,\n\t\t},\n\t\t{ ...schemaTypeField, displayOptions: { show: { specifyInputSchema: [true] } } },\n\t\tjsonSchemaExampleField,\n\t\tinputSchemaField,\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAoC;AAEpC,0BAIO;AACP,0BAA6C;AAEtC,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,SAAS,CAAC,GAAG,KAAK,KAAK,GAAG;AAAA,EAC1B,aAAa;AAAA,EACb,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,YAAY,CAAC,IAAI;AAAA,IACjB,eAAe;AAAA,MACd,IAAI,CAAC,OAAO;AAAA,MACZ,OAAO,CAAC,mBAAmB;AAAA,IAC5B;AAAA,IACA,WAAW;AAAA,MACV,sBAAsB;AAAA,QACrB;AAAA,UACC,KAAK;AAAA,QACN;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,QAAQ,CAAC;AAAA,EAET,SAAS,CAAC,wCAAoB,MAAM;AAAA,EACpC,aAAa,CAAC,MAAM;AAAA,EACpB,YAAY;AAAA,QACX,kDAA6B,CAAC,wCAAoB,OAAO,CAAC;AAAA,IAC1D;AAAA,MACC,aACC;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAA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cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aAAa;AAAA,cACb,gBAAgB;AAAA,gBACf,MAAM;AAAA,kBACL,MAAM,CAAC,YAAY;AAAA,gBACpB;AAAA,cACD;AAAA,cACA,cAAc;AAAA,cACd,iCAAiC;AAAA,YAClC;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aAAa;AAAA,gBACZ,MAAM;AAAA,cACP;AAAA,cACA,gBAAgB;AAAA,gBACf,MAAM;AAAA,kBACL,MAAM,CAAC,aAAa;AAAA,gBACrB;AAAA,cACD;AAAA,cACA,cAAc;AAAA,cACd,iCAAiC;AAAA,YAClC;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aACC;AAAA,MACD,kBAAkB;AAAA,MAClB,SAAS;AAAA,IACV;AAAA,IACA,EAAE,GAAG,qCAAiB,gBAAgB,EAAE,MAAM,EAAE,oBAAoB,CAAC,IAAI,EAAE,EAAE,EAAE;AAAA,IAC/E;AAAA,IACA;AAAA,EACD;AACD;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v2/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tversion: [2, 2.1, 2.2],\n\tinputs: [],\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { lte: 2.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separated names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t\t// -----------------------------------------------\n\t\t// Resource mapper for workflow inputs\n\t\t// -----------------------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow Inputs',\n\t\t\tname: 'workflowInputs',\n\t\t\ttype: 'resourceMapper',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: {\n\t\t\t\tmappingMode: 'defineBelow',\n\t\t\t\tvalue: null,\n\t\t\t},\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tloadOptionsDependsOn: ['workflowId.value'],\n\t\t\t\tresourceMapper: {\n\t\t\t\t\tlocalResourceMapperMethod: 'loadSubWorkflowInputs',\n\t\t\t\t\tvaluesLabel: 'Workflow Inputs',\n\t\t\t\t\tmode: 'map',\n\t\t\t\t\tfieldWords: {\n\t\t\t\t\t\tsingular: 'workflow input',\n\t\t\t\t\t\tplural: 'workflow inputs',\n\t\t\t\t\t},\n\t\t\t\t\taddAllFields: true,\n\t\t\t\t\tmultiKeyMatch: false,\n\t\t\t\t\tsupportAutoMap: false,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t\thide: {\n\t\t\t\t\tworkflowId: [''],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t\t},\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA+D;AAE/D,0BAA6C;AAEtC,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,aAAa;AAAA,EACb,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,SAAS,CAAC,GAAG,KAAK,GAAG;AAAA,EACrB,QAAQ,CAAC;AAAA,EACT,SAAS,CAAC,wCAAoB,MAAM;AAAA,EACpC,aAAa,CAAC,MAAM;AAAA,EACpB,YAAY;AAAA,QACX,kDAA6B,CAAC,wCAAoB,OAAO,CAAC;AAAA,IAC1D;AAAA,MACC,aACC;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,MACb,cAAc;AAAA,MACd,aACC;AAAA,MACD,gBAAgB;AAAA,QACf,MAAM;AAAA,UACL,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC;AAAA,QACpC;AAAA,MACD;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aACC;AA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A,IACD;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,MAAM;AAAA,MACP;AAAA,MACA,gBAAgB;AAAA,QACf,MAAM;AAAA,UACL,QAAQ,CAAC,WAAW;AAAA,QACrB;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,IACd;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v2/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tversion: [2, 2.1, 2.2],\n\tinputs: [],\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\t'@version': [{ _cnd: { lte: 2.1 } }],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separated names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t\t// -----------------------------------------------\n\t\t// Resource mapper for workflow inputs\n\t\t// -----------------------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow Inputs',\n\t\t\tname: 'workflowInputs',\n\t\t\ttype: 'resourceMapper',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: {\n\t\t\t\tmappingMode: 'defineBelow',\n\t\t\t\tvalue: null,\n\t\t\t},\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tloadOptionsDependsOn: ['workflowId.value'],\n\t\t\t\tresourceMapper: {\n\t\t\t\t\tlocalResourceMapperMethod: 'loadSubWorkflowInputs',\n\t\t\t\t\tvaluesLabel: 'Workflow Inputs',\n\t\t\t\t\tmode: 'map',\n\t\t\t\t\tfieldWords: {\n\t\t\t\t\t\tsingular: 'workflow input',\n\t\t\t\t\t\tplural: 'workflow inputs',\n\t\t\t\t\t},\n\t\t\t\t\taddAllFields: true,\n\t\t\t\t\tmultiKeyMatch: false,\n\t\t\t\t\tsupportAutoMap: false,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t\thide: {\n\t\t\t\t\tworkflowId: [''],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t\t},\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA+D;AAE/D,0BAA6C;AAEtC,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,aA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;AAAA,UACL,QAAQ,CAAC,UAAU;AAAA,QACpB;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,kBAAkB;AAAA,MAClB,SAAS;AAAA,QACR,aAAa;AAAA,QACb,OAAO;AAAA,MACR;AAAA,MACA,UAAU;AAAA,MACV,aAAa;AAAA,QACZ,sBAAsB,CAAC,kBAAkB;AAAA,QACzC,gBAAgB;AAAA,UACf,2BAA2B;AAAA,UAC3B,aAAa;AAAA,UACb,MAAM;AAAA,UACN,YAAY;AAAA,YACX,UAAU;AAAA,YACV,QAAQ;AAAA,UACT;AAAA,UACA,cAAc;AAAA,UACd,eAAe;AAAA,UACf,gBAAgB;AAAA,QACjB;AAAA,MACD;AAAA,MACA,gBAAgB;AAAA,QACf,MAAM;AAAA,UACL,QAAQ,CAAC,UAAU;AAAA,QACpB;AAAA,QACA,MAAM;AAAA,UACL,YAAY,CAAC,EAAE;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,MAAM;AAAA,MACP;AAAA,MACA,gBAAgB;AAAA,QACf,MAAM;AAAA,UACL,QAAQ,CAAC,WAAW;AAAA,QACrB;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,IACd;AAAA,EACD;AACD;","names":[]}
@@ -52,6 +52,169 @@ const allowedFileMimeTypeOption = {
52
52
  placeholder: "e.g. image/*, text/*, application/pdf",
53
53
  description: 'Allowed file types for upload. Comma-separated list of <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types" target="_blank">MIME types</a>.'
54
54
  };
55
+ const responseModeOptions = [
56
+ {
57
+ name: "When Last Node Finishes",
58
+ value: "lastNode",
59
+ description: "Returns data of the last-executed node"
60
+ },
61
+ {
62
+ name: "Using 'Respond to Webhook' Node",
63
+ value: "responseNode",
64
+ description: "Response defined in that node"
65
+ }
66
+ ];
67
+ const responseModeWithStreamingOptions = [
68
+ ...responseModeOptions,
69
+ {
70
+ name: "Streaming Response",
71
+ value: "streaming",
72
+ description: "Streaming response from specified nodes (e.g. Agents)"
73
+ }
74
+ ];
75
+ const commonOptionsFields = [
76
+ // CORS parameters are only valid for when chat is used in hosted or webhook mode
77
+ {
78
+ displayName: "Allowed Origins (CORS)",
79
+ name: "allowedOrigins",
80
+ type: "string",
81
+ default: "*",
82
+ description: "Comma-separated list of URLs allowed for cross-origin non-preflight requests. Use * (default) to allow all origins.",
83
+ displayOptions: {
84
+ show: {
85
+ "/mode": ["hostedChat", "webhook"]
86
+ }
87
+ }
88
+ },
89
+ {
90
+ ...allowFileUploadsOption,
91
+ displayOptions: {
92
+ show: {
93
+ "/mode": ["hostedChat"]
94
+ }
95
+ }
96
+ },
97
+ {
98
+ ...allowedFileMimeTypeOption,
99
+ displayOptions: {
100
+ show: {
101
+ "/mode": ["hostedChat"]
102
+ }
103
+ }
104
+ },
105
+ {
106
+ displayName: "Input Placeholder",
107
+ name: "inputPlaceholder",
108
+ type: "string",
109
+ displayOptions: {
110
+ show: {
111
+ "/mode": ["hostedChat"]
112
+ }
113
+ },
114
+ default: "Type your question..",
115
+ placeholder: "e.g. Type your message here",
116
+ description: "Shown as placeholder text in the chat input field"
117
+ },
118
+ {
119
+ displayName: "Load Previous Session",
120
+ name: "loadPreviousSession",
121
+ type: "options",
122
+ options: [
123
+ {
124
+ name: "Off",
125
+ value: "notSupported",
126
+ description: "Loading messages of previous session is turned off"
127
+ },
128
+ {
129
+ name: "From Memory",
130
+ value: "memory",
131
+ description: "Load session messages from memory"
132
+ },
133
+ {
134
+ name: "Manually",
135
+ value: "manually",
136
+ description: "Manually return messages of session"
137
+ }
138
+ ],
139
+ default: "notSupported",
140
+ description: "If loading messages of a previous session should be enabled"
141
+ },
142
+ {
143
+ displayName: "Require Button Click to Start Chat",
144
+ name: "showWelcomeScreen",
145
+ type: "boolean",
146
+ displayOptions: {
147
+ show: {
148
+ "/mode": ["hostedChat"]
149
+ }
150
+ },
151
+ default: false,
152
+ description: "Whether to show the welcome screen at the start of the chat"
153
+ },
154
+ {
155
+ displayName: "Start Conversation Button Text",
156
+ name: "getStarted",
157
+ type: "string",
158
+ displayOptions: {
159
+ show: {
160
+ showWelcomeScreen: [true],
161
+ "/mode": ["hostedChat"]
162
+ }
163
+ },
164
+ default: "New Conversation",
165
+ placeholder: "e.g. New Conversation",
166
+ description: "Shown as part of the welcome screen, in the middle of the chat window"
167
+ },
168
+ {
169
+ displayName: "Subtitle",
170
+ name: "subtitle",
171
+ type: "string",
172
+ displayOptions: {
173
+ show: {
174
+ "/mode": ["hostedChat"]
175
+ }
176
+ },
177
+ default: "Start a chat. We're here to help you 24/7.",
178
+ placeholder: "e.g. We're here for you",
179
+ description: "Shown at the top of the chat, under the title"
180
+ },
181
+ {
182
+ displayName: "Title",
183
+ name: "title",
184
+ type: "string",
185
+ displayOptions: {
186
+ show: {
187
+ "/mode": ["hostedChat"]
188
+ }
189
+ },
190
+ default: "Hi there! \u{1F44B}",
191
+ placeholder: "e.g. Welcome",
192
+ description: "Shown at the top of the chat"
193
+ },
194
+ {
195
+ displayName: "Custom Chat Styling",
196
+ name: "customCss",
197
+ type: "string",
198
+ typeOptions: {
199
+ rows: 10,
200
+ editor: "cssEditor"
201
+ },
202
+ displayOptions: {
203
+ show: {
204
+ "/mode": ["hostedChat"]
205
+ }
206
+ },
207
+ default: `
208
+ ${import_constants.cssVariables}
209
+
210
+ /* You can override any class styles, too. Right-click inspect in Chat UI to find class to override. */
211
+ .chat-message {
212
+ max-width: 50%;
213
+ }
214
+ `.trim(),
215
+ description: "Override default styling of the public chat interface with CSS"
216
+ }
217
+ ];
55
218
  class ChatTrigger extends import_n8n_workflow.Node {
56
219
  constructor() {
57
220
  super(...arguments);
@@ -61,7 +224,9 @@ class ChatTrigger extends import_n8n_workflow.Node {
61
224
  icon: "fa:comments",
62
225
  iconColor: "black",
63
226
  group: ["trigger"],
64
- version: [1, 1.1],
227
+ version: [1, 1.1, 1.2],
228
+ // Keep the default version as 1.1 to avoid releasing streaming in broken state
229
+ defaultVersion: 1.1,
65
230
  description: "Runs the workflow when an n8n generated webchat is submitted",
66
231
  defaults: {
67
232
  name: "When chat message received"
@@ -244,6 +409,7 @@ class ChatTrigger extends import_n8n_workflow.Node {
244
409
  default: {},
245
410
  options: [allowFileUploadsOption, allowedFileMimeTypeOption]
246
411
  },
412
+ // Options for versions 1.0 and 1.1 (without streaming)
247
413
  {
248
414
  displayName: "Options",
249
415
  name: "options",
@@ -251,171 +417,47 @@ class ChatTrigger extends import_n8n_workflow.Node {
251
417
  displayOptions: {
252
418
  show: {
253
419
  mode: ["hostedChat", "webhook"],
254
- public: [true]
420
+ public: [true],
421
+ "@version": [1, 1.1]
255
422
  }
256
423
  },
257
424
  placeholder: "Add Field",
258
425
  default: {},
259
426
  options: [
260
- // CORS parameters are only valid for when chat is used in hosted or webhook mode
427
+ ...commonOptionsFields,
261
428
  {
262
- displayName: "Allowed Origins (CORS)",
263
- name: "allowedOrigins",
264
- type: "string",
265
- default: "*",
266
- description: "Comma-separated list of URLs allowed for cross-origin non-preflight requests. Use * (default) to allow all origins.",
267
- displayOptions: {
268
- show: {
269
- "/mode": ["hostedChat", "webhook"]
270
- }
271
- }
272
- },
273
- {
274
- ...allowFileUploadsOption,
275
- displayOptions: {
276
- show: {
277
- "/mode": ["hostedChat"]
278
- }
279
- }
280
- },
281
- {
282
- ...allowedFileMimeTypeOption,
283
- displayOptions: {
284
- show: {
285
- "/mode": ["hostedChat"]
286
- }
287
- }
288
- },
289
- {
290
- displayName: "Input Placeholder",
291
- name: "inputPlaceholder",
292
- type: "string",
293
- displayOptions: {
294
- show: {
295
- "/mode": ["hostedChat"]
296
- }
297
- },
298
- default: "Type your question..",
299
- placeholder: "e.g. Type your message here",
300
- description: "Shown as placeholder text in the chat input field"
301
- },
302
- {
303
- displayName: "Load Previous Session",
304
- name: "loadPreviousSession",
429
+ displayName: "Response Mode",
430
+ name: "responseMode",
305
431
  type: "options",
306
- options: [
307
- {
308
- name: "Off",
309
- value: "notSupported",
310
- description: "Loading messages of previous session is turned off"
311
- },
312
- {
313
- name: "From Memory",
314
- value: "memory",
315
- description: "Load session messages from memory"
316
- },
317
- {
318
- name: "Manually",
319
- value: "manually",
320
- description: "Manually return messages of session"
321
- }
322
- ],
323
- default: "notSupported",
324
- description: "If loading messages of a previous session should be enabled"
325
- },
432
+ options: responseModeOptions,
433
+ default: "lastNode",
434
+ description: "When and how to respond to the webhook"
435
+ }
436
+ ]
437
+ },
438
+ // Options for version 1.2+ (with streaming)
439
+ {
440
+ displayName: "Options",
441
+ name: "options",
442
+ type: "collection",
443
+ displayOptions: {
444
+ show: {
445
+ mode: ["hostedChat", "webhook"],
446
+ public: [true],
447
+ "@version": [{ _cnd: { gte: 1.2 } }]
448
+ }
449
+ },
450
+ placeholder: "Add Field",
451
+ default: {},
452
+ options: [
453
+ ...commonOptionsFields,
326
454
  {
327
455
  displayName: "Response Mode",
328
456
  name: "responseMode",
329
457
  type: "options",
330
- options: [
331
- {
332
- name: "When Last Node Finishes",
333
- value: "lastNode",
334
- description: "Returns data of the last-executed node"
335
- },
336
- {
337
- name: "Using 'Respond to Webhook' Node",
338
- value: "responseNode",
339
- description: "Response defined in that node"
340
- }
341
- ],
458
+ options: responseModeWithStreamingOptions,
342
459
  default: "lastNode",
343
460
  description: "When and how to respond to the webhook"
344
- },
345
- {
346
- displayName: "Require Button Click to Start Chat",
347
- name: "showWelcomeScreen",
348
- type: "boolean",
349
- displayOptions: {
350
- show: {
351
- "/mode": ["hostedChat"]
352
- }
353
- },
354
- default: false,
355
- description: "Whether to show the welcome screen at the start of the chat"
356
- },
357
- {
358
- displayName: "Start Conversation Button Text",
359
- name: "getStarted",
360
- type: "string",
361
- displayOptions: {
362
- show: {
363
- showWelcomeScreen: [true],
364
- "/mode": ["hostedChat"]
365
- }
366
- },
367
- default: "New Conversation",
368
- placeholder: "e.g. New Conversation",
369
- description: "Shown as part of the welcome screen, in the middle of the chat window"
370
- },
371
- {
372
- displayName: "Subtitle",
373
- name: "subtitle",
374
- type: "string",
375
- displayOptions: {
376
- show: {
377
- "/mode": ["hostedChat"]
378
- }
379
- },
380
- default: "Start a chat. We're here to help you 24/7.",
381
- placeholder: "e.g. We're here for you",
382
- description: "Shown at the top of the chat, under the title"
383
- },
384
- {
385
- displayName: "Title",
386
- name: "title",
387
- type: "string",
388
- displayOptions: {
389
- show: {
390
- "/mode": ["hostedChat"]
391
- }
392
- },
393
- default: "Hi there! \u{1F44B}",
394
- placeholder: "e.g. Welcome",
395
- description: "Shown at the top of the chat"
396
- },
397
- {
398
- displayName: "Custom Chat Styling",
399
- name: "customCss",
400
- type: "string",
401
- typeOptions: {
402
- rows: 10,
403
- editor: "cssEditor"
404
- },
405
- displayOptions: {
406
- show: {
407
- "/mode": ["hostedChat"]
408
- }
409
- },
410
- default: `
411
- ${import_constants.cssVariables}
412
-
413
- /* You can override any class styles, too. Right-click inspect in Chat UI to find class to override. */
414
- .chat-message {
415
- max-width: 50%;
416
- }
417
- `.trim(),
418
- description: "Override default styling of the public chat interface with CSS"
419
461
  }
420
462
  ]
421
463
  }
@@ -483,6 +525,8 @@ ${import_constants.cssVariables}
483
525
  };
484
526
  }
485
527
  const options = ctx.getNodeParameter("options", {});
528
+ const responseMode = ctx.getNodeParameter("options.responseMode", "lastNode");
529
+ const enableStreaming = responseMode === "streaming";
486
530
  const req = ctx.getRequestObject();
487
531
  const webhookName = ctx.getWebhookName();
488
532
  const mode = ctx.getMode() === "manual" ? "test" : "production";
@@ -544,6 +588,24 @@ ${import_constants.cssVariables}
544
588
  }
545
589
  let returnData;
546
590
  const webhookResponse = { status: 200 };
591
+ if (enableStreaming) {
592
+ res.writeHead(200, {
593
+ "Content-Type": "application/json; charset=utf-8",
594
+ "Transfer-Encoding": "chunked",
595
+ "Cache-Control": "no-cache",
596
+ Connection: "keep-alive"
597
+ });
598
+ res.flushHeaders();
599
+ if (req.contentType === "multipart/form-data") {
600
+ returnData = [await this.handleFormData(ctx)];
601
+ } else {
602
+ returnData = [{ json: bodyData }];
603
+ }
604
+ return {
605
+ workflowData: [ctx.helpers.returnJsonArray(returnData)],
606
+ noWebhookResponse: true
607
+ };
608
+ }
547
609
  if (req.contentType === "multipart/form-data") {
548
610
  returnData = [await this.handleFormData(ctx)];
549
611
  return {