@n8n/instance-ai 1.1.0 → 1.2.1

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 (373) hide show
  1. package/dist/agent/instance-agent.js +17 -45
  2. package/dist/agent/instance-agent.js.map +1 -1
  3. package/dist/agent/register-with-mastra.d.ts +1 -1
  4. package/dist/agent/register-with-mastra.js +5 -9
  5. package/dist/agent/register-with-mastra.js.map +1 -1
  6. package/dist/agent/sub-agent-briefing.d.ts +20 -0
  7. package/dist/agent/sub-agent-briefing.js +39 -0
  8. package/dist/agent/sub-agent-briefing.js.map +1 -0
  9. package/dist/agent/sub-agent-debriefing.d.ts +71 -0
  10. package/dist/agent/sub-agent-debriefing.js +39 -0
  11. package/dist/agent/sub-agent-debriefing.js.map +1 -0
  12. package/dist/agent/sub-agent-factory.d.ts +1 -1
  13. package/dist/agent/sub-agent-factory.js +15 -3
  14. package/dist/agent/sub-agent-factory.js.map +1 -1
  15. package/dist/agent/system-prompt.d.ts +1 -0
  16. package/dist/agent/system-prompt.js +67 -43
  17. package/dist/agent/system-prompt.js.map +1 -1
  18. package/dist/agent/tool-access.d.ts +2 -0
  19. package/dist/agent/tool-access.js +28 -0
  20. package/dist/agent/tool-access.js.map +1 -0
  21. package/dist/build.tsbuildinfo +1 -1
  22. package/dist/domain-access/domain-gating.d.ts +1 -0
  23. package/dist/domain-access/domain-gating.js +3 -0
  24. package/dist/domain-access/domain-gating.js.map +1 -1
  25. package/dist/index.d.ts +5 -3
  26. package/dist/index.js +13 -4
  27. package/dist/index.js.map +1 -1
  28. package/dist/memory/memory-config.js +1 -3
  29. package/dist/memory/memory-config.js.map +1 -1
  30. package/dist/parsers/structured-file-parser.d.ts +56 -0
  31. package/dist/parsers/structured-file-parser.js +354 -0
  32. package/dist/parsers/structured-file-parser.js.map +1 -0
  33. package/dist/planned-tasks/planned-task-service.js +6 -0
  34. package/dist/planned-tasks/planned-task-service.js.map +1 -1
  35. package/dist/runtime/background-task-manager.d.ts +2 -1
  36. package/dist/runtime/background-task-manager.js +13 -1
  37. package/dist/runtime/background-task-manager.js.map +1 -1
  38. package/dist/runtime/resumable-stream-executor.d.ts +6 -3
  39. package/dist/runtime/resumable-stream-executor.js +66 -119
  40. package/dist/runtime/resumable-stream-executor.js.map +1 -1
  41. package/dist/runtime/stream-runner.d.ts +2 -2
  42. package/dist/runtime/stream-runner.js +4 -25
  43. package/dist/runtime/stream-runner.js.map +1 -1
  44. package/dist/stream/consume-with-hitl.d.ts +4 -1
  45. package/dist/stream/consume-with-hitl.js +11 -2
  46. package/dist/stream/consume-with-hitl.js.map +1 -1
  47. package/dist/stream/map-chunk.d.ts +1 -1
  48. package/dist/stream/map-chunk.js +20 -15
  49. package/dist/stream/map-chunk.js.map +1 -1
  50. package/dist/stream/work-summary-accumulator.d.ts +63 -0
  51. package/dist/stream/work-summary-accumulator.js +66 -0
  52. package/dist/stream/work-summary-accumulator.js.map +1 -0
  53. package/dist/tools/attachments/parse-file.tool.d.ts +90 -0
  54. package/dist/tools/attachments/parse-file.tool.js +135 -0
  55. package/dist/tools/attachments/parse-file.tool.js.map +1 -0
  56. package/dist/tools/best-practices/get-best-practices.tool.d.ts +6 -9
  57. package/dist/tools/best-practices/get-best-practices.tool.js +7 -5
  58. package/dist/tools/best-practices/get-best-practices.tool.js.map +1 -1
  59. package/dist/tools/best-practices/index.js +5 -29
  60. package/dist/tools/best-practices/index.js.map +1 -1
  61. package/dist/tools/best-practices/techniques.d.ts +1 -20
  62. package/dist/tools/best-practices/techniques.js +3 -36
  63. package/dist/tools/best-practices/techniques.js.map +1 -1
  64. package/dist/tools/credentials/delete-credential.tool.d.ts +13 -14
  65. package/dist/tools/credentials/delete-credential.tool.js +18 -11
  66. package/dist/tools/credentials/delete-credential.tool.js.map +1 -1
  67. package/dist/tools/credentials/get-credential.tool.d.ts +8 -2
  68. package/dist/tools/credentials/get-credential.tool.js +13 -7
  69. package/dist/tools/credentials/get-credential.tool.js.map +1 -1
  70. package/dist/tools/credentials/list-credentials.tool.d.ts +13 -3
  71. package/dist/tools/credentials/list-credentials.tool.js +50 -8
  72. package/dist/tools/credentials/list-credentials.tool.js.map +1 -1
  73. package/dist/tools/credentials/search-credential-types.tool.d.ts +7 -3
  74. package/dist/tools/credentials/search-credential-types.tool.js +7 -5
  75. package/dist/tools/credentials/search-credential-types.tool.js.map +1 -1
  76. package/dist/tools/credentials/setup-credentials.tool.d.ts +40 -44
  77. package/dist/tools/credentials/setup-credentials.tool.js +37 -31
  78. package/dist/tools/credentials/setup-credentials.tool.js.map +1 -1
  79. package/dist/tools/credentials/test-credential.tool.d.ts +7 -4
  80. package/dist/tools/credentials/test-credential.tool.js +5 -3
  81. package/dist/tools/credentials/test-credential.tool.js.map +1 -1
  82. package/dist/tools/data-tables/add-data-table-column.tool.d.ts +15 -19
  83. package/dist/tools/data-tables/add-data-table-column.tool.js +16 -9
  84. package/dist/tools/data-tables/add-data-table-column.tool.js.map +1 -1
  85. package/dist/tools/data-tables/create-data-table.tool.d.ts +26 -24
  86. package/dist/tools/data-tables/create-data-table.tool.js +49 -22
  87. package/dist/tools/data-tables/create-data-table.tool.js.map +1 -1
  88. package/dist/tools/data-tables/delete-data-table-column.tool.d.ts +13 -14
  89. package/dist/tools/data-tables/delete-data-table-column.tool.js +15 -8
  90. package/dist/tools/data-tables/delete-data-table-column.tool.js.map +1 -1
  91. package/dist/tools/data-tables/delete-data-table-rows.tool.d.ts +49 -15
  92. package/dist/tools/data-tables/delete-data-table-rows.tool.js +25 -9
  93. package/dist/tools/data-tables/delete-data-table-rows.tool.js.map +1 -1
  94. package/dist/tools/data-tables/delete-data-table.tool.d.ts +11 -14
  95. package/dist/tools/data-tables/delete-data-table.tool.js +17 -9
  96. package/dist/tools/data-tables/delete-data-table.tool.js.map +1 -1
  97. package/dist/tools/data-tables/get-data-table-schema.tool.d.ts +7 -8
  98. package/dist/tools/data-tables/get-data-table-schema.tool.js +5 -3
  99. package/dist/tools/data-tables/get-data-table-schema.tool.js.map +1 -1
  100. package/dist/tools/data-tables/insert-data-table-rows.tool.d.ts +14 -15
  101. package/dist/tools/data-tables/insert-data-table-rows.tool.js +22 -12
  102. package/dist/tools/data-tables/insert-data-table-rows.tool.js.map +1 -1
  103. package/dist/tools/data-tables/list-data-tables.tool.d.ts +7 -3
  104. package/dist/tools/data-tables/list-data-tables.tool.js +8 -6
  105. package/dist/tools/data-tables/list-data-tables.tool.js.map +1 -1
  106. package/dist/tools/data-tables/query-data-table-rows.tool.d.ts +49 -8
  107. package/dist/tools/data-tables/query-data-table-rows.tool.js +14 -12
  108. package/dist/tools/data-tables/query-data-table-rows.tool.js.map +1 -1
  109. package/dist/tools/data-tables/rename-data-table-column.tool.d.ts +15 -14
  110. package/dist/tools/data-tables/rename-data-table-column.tool.js +16 -9
  111. package/dist/tools/data-tables/rename-data-table-column.tool.js.map +1 -1
  112. package/dist/tools/data-tables/update-data-table-rows.tool.d.ts +51 -14
  113. package/dist/tools/data-tables/update-data-table-rows.tool.js +19 -9
  114. package/dist/tools/data-tables/update-data-table-rows.tool.js.map +1 -1
  115. package/dist/tools/executions/debug-execution.tool.d.ts +8 -2
  116. package/dist/tools/executions/debug-execution.tool.js +5 -3
  117. package/dist/tools/executions/debug-execution.tool.js.map +1 -1
  118. package/dist/tools/executions/get-execution.tool.d.ts +8 -2
  119. package/dist/tools/executions/get-execution.tool.js +5 -3
  120. package/dist/tools/executions/get-execution.tool.js.map +1 -1
  121. package/dist/tools/executions/get-node-output.tool.d.ts +14 -2
  122. package/dist/tools/executions/get-node-output.tool.js +14 -17
  123. package/dist/tools/executions/get-node-output.tool.js.map +1 -1
  124. package/dist/tools/executions/list-executions.tool.d.ts +11 -3
  125. package/dist/tools/executions/list-executions.tool.js +16 -14
  126. package/dist/tools/executions/list-executions.tool.js.map +1 -1
  127. package/dist/tools/executions/run-workflow.tool.d.ts +17 -15
  128. package/dist/tools/executions/run-workflow.tool.js +35 -25
  129. package/dist/tools/executions/run-workflow.tool.js.map +1 -1
  130. package/dist/tools/executions/stop-execution.tool.d.ts +7 -4
  131. package/dist/tools/executions/stop-execution.tool.js +8 -3
  132. package/dist/tools/executions/stop-execution.tool.js.map +1 -1
  133. package/dist/tools/filesystem/create-tools-from-mcp-server.js +2 -1
  134. package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
  135. package/dist/tools/index.d.ts +67 -2380
  136. package/dist/tools/index.js +9 -15
  137. package/dist/tools/index.js.map +1 -1
  138. package/dist/tools/nodes/explore-node-resources.tool.d.ts +23 -10
  139. package/dist/tools/nodes/explore-node-resources.tool.js +27 -25
  140. package/dist/tools/nodes/explore-node-resources.tool.js.map +1 -1
  141. package/dist/tools/nodes/get-node-description.tool.d.ts +7 -20
  142. package/dist/tools/nodes/get-node-description.tool.js +5 -3
  143. package/dist/tools/nodes/get-node-description.tool.js.map +1 -1
  144. package/dist/tools/nodes/get-node-type-definition.tool.d.ts +29 -6
  145. package/dist/tools/nodes/get-node-type-definition.tool.js +9 -7
  146. package/dist/tools/nodes/get-node-type-definition.tool.js.map +1 -1
  147. package/dist/tools/nodes/get-suggested-nodes.tool.d.ts +7 -12
  148. package/dist/tools/nodes/get-suggested-nodes.tool.js +9 -7
  149. package/dist/tools/nodes/get-suggested-nodes.tool.js.map +1 -1
  150. package/dist/tools/nodes/list-nodes.tool.d.ts +7 -3
  151. package/dist/tools/nodes/list-nodes.tool.js +8 -6
  152. package/dist/tools/nodes/list-nodes.tool.js.map +1 -1
  153. package/dist/tools/nodes/node-search-engine.d.ts +1 -0
  154. package/dist/tools/nodes/node-search-engine.js +12 -9
  155. package/dist/tools/nodes/node-search-engine.js.map +1 -1
  156. package/dist/tools/nodes/search-nodes.tool.d.ts +12 -24
  157. package/dist/tools/nodes/search-nodes.tool.js +21 -17
  158. package/dist/tools/nodes/search-nodes.tool.js.map +1 -1
  159. package/dist/tools/orchestration/add-plan-item.tool.d.ts +5 -0
  160. package/dist/tools/orchestration/add-plan-item.tool.js +91 -0
  161. package/dist/tools/orchestration/add-plan-item.tool.js.map +1 -0
  162. package/dist/tools/orchestration/blueprint-accumulator.d.ts +50 -0
  163. package/dist/tools/orchestration/blueprint-accumulator.js +215 -0
  164. package/dist/tools/orchestration/blueprint-accumulator.js.map +1 -0
  165. package/dist/tools/orchestration/blueprint.schema.d.ts +271 -0
  166. package/dist/tools/orchestration/blueprint.schema.js +61 -0
  167. package/dist/tools/orchestration/blueprint.schema.js.map +1 -0
  168. package/dist/tools/orchestration/browser-credential-setup.tool.d.ts +15 -12
  169. package/dist/tools/orchestration/browser-credential-setup.tool.js +26 -21
  170. package/dist/tools/orchestration/browser-credential-setup.tool.js.map +1 -1
  171. package/dist/tools/orchestration/build-workflow-agent.prompt.d.ts +1 -1
  172. package/dist/tools/orchestration/build-workflow-agent.prompt.js +43 -149
  173. package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +1 -1
  174. package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +11 -4
  175. package/dist/tools/orchestration/build-workflow-agent.tool.js +50 -82
  176. package/dist/tools/orchestration/build-workflow-agent.tool.js.map +1 -1
  177. package/dist/tools/orchestration/cancel-background-task.tool.d.ts +7 -3
  178. package/dist/tools/orchestration/cancel-background-task.tool.js +5 -3
  179. package/dist/tools/orchestration/cancel-background-task.tool.js.map +1 -1
  180. package/dist/tools/orchestration/correct-background-task.tool.d.ts +9 -3
  181. package/dist/tools/orchestration/correct-background-task.tool.js +8 -6
  182. package/dist/tools/orchestration/correct-background-task.tool.js.map +1 -1
  183. package/dist/tools/orchestration/data-table-agent.prompt.d.ts +1 -1
  184. package/dist/tools/orchestration/data-table-agent.prompt.js +20 -0
  185. package/dist/tools/orchestration/data-table-agent.prompt.js.map +1 -1
  186. package/dist/tools/orchestration/data-table-agent.tool.d.ts +9 -4
  187. package/dist/tools/orchestration/data-table-agent.tool.js +22 -25
  188. package/dist/tools/orchestration/data-table-agent.tool.js.map +1 -1
  189. package/dist/tools/orchestration/delegate.schemas.d.ts +12 -0
  190. package/dist/tools/orchestration/delegate.schemas.js +17 -0
  191. package/dist/tools/orchestration/delegate.schemas.js.map +1 -1
  192. package/dist/tools/orchestration/delegate.tool.d.ts +1 -10
  193. package/dist/tools/orchestration/delegate.tool.js +40 -41
  194. package/dist/tools/orchestration/delegate.tool.js.map +1 -1
  195. package/dist/tools/orchestration/plan-agent-prompt.d.ts +1 -0
  196. package/dist/tools/orchestration/plan-agent-prompt.js +76 -0
  197. package/dist/tools/orchestration/plan-agent-prompt.js.map +1 -0
  198. package/dist/tools/orchestration/plan-with-agent.tool.d.ts +2 -0
  199. package/dist/tools/orchestration/plan-with-agent.tool.js +277 -0
  200. package/dist/tools/orchestration/plan-with-agent.tool.js.map +1 -0
  201. package/dist/tools/orchestration/plan.tool.d.ts +7 -39
  202. package/dist/tools/orchestration/plan.tool.js +15 -13
  203. package/dist/tools/orchestration/plan.tool.js.map +1 -1
  204. package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +23 -3
  205. package/dist/tools/orchestration/report-verification-verdict.tool.js +27 -28
  206. package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
  207. package/dist/tools/orchestration/research-with-agent.tool.d.ts +11 -4
  208. package/dist/tools/orchestration/research-with-agent.tool.js +25 -21
  209. package/dist/tools/orchestration/research-with-agent.tool.js.map +1 -1
  210. package/dist/tools/orchestration/submit-plan.tool.d.ts +3 -0
  211. package/dist/tools/orchestration/submit-plan.tool.js +81 -0
  212. package/dist/tools/orchestration/submit-plan.tool.js.map +1 -0
  213. package/dist/tools/orchestration/update-tasks.tool.d.ts +1 -9
  214. package/dist/tools/orchestration/update-tasks.tool.js.map +1 -1
  215. package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +13 -7
  216. package/dist/tools/orchestration/verify-built-workflow.tool.js +14 -15
  217. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  218. package/dist/tools/shared/ask-user.tool.d.ts +42 -31
  219. package/dist/tools/shared/ask-user.tool.js +16 -15
  220. package/dist/tools/shared/ask-user.tool.js.map +1 -1
  221. package/dist/tools/templates/search-template-parameters.tool.d.ts +14 -7
  222. package/dist/tools/templates/search-template-parameters.tool.js +17 -15
  223. package/dist/tools/templates/search-template-parameters.tool.js.map +1 -1
  224. package/dist/tools/templates/search-template-structures.tool.d.ts +11 -8
  225. package/dist/tools/templates/search-template-structures.tool.js +13 -11
  226. package/dist/tools/templates/search-template-structures.tool.js.map +1 -1
  227. package/dist/tools/web-research/fetch-url.tool.d.ts +9 -23
  228. package/dist/tools/web-research/fetch-url.tool.js +30 -14
  229. package/dist/tools/web-research/fetch-url.tool.js.map +1 -1
  230. package/dist/tools/web-research/web-search.tool.d.ts +12 -2
  231. package/dist/tools/web-research/web-search.tool.js +20 -18
  232. package/dist/tools/web-research/web-search.tool.js.map +1 -1
  233. package/dist/tools/workflows/apply-workflow-credentials.tool.d.ts +11 -5
  234. package/dist/tools/workflows/apply-workflow-credentials.tool.js +7 -5
  235. package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
  236. package/dist/tools/workflows/build-workflow.tool.d.ts +26 -5
  237. package/dist/tools/workflows/build-workflow.tool.js +23 -20
  238. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  239. package/dist/tools/workflows/delete-workflow.tool.d.ts +13 -14
  240. package/dist/tools/workflows/delete-workflow.tool.js +15 -11
  241. package/dist/tools/workflows/delete-workflow.tool.js.map +1 -1
  242. package/dist/tools/workflows/get-workflow-as-code.tool.d.ts +6 -10
  243. package/dist/tools/workflows/get-workflow-as-code.tool.js +5 -3
  244. package/dist/tools/workflows/get-workflow-as-code.tool.js.map +1 -1
  245. package/dist/tools/workflows/get-workflow-version.tool.d.ts +8 -16
  246. package/dist/tools/workflows/get-workflow-version.tool.js +6 -4
  247. package/dist/tools/workflows/get-workflow-version.tool.js.map +1 -1
  248. package/dist/tools/workflows/get-workflow.tool.d.ts +7 -15
  249. package/dist/tools/workflows/get-workflow.tool.js +5 -3
  250. package/dist/tools/workflows/get-workflow.tool.js.map +1 -1
  251. package/dist/tools/workflows/list-workflow-versions.tool.d.ts +11 -3
  252. package/dist/tools/workflows/list-workflow-versions.tool.js +13 -11
  253. package/dist/tools/workflows/list-workflow-versions.tool.js.map +1 -1
  254. package/dist/tools/workflows/list-workflows.tool.d.ts +9 -10
  255. package/dist/tools/workflows/list-workflows.tool.js +12 -10
  256. package/dist/tools/workflows/list-workflows.tool.js.map +1 -1
  257. package/dist/tools/workflows/materialize-node-type.tool.d.ts +29 -11
  258. package/dist/tools/workflows/materialize-node-type.tool.js +9 -7
  259. package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
  260. package/dist/tools/workflows/publish-workflow.tool.d.ts +6 -20
  261. package/dist/tools/workflows/publish-workflow.tool.js +29 -24
  262. package/dist/tools/workflows/publish-workflow.tool.js.map +1 -1
  263. package/dist/tools/workflows/restore-workflow-version.tool.d.ts +13 -15
  264. package/dist/tools/workflows/restore-workflow-version.tool.js +15 -8
  265. package/dist/tools/workflows/restore-workflow-version.tool.js.map +1 -1
  266. package/dist/tools/workflows/setup-workflow.service.d.ts +0 -1
  267. package/dist/tools/workflows/setup-workflow.service.js +23 -6
  268. package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
  269. package/dist/tools/workflows/setup-workflow.tool.d.ts +7 -144
  270. package/dist/tools/workflows/setup-workflow.tool.js +10 -14
  271. package/dist/tools/workflows/setup-workflow.tool.js.map +1 -1
  272. package/dist/tools/workflows/submit-workflow.tool.d.ts +12 -9
  273. package/dist/tools/workflows/submit-workflow.tool.js +15 -17
  274. package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
  275. package/dist/tools/workflows/unpublish-workflow.tool.d.ts +13 -15
  276. package/dist/tools/workflows/unpublish-workflow.tool.js +15 -11
  277. package/dist/tools/workflows/unpublish-workflow.tool.js.map +1 -1
  278. package/dist/tools/workflows/update-workflow-version.tool.d.ts +13 -3
  279. package/dist/tools/workflows/update-workflow-version.tool.js +12 -10
  280. package/dist/tools/workflows/update-workflow-version.tool.js.map +1 -1
  281. package/dist/tools/workflows/write-sandbox-file.tool.d.ts +9 -9
  282. package/dist/tools/workflows/write-sandbox-file.tool.js +8 -6
  283. package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
  284. package/dist/tools/workspace/cleanup-test-executions.tool.d.ts +15 -14
  285. package/dist/tools/workspace/cleanup-test-executions.tool.js +19 -15
  286. package/dist/tools/workspace/cleanup-test-executions.tool.js.map +1 -1
  287. package/dist/tools/workspace/create-folder.tool.d.ts +15 -16
  288. package/dist/tools/workspace/create-folder.tool.js +25 -12
  289. package/dist/tools/workspace/create-folder.tool.js.map +1 -1
  290. package/dist/tools/workspace/delete-folder.tool.d.ts +19 -14
  291. package/dist/tools/workspace/delete-folder.tool.js +24 -17
  292. package/dist/tools/workspace/delete-folder.tool.js.map +1 -1
  293. package/dist/tools/workspace/list-folders.tool.d.ts +7 -3
  294. package/dist/tools/workspace/list-folders.tool.js +5 -3
  295. package/dist/tools/workspace/list-folders.tool.js.map +1 -1
  296. package/dist/tools/workspace/list-projects.tool.d.ts +3 -3
  297. package/dist/tools/workspace/list-projects.tool.js +3 -1
  298. package/dist/tools/workspace/list-projects.tool.js.map +1 -1
  299. package/dist/tools/workspace/list-tags.tool.d.ts +3 -6
  300. package/dist/tools/workspace/list-tags.tool.js +3 -1
  301. package/dist/tools/workspace/list-tags.tool.js.map +1 -1
  302. package/dist/tools/workspace/move-workflow-to-folder.tool.d.ts +17 -14
  303. package/dist/tools/workspace/move-workflow-to-folder.tool.js +20 -16
  304. package/dist/tools/workspace/move-workflow-to-folder.tool.js.map +1 -1
  305. package/dist/tools/workspace/tag-workflow.tool.d.ts +15 -14
  306. package/dist/tools/workspace/tag-workflow.tool.js +16 -12
  307. package/dist/tools/workspace/tag-workflow.tool.js.map +1 -1
  308. package/dist/tracing/langsmith-tracing.d.ts +1 -0
  309. package/dist/tracing/langsmith-tracing.js +47 -57
  310. package/dist/tracing/langsmith-tracing.js.map +1 -1
  311. package/dist/types.d.ts +24 -50
  312. package/dist/utils/eval-agents.d.ts +10 -0
  313. package/dist/utils/eval-agents.js +54 -0
  314. package/dist/utils/eval-agents.js.map +1 -0
  315. package/dist/workflow-builder/sdk-prompt-sections.d.ts +1 -4
  316. package/dist/workflow-builder/sdk-prompt-sections.js +5 -513
  317. package/dist/workflow-builder/sdk-prompt-sections.js.map +1 -1
  318. package/dist/workflow-loop/guidance.js +3 -5
  319. package/dist/workflow-loop/guidance.js.map +1 -1
  320. package/dist/workspace/daytona-filesystem.js +15 -1
  321. package/dist/workspace/daytona-filesystem.js.map +1 -1
  322. package/package.json +15 -9
  323. package/dist/memory/working-memory-template.d.ts +0 -1
  324. package/dist/memory/working-memory-template.js +0 -25
  325. package/dist/memory/working-memory-template.js.map +0 -1
  326. package/dist/runtime/working-memory-tracing.d.ts +0 -19
  327. package/dist/runtime/working-memory-tracing.js +0 -111
  328. package/dist/runtime/working-memory-tracing.js.map +0 -1
  329. package/dist/tools/best-practices/guides/chatbot.d.ts +0 -1
  330. package/dist/tools/best-practices/guides/chatbot.js +0 -111
  331. package/dist/tools/best-practices/guides/chatbot.js.map +0 -1
  332. package/dist/tools/best-practices/guides/content-generation.d.ts +0 -1
  333. package/dist/tools/best-practices/guides/content-generation.js +0 -108
  334. package/dist/tools/best-practices/guides/content-generation.js.map +0 -1
  335. package/dist/tools/best-practices/guides/data-extraction.d.ts +0 -1
  336. package/dist/tools/best-practices/guides/data-extraction.js +0 -115
  337. package/dist/tools/best-practices/guides/data-extraction.js.map +0 -1
  338. package/dist/tools/best-practices/guides/data-persistence.d.ts +0 -1
  339. package/dist/tools/best-practices/guides/data-persistence.js +0 -198
  340. package/dist/tools/best-practices/guides/data-persistence.js.map +0 -1
  341. package/dist/tools/best-practices/guides/data-transformation.d.ts +0 -1
  342. package/dist/tools/best-practices/guides/data-transformation.js +0 -139
  343. package/dist/tools/best-practices/guides/data-transformation.js.map +0 -1
  344. package/dist/tools/best-practices/guides/document-processing.d.ts +0 -1
  345. package/dist/tools/best-practices/guides/document-processing.js +0 -326
  346. package/dist/tools/best-practices/guides/document-processing.js.map +0 -1
  347. package/dist/tools/best-practices/guides/form-input.d.ts +0 -1
  348. package/dist/tools/best-practices/guides/form-input.js +0 -166
  349. package/dist/tools/best-practices/guides/form-input.js.map +0 -1
  350. package/dist/tools/best-practices/guides/notification.d.ts +0 -1
  351. package/dist/tools/best-practices/guides/notification.js +0 -128
  352. package/dist/tools/best-practices/guides/notification.js.map +0 -1
  353. package/dist/tools/best-practices/guides/scheduling.d.ts +0 -1
  354. package/dist/tools/best-practices/guides/scheduling.js +0 -145
  355. package/dist/tools/best-practices/guides/scheduling.js.map +0 -1
  356. package/dist/tools/best-practices/guides/scraping-and-research.d.ts +0 -1
  357. package/dist/tools/best-practices/guides/scraping-and-research.js +0 -151
  358. package/dist/tools/best-practices/guides/scraping-and-research.js.map +0 -1
  359. package/dist/tools/best-practices/guides/triage.d.ts +0 -1
  360. package/dist/tools/best-practices/guides/triage.js +0 -142
  361. package/dist/tools/best-practices/guides/triage.js.map +0 -1
  362. package/dist/tools/filesystem/get-file-tree.tool.d.ts +0 -22
  363. package/dist/tools/filesystem/get-file-tree.tool.js +0 -64
  364. package/dist/tools/filesystem/get-file-tree.tool.js.map +0 -1
  365. package/dist/tools/filesystem/list-files.tool.d.ts +0 -30
  366. package/dist/tools/filesystem/list-files.tool.js +0 -100
  367. package/dist/tools/filesystem/list-files.tool.js.map +0 -1
  368. package/dist/tools/filesystem/read-file.tool.d.ts +0 -25
  369. package/dist/tools/filesystem/read-file.tool.js +0 -83
  370. package/dist/tools/filesystem/read-file.tool.js.map +0 -1
  371. package/dist/tools/filesystem/search-files.tool.d.ts +0 -31
  372. package/dist/tools/filesystem/search-files.tool.js +0 -96
  373. package/dist/tools/filesystem/search-files.tool.js.map +0 -1
@@ -1,166 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDocumentation = getDocumentation;
4
- function getDocumentation() {
5
- return `# Best Practices: Form Input Workflows
6
-
7
- ## Workflow Design
8
-
9
- ### Critical: Always Store Raw Form Data
10
-
11
- ALWAYS store raw form responses to a persistent data storage destination even if the primary purpose of the workflow is
12
- to trigger another action (like sending to an API or triggering a notification). This allows users to monitor
13
- form responses as part of the administration of their workflow.
14
-
15
- Required storage destinations include:
16
- - Google Sheets node
17
- - Airtable node
18
- - n8n Data Tables
19
- - PostgreSQL/MySQL/MongoDB nodes
20
- - Any other database or spreadsheet service
21
-
22
- IMPORTANT: Simply using Set or Merge nodes is NOT sufficient. These nodes only transform data in memory - they do not
23
- persist data. You must use an actual storage node (like Google Sheets, Airtable, or Data Tables) to write the data.
24
-
25
- Storage Requirements:
26
- - Store the un-edited user input immediately after the form steps are complete
27
- - Do not store only a summary or edited version of the user's inputs - store the raw data
28
- - For single-step forms: store immediately after the form trigger
29
- - For multi-step forms: store immediately after aggregating all steps with Set/Merge nodes
30
- - The storage node should appear in the workflow right after data collection/aggregation
31
-
32
- ## Message Attribution
33
-
34
- n8n forms attach the attribution "n8n workflow" to messages by default - you must disable this setting which will
35
- often be called "Append n8n Attribution" for the n8n form nodes, add this setting and set it to false.
36
-
37
- ## Multi-Step Forms
38
-
39
- Build multi-step forms by chaining multiple Form nodes together. Each Form node represents a page or step in your form
40
- sequence. Use the n8n Form Trigger node to start the workflow and display the first form page to the user.
41
-
42
- ## Data Collection & Aggregation
43
-
44
- Collect and merge all user responses from each form step before writing to your destination (e.g., Data Table). Use
45
- Set or Merge nodes to combine data as needed. Make sure your JSON keys match the column names in your destination for
46
- automatic mapping.
47
-
48
- ## Conditional Logic & Branching
49
-
50
- Use IF or Switch nodes to direct users to different form pages based on their previous answers. This enables dynamic
51
- form flows where the path changes based on user input, creating personalized form experiences.
52
-
53
- ## Dynamic Form Fields
54
-
55
- For forms that require dynamic options (e.g., dropdowns populated from an API or previous step), generate the form
56
- definition in a Code node and pass it to the Form node as JSON. You can define forms using JSON for dynamic or
57
- conditional fields, and even generate form fields dynamically using a Code node if needed.
58
-
59
- ## Input Validation
60
-
61
- Validate user input between steps to ensure data quality. If input is invalid, loop back to the relevant form step with
62
- an error message to guide the user to correct their submission. This prevents bad data from entering your system.
63
-
64
- ## Recommended Nodes
65
-
66
- ### n8n Form Trigger (n8n-nodes-base.formTrigger)
67
-
68
- Purpose: Starts the workflow and displays the first form page to the user
69
-
70
- Pitfalls:
71
-
72
- - Use the Production URL for live forms; the Test URL is for development and debugging only
73
- - Ensure the form trigger is properly configured before sharing URLs with users
74
-
75
- ### n8n Form (n8n-nodes-base.form)
76
-
77
- Purpose: Displays form pages in multi-step form sequences
78
-
79
- Pitfalls:
80
-
81
- - Each Form node represents one page/step in your form
82
- - You can define forms using JSON for dynamic or conditional fields
83
- - Generate form fields dynamically using a Code node if needed for complex scenarios
84
-
85
- ### Storage Nodes
86
-
87
- Purpose: Persist raw form data to a storage destination, preference should be for built-in n8n tables
88
- but use the most applicable node depending on the user's request.
89
-
90
- Required nodes (use at least one):
91
- - Data table (n8n-nodes-base.dataTable): Built-in n8n storage for quick setup - preferred
92
- - Google Sheets (n8n-nodes-base.googleSheets): Best for simple spreadsheet storage
93
- - Airtable (n8n-nodes-base.airtable): Best for structured database with relationships
94
- - Postgres (n8n-nodes-base.postgres) / MySQL (n8n-nodes-base.mySql) / MongoDB (n8n-nodes-base.mongoDb): For production database storage
95
-
96
- Pitfalls:
97
-
98
- - Every form workflow MUST include a storage node that actually writes data to a destination
99
- - Set and Merge nodes alone are NOT sufficient - they only transform data in memory
100
- - The storage node should be placed immediately after the form trigger (single-step) or after data aggregation (multi-step)
101
-
102
- ### Code (n8n-nodes-base.code)
103
-
104
- Purpose: Processes form data, generates dynamic form definitions, or implements custom validation logic
105
-
106
- ### Edit Fields (Set) (n8n-nodes-base.set)
107
-
108
- Purpose: Aggregates and transforms form data between steps (NOT for storage - use a storage node)
109
-
110
- ### Merge (n8n-nodes-base.merge)
111
-
112
- Purpose: Combines data from multiple form steps into a single dataset (NOT for storage - use a storage node)
113
-
114
- Pitfalls:
115
-
116
- - Ensure data from all form steps is properly merged before writing to destination
117
- - Use appropriate merge modes (append, merge by key, etc.) for your use case
118
- - Remember: Merge prepares data but does not store it - add a storage node after Merge
119
-
120
- ### If (n8n-nodes-base.if)
121
-
122
- Purpose: Routes users to different form pages based on their previous answers
123
-
124
- ### Switch (n8n-nodes-base.switch)
125
-
126
- Purpose: Implements multi-path conditional routing in complex forms
127
-
128
- Pitfalls:
129
-
130
- - Include a default case to handle unexpected input values
131
- - Keep routing logic clear and maintainable
132
-
133
- ## Common Pitfalls to Avoid
134
-
135
- ### Missing Raw Form Response Storage
136
-
137
- When building n8n forms it is recommended to always store the raw form response to some form of data storage (Googlesheets, Airtable, etc)
138
- for administration later. It is CRITICAL if you create a n8n form node that you store the raw output with a storage node.
139
-
140
- ### Data Loss in Multi-Step Forms
141
-
142
- Aggregate all form step data using Set/Merge nodes before writing to your destination. Failing to merge data from multiple steps
143
- can result in incomplete form submissions being stored. After merging, ensure you write the complete dataset to a storage node.
144
-
145
- ### Poor User Experience
146
-
147
- Use the Form Ending page type to show a completion message or redirect users after submission.
148
- Without a proper ending, users may be confused about whether their submission was successful.
149
-
150
- ### Invalid Data
151
-
152
- Implement validation between form steps to catch errors early. Without validation, invalid data can
153
- propagate through your workflow and corrupt your destination data.
154
-
155
- ### Complex Field Generation
156
-
157
- When generating dynamic form fields, ensure the JSON structure exactly matches what the Form
158
- node expects. Test thoroughly with the Test URL before going live.
159
-
160
- ### Mapping Errors
161
-
162
- When writing to Google Sheets or other destinations, ensure field names match exactly. Mismatched names
163
- will cause data to be written to wrong columns or fail entirely.
164
- `;
165
- }
166
- //# sourceMappingURL=form-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-input.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/form-input.ts"],"names":[],"mappings":";;AAAA,4CAiKC;AAjKD,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+JP,CAAC;AACF,CAAC"}
@@ -1 +0,0 @@
1
- export declare function getDocumentation(): string;
@@ -1,128 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDocumentation = getDocumentation;
4
- function getDocumentation() {
5
- return `# Best Practices: Notification Workflows
6
-
7
- ## Workflow Design
8
-
9
- Structure notification workflows in a clear sequence. Keep each part modular with nodes dedicated to specific purposes.
10
-
11
- \`\`\`mermaid
12
- graph LR
13
- A[Trigger] --> B[Data Retrieval/Processing]
14
- B --> C[Condition Check]
15
- C --> D[Notification Action]
16
- D --> E[Post-Notification: logging/tracking]
17
- \`\`\`
18
-
19
- Choose between event-based triggers (webhooks, form submissions, CRM events) for immediate notifications or scheduled triggers (Cron) for periodic condition monitoring.
20
-
21
- CRITICAL: Multi-channel notifications should branch from a single condition check to multiple notification nodes in parallel, not duplicate the entire workflow. This enables easy extension and maintenance.
22
-
23
- Example pattern:
24
- \`\`\`mermaid
25
- graph LR
26
- A[Webhook/Schedule Trigger] --> B[Fetch Data]
27
- B --> C[If: threshold exceeded]
28
- C -->|true| D[Email]
29
- C -->|true| E[Slack]
30
- C -->|true| F[SMS]
31
- C -->|false| G[End/Log]
32
- \`\`\`
33
- Result: Single workflow handles all channels efficiently with consistent logic
34
-
35
- ## Condition Logic & Filtering
36
-
37
- Use IF nodes for simple checks without code. For complex conditions (multiple fields, array filtering), use Code nodes to script the logic and filter items that need alerts.
38
-
39
- Always include empty notification prevention - check that alert-worthy items exist (items.length > 0) before proceeding to notification nodes. Route the false branch to end the workflow or log "no alert needed".
40
-
41
- ## Message Construction
42
-
43
- Use expressions to inject dynamic data into messages. The expression \`{{ $json.fieldName }}\` pulls data from input items.
44
-
45
- Format messages appropriately for each channel:
46
- - Email: Support HTML or plain text, use clear subject lines
47
- - Slack: Use markdown-like formatting, \\n for newlines
48
- - SMS: Keep concise due to character limits, plain text only
49
-
50
- ## Alert Management
51
-
52
- Consider alert aggregation - send one message listing multiple items rather than individual alerts.
53
-
54
- Add logging nodes to track sent notifications for audit trails and duplicate prevention. Consider using error handling paths with Continue on Fail settings for redundancy.
55
-
56
- ## Recommended Nodes
57
-
58
- ### Trigger Nodes
59
-
60
- **Service-specific triggers** (e.g., n8n-nodes-base.googleSheetsTrigger, n8n-nodes-base.crmTrigger):
61
- - Purpose: Direct integration with specific services for event-based notifications
62
- - Use cases: New row in Google Sheets, CRM record updates
63
- - When to use: When specific trigger node is available
64
-
65
- **Webhook** (n8n-nodes-base.webhook):
66
- - Purpose: Event-based notifications triggered by external systems
67
- - Use cases: Form submissions, CRM events, API webhooks
68
- - When to use: When there is no dedicated trigger node and external service supports webhooks
69
-
70
- **Schedule Trigger** (n8n-nodes-base.scheduleTrigger):
71
- - Purpose: Periodic monitoring and batch notifications
72
- - Use cases: Daily reports, threshold monitoring, scheduled alerts
73
- - When to use: For regular checks rather than immediate alerts, or as a polling mechanism when webhooks are not available
74
-
75
- **Form Trigger** (n8n-nodes-base.formTrigger):
76
- - Purpose: User-submitted data triggering notifications
77
- - Use cases: Contact forms, feedback submissions
78
- - When to use: For workflows initiated by user input via forms
79
-
80
- ### Notification Nodes
81
-
82
- **Send Email** (n8n-nodes-base.emailSend):
83
- - Purpose: Detailed alerts with attachments and HTML formatting
84
- - Use cases: Reports, detailed notifications, formal communications
85
- - Configuration: SMTP settings, use App Passwords for Gmail
86
- - Best practice: Use clear subject lines with key information
87
-
88
- **Slack** (n8n-nodes-base.slack):
89
- - Purpose: Team notifications in channels or direct messages
90
- - Use cases: Team alerts, status updates, incident notifications
91
- - Configuration: Bot token with chat:write scope, bot must be invited to channel
92
- - Best practice: Use markdown formatting, channel IDs (starting with C) not names
93
-
94
- **Telegram** (n8n-nodes-base.telegram):
95
- - Purpose: Instant messaging alerts to individuals or groups
96
- - Use cases: Personal notifications, bot interactions
97
- - Configuration: Bot token from BotFather
98
- - Best practice: Use chat ID for direct messages
99
-
100
- **Twilio** (n8n-nodes-base.twilio):
101
- - Purpose: SMS/WhatsApp critical alerts
102
- - Use cases: High-priority alerts, two-factor authentication, critical incidents
103
- - Configuration: Account SID, Auth Token, verified phone numbers
104
- - Best practice: Keep messages concise, use international format (+1234567890)
105
-
106
- **HTTP Request** (n8n-nodes-base.httpRequest):
107
- - Purpose: Custom webhooks (Microsoft Teams, Discord, custom APIs)
108
- - Use cases: Integration with services without dedicated nodes
109
-
110
- ### Logic & Processing
111
-
112
- **IF** (n8n-nodes-base.if):
113
- - Purpose: Simple threshold checks and condition routing
114
- - Use cases: Check if notification criteria met
115
- - Best practice: Include empty notification prevention (items.length > 0)
116
-
117
- **Switch** (n8n-nodes-base.switch):
118
- - Purpose: Route notifications based on severity/type
119
- - Use cases: Different channels for different alert levels
120
- - Best practice: Always define Default case for unexpected values
121
-
122
- **Set** (n8n-nodes-base.set):
123
- - Purpose: Prepare alert messages and structure data
124
- - Use cases: Format notification content, add metadata
125
- - Best practice: Use to centralize message construction logic
126
- `;
127
- }
128
- //# sourceMappingURL=notification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/notification.ts"],"names":[],"mappings":";;AAAA,4CA2HC;AA3HD,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHP,CAAC;AACF,CAAC"}
@@ -1 +0,0 @@
1
- export declare function getDocumentation(): string;
@@ -1,145 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDocumentation = getDocumentation;
4
- function getDocumentation() {
5
- return `# Best Practices: Scheduling Workflows
6
-
7
- ## Workflow Design
8
-
9
- Structure scheduled workflows to perform focused, well-defined tasks.
10
-
11
- For recurring tasks, use Schedule Trigger node with clear naming (e.g., "Daily 08:00 Trigger", "Every 6h Cron").
12
-
13
- Prevent overlapping executions by ensuring worst-case execution time < schedule interval. For frequent schedules, implement mutex/lock mechanisms using external systems if needed.
14
-
15
- ## Scheduling Patterns
16
-
17
- ### Recurring Schedules
18
-
19
- Use Schedule Trigger in two modes:
20
- - **Interval Mode**: User-friendly dropdowns for common schedules (every X minutes, daily at 09:00, weekly on Mondays)
21
- - **Cron Expression Mode**: Complex patterns using 5-field syntax (m h dom mon dow) with optional seconds field. Example: \`0 9 * * 1\` triggers every Monday at 09:00
22
-
23
- Multiple schedules can be combined in single Schedule Trigger node using multiple Trigger Rules. Useful when same logic applies to different timings.
24
-
25
- ### One-Time Events
26
-
27
- For event-relative scheduling, use Wait node to pause workflow until specified time/date.
28
-
29
- Note: Cron expressions with specific dates (e.g., \`0 12 22 10 *\` for Oct 22 at 12:00) will repeat annually on that date.
30
-
31
- ### Conditional Scheduling
32
-
33
- PREFER conditional logic over complex cron expressions. Use IF/Switch nodes after Schedule Trigger for runtime conditions:
34
- - Check if today is last day of month before running monthly reports
35
- - Skip execution on holidays by checking against a holiday list in a data table
36
- - Route to "weekday" vs "weekend" processing based on current day
37
-
38
- This approach is more readable and maintainable than complex cron patterns.
39
-
40
- ## Time Zone Handling
41
-
42
- When building scheduled workflows:
43
- - If user specifies a timezone, set it in the Schedule Trigger node's timezone parameter
44
- - If user mentions times without timezone, use the schedule as specified (instance default will apply)
45
- - For Wait nodes, be aware they use server system time, not workflow timezone
46
-
47
- ## Recommended Nodes
48
-
49
- ### Schedule Trigger (n8n-nodes-base.scheduleTrigger)
50
-
51
- Primary node for running workflows on schedule. Supports interval mode for simple schedules and cron mode for complex patterns.
52
-
53
- ### Wait (n8n-nodes-base.wait)
54
-
55
- Pause workflow execution until specified time or duration.
56
-
57
- Use Cases:
58
- - Delay actions relative to events
59
- - One-off timers per data item
60
- - Follow-up actions after specific duration
61
-
62
- Best Practices:
63
- - Use n8n Data Tables for waits longer than 24 hours (store scheduled time, check periodically)
64
- - Avoid wait times longer than 7 days - use a polling pattern instead
65
-
66
- ### IF (n8n-nodes-base.if)
67
-
68
- Add conditional logic to scheduled workflows.
69
-
70
- Use Cases:
71
- - Check date conditions (last day of month using expression: \`{{ $now.day === $now.endOf('month').day }}\`)
72
- - Skip execution based on external data (e.g., holiday check)
73
- - Route to different actions conditionally
74
-
75
- Best Practices:
76
- - Enable "Convert types where required" for comparisons
77
- - Prefer IF nodes over complex cron expressions for readability
78
-
79
- ### Switch (n8n-nodes-base.switch)
80
-
81
- Multiple conditional branches for complex routing.
82
-
83
- Use Cases:
84
- - Different actions based on day of week (e.g., \`{{ $now.weekday }}\` returns 1-7)
85
- - Time-based routing (morning vs afternoon processing)
86
- - Multi-path conditional execution
87
-
88
- ### n8n Data Tables (n8n-nodes-base.n8nTables)
89
-
90
- Purpose: Store scheduling state and pending tasks
91
-
92
- Use Cases:
93
- - Track last execution time for catch-up logic
94
- - Store list of pending one-time tasks with scheduled times
95
- - Implement custom scheduling queue with polling
96
-
97
- Best Practices:
98
- - Query efficiently with proper filters
99
- - Clean up completed tasks periodically
100
-
101
- ## Common Pitfalls to Avoid
102
-
103
- ### Missed Schedules During Downtime
104
-
105
- **Problem**: Scheduled runs missed when n8n instance is down. No automatic catch-up for missed triggers.
106
-
107
- **Solution**: Design idempotent workflows with catch-up logic:
108
- - Store last successful run timestamp in n8n Data Tables
109
- - On each run, check if enough time has passed since last run
110
- - Example: For a task that should run once per 24 hours, schedule it every 4 hours but only execute if last run was >20 hours ago
111
-
112
- ### Overlapping Executions
113
-
114
- **Problem**: Next scheduled run starts before previous completes, causing race conditions or resource conflicts.
115
-
116
- **Solution**:
117
- - Increase interval to exceed worst-case execution time
118
- - Implement mutex/lock using n8n Data Tables (check/set "running" flag at start, clear at end)
119
- - Add execution check at workflow start
120
-
121
- ### Wait Node Timezone Confusion
122
-
123
- **Problem**: Wait node uses server system time, ignoring workflow timezone setting. Wait until "10:00" may not match expected timezone.
124
-
125
- **Solution**:
126
- - Account for server timezone when setting Wait times
127
- - Use relative durations (e.g., "wait 2 hours") instead of absolute times when possible
128
- - Prefer Schedule Trigger for timezone-aware scheduling
129
-
130
- ### First Execution Timing
131
-
132
- **Problem**: First execution after activation doesn't match expected schedule. Activation time affects next run calculation.
133
-
134
- **Solution**:
135
- - Use manual execution for immediate first run if needed
136
- - Understand that schedule recalculates from activation moment
137
-
138
- ### Cron Syntax
139
-
140
- n8n supports both 5-field and 6-field (with seconds) cron syntax. Use 6 fields if you want to specify seconds (e.g., prefix with 0 for seconds: \`0 0 9 * * *\` for 9 AM daily).
141
-
142
- For simple schedules, prefer Interval mode over cron for better readability.
143
- `;
144
- }
145
- //# sourceMappingURL=scheduling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scheduling.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/scheduling.ts"],"names":[],"mappings":";;AAAA,4CA4IC;AA5ID,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0IP,CAAC;AACF,CAAC"}
@@ -1 +0,0 @@
1
- export declare function getDocumentation(): string;
@@ -1,151 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDocumentation = getDocumentation;
4
- function getDocumentation() {
5
- return `# Best Practices: Scraping & Research Workflows
6
-
7
- ## Performance & Resource Management
8
-
9
- Batch requests and introduce delays to avoid hitting API rate limits or overloading target servers. Use Wait nodes and
10
- batching options in HTTP Request nodes. When 429 rate limiting errors occur due to receiving too many requests,
11
- implement batching to reduce request frequency or use the "Retry on Fail" feature to automatically handle throttled
12
- responses.
13
-
14
- Workflows processing large datasets can crash due to memory constraints. Use the Split In Batches node to process 200
15
- rows at a time to reduce memory usage, leverage built-in nodes instead of custom code, and increase execution timeouts
16
- via environment variables for better resource management.
17
-
18
- ## Looping & Pagination
19
-
20
- Implement robust looping for paginated data. Use Set, IF, and Code nodes to manage page numbers and loop conditions,
21
- ensuring you don't miss data or create infinite loops. Leverage n8n's built-in mechanisms rather than manual approaches:
22
- use the $runIndex variable to track iterations without additional code nodes, and employ workflow static data or node
23
- run indexes to maintain state across loop cycles.
24
-
25
- ## Recommended Nodes
26
-
27
- ### HTTP Request (n8n-nodes-base.httpRequest)
28
-
29
- Purpose: Fetches web pages or API data for scraping and research workflows
30
-
31
- Pitfalls:
32
-
33
- - Depending on the data which the user wishes to scrape/research, it maybe against the terms of service to attempt to
34
- fetch it from the site directly. Using scraping nodes is the best way to get around this
35
- - Double-check URL formatting, query parameters, and ensure all required fields are present to avoid bad request errors
36
- - Be aware of 429 rate limiting errors when the service receives too many requests - implement batching or use "Retry on
37
- Fail" feature
38
- - Refresh expired tokens, verify API keys, and ensure correct permissions to avoid authentication failures
39
-
40
- ### SerpAPI (@n8n/n8n-nodes-langchain.toolSerpApi)
41
-
42
- Purpose: Give an agent the ability to search for research materials and fact-checking results that have been retrieved
43
- from other sources.
44
-
45
- ### Perplexity (n8n-nodes-base.perplexityTool)
46
-
47
- Purpose: Give an agent the ability to search utilising Perplexity, a powerful tool for finding sources/material for
48
- generating reports and information.
49
-
50
- ### HTML Extract (n8n-nodes-base.htmlExtract)
51
-
52
- Purpose: Parses HTML and extracts data using CSS selectors for web scraping
53
-
54
- Pitfalls:
55
-
56
- - Some sites use JavaScript to render content, which may not be accessible via simple HTTP requests. Consider using
57
- browser automation tools or APIs if the HTML appears empty
58
- - Validate that the CSS selectors match the actual page structure to avoid extraction failures
59
-
60
- ### Split Out (n8n-nodes-base.splitOut)
61
-
62
- Purpose: Processes lists of items one by one for sequential operations
63
-
64
- Pitfalls:
65
- - Can cause performance issues with very large datasets - consider using Split In Batches instead
66
-
67
- ### Loop Over Items (Split in Batches) (n8n-nodes-base.splitInBatches)
68
-
69
- Purpose: Processes lists of items in batches to manage memory and performance
70
-
71
- Pitfalls:
72
- - Ensure proper loop configuration to avoid infinite loops or skipped data. The index 0
73
- (first connection) of the loop is treated as the done state, while the index 1 (second connection)
74
- is the connection that loops.
75
- - Use appropriate batch sizes (e.g., 200 rows) to balance memory usage and performance
76
-
77
- ### Edit Fields (Set) (n8n-nodes-base.set)
78
-
79
- Purpose: Manipulates data, sets variables for loop control and state management
80
-
81
- ### Code (n8n-nodes-base.code)
82
-
83
- Purpose: Implements custom logic for complex data transformations or pagination
84
-
85
- Pitfalls:
86
-
87
- - Prefer built-in nodes over custom code to reduce memory usage and improve maintainability
88
- - Avoid processing very large datasets in a single code execution - use batching
89
-
90
- ### If (n8n-nodes-base.if)
91
-
92
- Purpose: Adds conditional logic for error handling, loop control, or data filtering
93
-
94
- Pitfalls:
95
- - Validate expressions carefully to avoid unexpected branching behavior
96
-
97
- ### Wait (n8n-nodes-base.wait)
98
-
99
- Purpose: Introduces delays to respect rate limits and avoid overloading servers
100
-
101
- ### Data Tables (n8n-nodes-base.dataTable)
102
-
103
- Purpose: Stores scraped data in n8n's built-in persistent data storage
104
-
105
- ### Google Sheets (n8n-nodes-base.googleSheets)
106
-
107
- Purpose: Stores scraped data in spreadsheets for easy access and sharing
108
-
109
- ### Microsoft Excel 365 (n8n-nodes-base.microsoftExcel)
110
-
111
- Purpose: Stores scraped data in Excel files for offline analysis
112
-
113
- ### Airtable (n8n-nodes-base.airtable)
114
-
115
- Purpose: Saves structured data to a database with rich data types and relationships
116
-
117
- ### AI Agent (@n8n/n8n-nodes-langchain.agent)
118
-
119
- Purpose: For research, summarization, and advanced data extraction. AI agents can autonomously gather information
120
- from websites, analyze content, and organize findings into structured formats, integrating tools for web scraping,
121
- content analysis, and database storage
122
-
123
- ### Scraping Nodes
124
-
125
- - Phantombuster (n8n-nodes-base.phantombuster)
126
- - Apify (use HTTP Request or community node)
127
- - BrightData (use HTTP Request or community node)
128
-
129
- Purpose: If the user wishes to scrap data from sites like LinkedIn, Facebook, Instagram, Twitter/X, Indeed, Glassdoor
130
- or any other service similar to these large providers it is better to use a node designed for this. The scraping
131
- nodes provide access to these datasets while avoiding issues like rate limiting or breaking terms of service for
132
- sites like these.
133
-
134
- ## Common Pitfalls to Avoid
135
-
136
- Bad Request Errors: Double-check URL formatting, query parameters, and ensure all required fields are present to
137
- avoid 400 errors when making HTTP requests.
138
-
139
- Rate Limits: Use batching and Wait nodes to avoid 429 errors. When the service receives too many requests, implement
140
- batching to reduce request frequency or use the "Retry on Fail" feature.
141
-
142
- Memory Issues: Avoid processing very large datasets in a single run; use batching and increase server resources if
143
- needed. Use Split In Batches node to process 200 rows at a time, leverage built-in nodes instead of custom code, and
144
- increase execution timeouts via environment variables.
145
-
146
- Empty or Unexpected Data: Some sites use JavaScript to render content, which may not be accessible via simple HTTP
147
- requests. Standard HTTP and HTML parsing nodes fail because sites load data asynchronously via JavaScript, leaving the
148
- initial HTML empty of actual content. Web scraping nodes can be used to avoid this.
149
- `;
150
- }
151
- //# sourceMappingURL=scraping-and-research.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scraping-and-research.js","sourceRoot":"","sources":["../../../../src/tools/best-practices/guides/scraping-and-research.ts"],"names":[],"mappings":";;AAAA,4CAkJC;AAlJD,SAAgB,gBAAgB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgJP,CAAC;AACF,CAAC"}
@@ -1 +0,0 @@
1
- export declare function getDocumentation(): string;