n8n-editor-ui 1.112.1 → 1.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build/cache-marker +1 -0
- package/.build/node-popularity.json +3918 -0
- package/dist/assets/{AddDataStoreModal-C9lDhooH.js → AddDataStoreModal-BpBgou0E.js} +1 -1
- package/dist/assets/{AnimatedSpinner-DoiaSsyo.js → AnimatedSpinner-BVVzuhy8.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-C68foyxp.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-D9y_kml7.js} +1 -1
- package/dist/assets/{AuthView-CLDlKRpw.js → AuthView-DLJKQ74o.js} +2 -2
- package/dist/assets/{ChangePasswordView-iG7PgYdd.js → ChangePasswordView-BMWrkaiq.js} +3 -3
- package/dist/assets/CollectionParameter-Cb7K8toD.js +4 -0
- package/dist/assets/{ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-DlF8qxM5.js → ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-CgS2Cb5Q.js} +1 -1
- package/dist/assets/{CredentialsView-CYgIFP1z.js → CredentialsView-DHSg9xJ1.js} +10 -10
- package/dist/assets/{DataStoreActions.vue_vue_type_script_setup_true_lang-BC-HriQ3.js → DataStoreActions.vue_vue_type_script_setup_true_lang-C2Dn9B2o.js} +1 -1
- package/dist/assets/{DataStoreDetailsView-C8fMxukz.css → DataStoreDetailsView-Bc-J9ZrW.css} +224 -46
- package/dist/assets/{DataStoreDetailsView-CtMeAyyY.js → DataStoreDetailsView-yJ7Ifouw.js} +8117 -339
- package/dist/assets/{DataStoreView-D0R0E_jH.css → DataStoreView-BqQv7QeU.css} +10 -9
- package/dist/assets/{DataStoreView-B1Kxtjnl.js → DataStoreView-jb9J_g-Y.js} +35 -16
- package/dist/assets/{DemoFooter-BPQy7EdR.js → DemoFooter-BYvzzkpQ.js} +6 -6
- package/dist/assets/{EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-D9e3ObnE.js → EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-BfHfE-dU.js} +1 -1
- package/dist/assets/{EntityNotFound-DDHiVWRe.js → EntityNotFound-lPracI2m.js} +1 -1
- package/dist/assets/{EntityUnAuthorised-Clm3_4En.js → EntityUnAuthorised-zuygLqjz.js} +1 -1
- package/dist/assets/{ErrorView-CrYsrADA.js → ErrorView-C_k5_sJ0.js} +1 -1
- package/dist/assets/{EvaluationsRootView-C0OyvjOt.js → EvaluationsRootView-DP2_MhvN.js} +1 -1
- package/dist/assets/{EvaluationsView-BcMhW8o6.js → EvaluationsView-BHRPpTsS.js} +3 -3
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-BmjUbn85.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-DTpILxvC.js} +2 -2
- package/dist/assets/{ExecutionsView-GKNLT5Ec.css → ExecutionsView-B5yiPX6U.css} +1 -1
- package/dist/assets/{ExecutionsView-CdMuQ6Ay.js → ExecutionsView-Bv3YVM-6.js} +26 -20
- package/dist/assets/{FixedCollectionParameter-DNRbGHuU.js → FixedCollectionParameter-CZc3TqBt.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-CVYkGoS6.js → ForgotMyPasswordView-CaiqDg42.js} +3 -3
- package/dist/assets/{InfoAccordion-DXq9DJ4j.js → InfoAccordion-TbgnFURd.js} +1 -1
- package/dist/assets/{InsightsChartAverageRuntime-CXByy6Zo.js → InsightsChartAverageRuntime-BqCmV_C3.js} +4 -4
- package/dist/assets/{InsightsChartFailed-9zaeZgek.js → InsightsChartFailed-nhNAvWJ-.js} +4 -4
- package/dist/assets/{InsightsChartFailureRate-DT96wC8C.js → InsightsChartFailureRate-Ca8Ar9nD.js} +4 -4
- package/dist/assets/{InsightsChartTimeSaved-C6pLWWxa.js → InsightsChartTimeSaved-CuO9b6Em.js} +4 -4
- package/dist/assets/{InsightsChartTotal-Cc0YLVD7.js → InsightsChartTotal-Dk2_nvoT.js} +4 -4
- package/dist/assets/{InsightsDashboard-C27Avzrv.css → InsightsDashboard-Bo0U18-6.css} +18 -12
- package/dist/assets/{InsightsDashboard-qL2EE60l.js → InsightsDashboard-zCjTFLpM.js} +68 -35
- package/dist/assets/{InsightsPaywall-C_2IPEhI.js → InsightsPaywall-CBtrv5fk.js} +1 -1
- package/dist/assets/{InsightsSummary-tylKFBgw.js → InsightsSummary-BWRporX0.js} +1 -1
- package/dist/assets/{InsightsTableWorkflows-BwRj0aXe.js → InsightsTableWorkflows-DlGA2gWN.js} +4 -4
- package/dist/assets/{Logo-DqC1X5we.js → Logo-ayCSvzHf.js} +1 -1
- package/dist/assets/{LogsPanel-DZguGtyt.js → LogsPanel-DwPSXTSp.js} +34 -26
- package/dist/assets/{MainHeader-IFzZPcNW.js → MainHeader-BGOzl1ir.js} +11 -11
- package/dist/assets/{MainSidebar-D-2Yb5yU.js → MainSidebar-CGhxTuih.js} +27 -10
- package/dist/assets/{NodeCreation-CrPTESjn.js → NodeCreation-C2TX7WTu.js} +3 -3
- package/dist/assets/{NodeCreator-Db1k7Npw.js → NodeCreator-tQVCw9Uh.js} +1 -1
- package/dist/assets/{NodeDetailsView-T6l22FLo.js → NodeDetailsView-C-BCfvgR.js} +13 -13
- package/dist/assets/{NodeDetailsViewV2-Caf-LQD7.js → NodeDetailsViewV2-CHkxHxvz.js} +13 -13
- package/dist/assets/{NodeView-B08ajmmZ.js → NodeView-B6Bv6TYS.js} +13 -12
- package/dist/assets/{PageViewLayout-B01Cj9Ag.js → PageViewLayout-_SQAsKsq.js} +1 -1
- package/dist/assets/{PrebuiltAgentTemplatesView-ZbB8Spq8.js → PrebuiltAgentTemplatesView-DOI6Oras.js} +2 -2
- package/dist/assets/{ProjectBreadcrumb-vTjbzQHC.js → ProjectBreadcrumb-DdovGxoT.js} +1 -1
- package/dist/assets/{ProjectHeader-CsH8YD16.js → ProjectHeader-CmNr3RiV.js} +3 -3
- package/dist/assets/{ProjectSettings-CCVXNK3G.css → ProjectSettings-B5z1mrGW.css} +155 -9
- package/dist/assets/{ProjectSettings-CYy5LBLu.js → ProjectSettings-BLw1-aa2.js} +490 -121
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-DOMRXCVj.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-BvsEzRu6.js} +1 -1
- package/dist/assets/{ResourcesListLayout-CEq6DTya.js → ResourcesListLayout-CFoOOQpo.js} +4 -4
- package/dist/assets/{RunDataJson-CM54dhgQ.js → RunDataJson-KBqmqbfA.js} +3 -3
- package/dist/assets/{RunDataJsonActions-BGkwaXF1.js → RunDataJsonActions-CKFc7ymK.js} +1 -1
- package/dist/assets/{RunDataParsedAiContent-CCScHhrV.js → RunDataParsedAiContent-Ce_ctsro.js} +2 -2
- package/dist/assets/{RunDataSearch-D8tSIc5y.js → RunDataSearch-gM--YmOH.js} +1 -1
- package/dist/assets/{RunDataTable-y4SItH7m.js → RunDataTable-CV1IQEC1.js} +1 -1
- package/dist/assets/{SamlOnboarding-B-qxZA7T.js → SamlOnboarding-sD7YkjXE.js} +3 -3
- package/dist/assets/{SelectedItemsInfo-8rTveqLV.js → SelectedItemsInfo-CWRoXt5N.js} +1 -1
- package/dist/assets/{SettingsApiView-Crwc7f2q.js → SettingsApiView-CjxSweZ2.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-D_CDclON.js → SettingsCommunityNodesView-BZS-1Pu8.js} +6 -6
- package/dist/assets/{SettingsExternalSecrets-D9EYRw94.js → SettingsExternalSecrets-CUP7WmUX.js} +1 -1
- package/dist/assets/{SettingsLdapView-IWmIFFmQ.js → SettingsLdapView-CAcFtpvb.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-T9ajKTLt.js → SettingsLogStreamingView-Db06ainF.js} +1 -1
- package/dist/assets/{SettingsPersonalView-ClpcCCUK.js → SettingsPersonalView-CFAcW525.js} +15 -2
- package/dist/assets/{SettingsSourceControl-D4MKPsIp.js → SettingsSourceControl-Cl0Z45op.js} +1 -1
- package/dist/assets/{SettingsSso-Dh0TCa3N.js → SettingsSso-hvpitcmh.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-_VxSs28G.css → SettingsUsageAndPlan-CfFJy6fo.css} +3 -3
- package/dist/assets/{SettingsUsageAndPlan-DMz52D_8.js → SettingsUsageAndPlan-pIa02R8X.js} +3 -7
- package/dist/assets/{SettingsUsersView-CyOqQQ1T.js → SettingsUsersView-Bc_d_j_C.js} +10 -24
- package/dist/assets/{SettingsView-9XSvAxZn.js → SettingsView-k1Qk6b9u.js} +1 -1
- package/dist/assets/{SetupView-CaQUQHtZ.js → SetupView-CgueTipX.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-CLPdPWR-.js → SetupWorkflowCredentialsButton-9ZdgoxH6.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-Cwy86CRf.js → SetupWorkflowFromTemplateView-DImn3MLc.js} +3 -3
- package/dist/assets/{SigninView-B1CFcKZW.js → SigninView-Dy2njlT9.js} +3 -3
- package/dist/assets/{SignoutView-tXEnZbBW.js → SignoutView-BW4OLG4T.js} +1 -1
- package/dist/assets/{SignupView-tG0nF3IX.js → SignupView-DqiOjgU_.js} +3 -3
- package/dist/assets/{TableBase-Bk0Ksvri.js → TableBase-J7qyS7Oi.js} +1 -1
- package/dist/assets/{Tags-bLJnzJ9O.js → Tags-DHmekS5b.js} +1 -1
- package/dist/assets/{TemplateDetails-DwB2MNDs.js → TemplateDetails-lA7coCfr.js} +2 -2
- package/dist/assets/{TemplateList-xz6dq_b_.js → TemplateList-C_enJUC-.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-CBHrX6qh.js → TemplatesCollectionView-Bvr4Jl4e.js} +6 -6
- package/dist/assets/{TemplatesSearchView-DlCohPQw.js → TemplatesSearchView-DNEWIXcA.js} +3 -3
- package/dist/assets/{TemplatesView-BWRC7u13.js → TemplatesView-D6kBDKHq.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-IFi-aXTJ.js → TemplatesWorkflowView-CxpvFC33.js} +6 -6
- package/dist/assets/{TriggerPanel-CGEgWBP1.js → TriggerPanel-aOMoGQPb.js} +5 -5
- package/dist/assets/{VariablesView-DCIpb3py.js → VariablesView-CF7zW6sO.js} +6 -6
- package/dist/assets/{WorkerView-BNJtp3_b.js → WorkerView-CPSFDQ3M.js} +8 -8
- package/dist/assets/{WorkflowActivator-GWpvfdPq.js → WorkflowActivator-2k4uBcXx.js} +3 -3
- package/dist/assets/{WorkflowExecutionsInfoAccordion-DyC6zINy.js → WorkflowExecutionsInfoAccordion-DLSyy7P3.js} +2 -2
- package/dist/assets/{WorkflowExecutionsLandingPage-CHU6rsbS.js → WorkflowExecutionsLandingPage-B0lwEkzs.js} +3 -3
- package/dist/assets/{WorkflowExecutionsPreview-BRZcVWz8.js → WorkflowExecutionsPreview-fdG8WvjQ.js} +4 -4
- package/dist/assets/{WorkflowExecutionsView-D2avX462.js → WorkflowExecutionsView-DoOsdRNS.js} +12 -14
- package/dist/assets/{WorkflowExecutionsView-C_xuUSa8.css → WorkflowExecutionsView-DqWqyiNg.css} +2 -2
- package/dist/assets/{WorkflowHistory-CezxUWJ3.js → WorkflowHistory-BmCEHmbX.js} +2 -2
- package/dist/assets/{WorkflowOnboardingView-CoLRNMn7.js → WorkflowOnboardingView-DoANwef9.js} +1 -1
- package/dist/assets/{WorkflowPreview-6_5498ls.js → WorkflowPreview-BcVSQJ1r.js} +1 -1
- package/dist/assets/{WorkflowsView-yo-aPIAy.js → WorkflowsView-DfkdEDYd.js} +14 -14
- package/dist/assets/{canvas-CNbb2A4n.js → canvas-DjkOwLgJ.js} +1 -1
- package/dist/assets/{chartjs.utils-BuEfxZRs.js → chartjs.utils-P0M5ijsc.js} +2 -2
- package/dist/assets/{core-BmUd0ZQy.js → core-WbBbE4BE.js} +1 -1
- package/dist/assets/{global-link-actions-DLwTpw-D.js → global-link-actions-Cq9wmyMP.js} +1 -1
- package/dist/assets/{index-B7wrqKiF.css → index-CpPc1kM8.css} +331 -206
- package/dist/assets/{index-BqqmY62y.js → index-DGLJxfnn.js} +8240 -4664
- package/dist/assets/{index-B4kldndn.js → index-vcIMPEwS.js} +1 -1
- package/dist/assets/{pickBy-D_Xqfu3B.js → pickBy-ClKklBll.js} +1 -1
- package/dist/assets/{readyToRunWorkflows.store-DV_gQvCM.js → readyToRunWorkflows.store-By37rv7G.js} +1 -1
- package/dist/assets/readyToRunWorkflowsV2.store-Dl9lSVnl.js +648 -0
- package/dist/assets/{templateActions-BswjlHEI.js → templateActions-DIHXnHcb.js} +1 -1
- package/dist/assets/{useBeforeUnload-BfDs84Xo.js → useBeforeUnload-DixKQhw1.js} +1 -1
- package/dist/assets/{useExecutionDebugging-ZrtkQtcL.js → useExecutionDebugging-CONIO3Vz.js} +1 -1
- package/dist/assets/{useImportCurlCommand-TipLhFW-.js → useImportCurlCommand-CcLwFKyp.js} +1 -1
- package/dist/assets/{useProjectPages-DGeR5Bq7.js → useProjectPages-eaNvpOz-.js} +1 -1
- package/dist/assets/{usePushConnection-BxoIfCAQ.js → usePushConnection-C9lQfiNc.js} +12 -7
- package/dist/assets/{useWorkflowActivate-Dk_tmPQm.js → useWorkflowActivate-ByzVgA6z.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/scripts/fetch-node-popularity.mjs +90 -0
- package/turbo.json +19 -0
- package/vite/vite-plugin-node-popularity.mts +32 -0
- package/vite.config.mts +2 -0
- package/dist/assets/CollectionParameter-CYXwrQBH.js +0 -4
- package/dist/assets/readyToRunWorkflowsV2.store-ZhxGm4dM.js +0 -137
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fZ as Chart$1, d as defineComponent, cp as shallowRef, aX as h, f_ as LineController, f$ as version, r as ref, o as onMounted, X as onBeforeUnmount, a8 as watch,
|
|
1
|
+
import { fZ as Chart$1, d as defineComponent, cp as shallowRef, aX as h, f_ as LineController, f$ as version, r as ref, o as onMounted, X as onBeforeUnmount, a8 as watch, f0 as toRaw, g0 as isProxy, g1 as BarController } from "./index-DGLJxfnn.js";
|
|
2
2
|
const CommonProps = {
|
|
3
3
|
data: {
|
|
4
4
|
type: Object,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fO as require_arrayMap, fP as require_baseIteratee, fQ as require_basePickBy, fR as require_getAllKeysIn, bT as getDefaultExportFromCjs } from "./index-
|
|
1
|
+
import { fO as require_arrayMap, fP as require_baseIteratee, fQ as require_basePickBy, fR as require_getAllKeysIn, bT as getDefaultExportFromCjs } from "./index-DGLJxfnn.js";
|
|
2
2
|
var pickBy_1;
|
|
3
3
|
var hasRequiredPickBy;
|
|
4
4
|
function requirePickBy() {
|
package/dist/assets/{readyToRunWorkflows.store-DV_gQvCM.js → readyToRunWorkflows.store-By37rv7G.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a0 as defineStore, aw as useFoldersStore, a2 as useWorkflowsStore, di as usePostHog, v as useSettingsStore, a$ as useLocalStorage, x as computed,
|
|
1
|
+
import { a0 as defineStore, aw as useFoldersStore, a2 as useWorkflowsStore, di as usePostHog, v as useSettingsStore, a$ as useLocalStorage, x as computed, fu as TEMPLATE_ONBOARDING_EXPERIMENT, c as useI18n, am as useTelemetry, a5 as STORES, bc as useCloudPlanStore, fv as BATCH_11AUG_EXPERIMENT } from "./index-DGLJxfnn.js";
|
|
2
2
|
const AGENT_WITH_MEMORY = {
|
|
3
3
|
meta: {
|
|
4
4
|
templateId: "035_template_onboarding-agent_with_memory"
|
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
import { aw as useFoldersStore, a3 as useRoute, a0 as defineStore, a as useToast, b as useRouter, de as useCredentialsStore, u as useUsersStore, v as useSettingsStore, di as usePostHog, bc as useCloudPlanStore, a2 as useWorkflowsStore, x as computed, fw as READY_TO_RUN_V2_EXPERIMENT, a$ as useLocalStorage, r as ref, fs as OPEN_AI_API_CREDENTIAL_TYPE, am as useTelemetry, c as useI18n, dT as deepCopy, V as VIEWS, a5 as STORES } from "./index-DGLJxfnn.js";
|
|
2
|
+
import { u as useProjectPages } from "./useProjectPages-eaNvpOz-.js";
|
|
3
|
+
const READY_TO_RUN_WORKFLOW_V1 = {
|
|
4
|
+
name: "AI Agent workflow",
|
|
5
|
+
meta: { templateId: "ready-to-run-ai-workflow-v1" },
|
|
6
|
+
nodes: [
|
|
7
|
+
{
|
|
8
|
+
parameters: {
|
|
9
|
+
url: "https://www.theverge.com/rss/index.xml",
|
|
10
|
+
options: {}
|
|
11
|
+
},
|
|
12
|
+
type: "n8n-nodes-base.rssFeedReadTool",
|
|
13
|
+
typeVersion: 1.2,
|
|
14
|
+
position: [-16, 768],
|
|
15
|
+
id: "303e9b4e-cc4e-4d8a-8ede-7550f070d212",
|
|
16
|
+
name: "Get Tech News"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
parameters: {
|
|
20
|
+
toolDescription: "Reads the news",
|
|
21
|
+
url: "=https://feeds.bbci.co.uk/news/world/rss.xml",
|
|
22
|
+
options: {}
|
|
23
|
+
},
|
|
24
|
+
type: "n8n-nodes-base.rssFeedReadTool",
|
|
25
|
+
typeVersion: 1.2,
|
|
26
|
+
position: [112, 768],
|
|
27
|
+
id: "4090a753-f131-40b1-87c3-cf74d5a7e325",
|
|
28
|
+
name: "Get World News"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
parameters: {
|
|
32
|
+
rule: {
|
|
33
|
+
interval: [
|
|
34
|
+
{
|
|
35
|
+
triggerAtHour: 7
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
type: "n8n-nodes-base.scheduleTrigger",
|
|
41
|
+
typeVersion: 1.2,
|
|
42
|
+
position: [-560, 752],
|
|
43
|
+
id: "651543b5-0213-433f-8760-57d62b8d6d64",
|
|
44
|
+
name: "Run every day at 7AM",
|
|
45
|
+
notesInFlow: true,
|
|
46
|
+
notes: "Double-click to open"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
parameters: {
|
|
50
|
+
assignments: {
|
|
51
|
+
assignments: [
|
|
52
|
+
{
|
|
53
|
+
id: "85b5c530-2c13-4424-ab83-05979bc879a5",
|
|
54
|
+
name: "output",
|
|
55
|
+
value: "={{ $json.output }}",
|
|
56
|
+
type: "string"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
options: {}
|
|
61
|
+
},
|
|
62
|
+
type: "n8n-nodes-base.set",
|
|
63
|
+
typeVersion: 3.4,
|
|
64
|
+
position: [160, 544],
|
|
65
|
+
id: "99f7bb9e-f8c0-43ca-a9a8-a76634ac9611",
|
|
66
|
+
name: "Output",
|
|
67
|
+
notesInFlow: true,
|
|
68
|
+
notes: "Double-click to open"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
parameters: {},
|
|
72
|
+
type: "n8n-nodes-base.manualTrigger",
|
|
73
|
+
typeVersion: 1,
|
|
74
|
+
position: [-560, 544],
|
|
75
|
+
id: "a0390291-6794-4673-9a6a-5c3d3a5d9e4b",
|
|
76
|
+
name: "Click ‘Execute workflow’ to run"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
parameters: {
|
|
80
|
+
content: "## ⚡ Start here:",
|
|
81
|
+
height: 240,
|
|
82
|
+
width: 224,
|
|
83
|
+
color: 7
|
|
84
|
+
},
|
|
85
|
+
type: "n8n-nodes-base.stickyNote",
|
|
86
|
+
typeVersion: 1,
|
|
87
|
+
position: [-624, 464],
|
|
88
|
+
id: "fac5929f-e065-4474-96b1-7bcc06834238",
|
|
89
|
+
name: "Sticky Note"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
parameters: {
|
|
93
|
+
model: {
|
|
94
|
+
__rl: true,
|
|
95
|
+
mode: "list",
|
|
96
|
+
value: "gpt-4.1-mini"
|
|
97
|
+
},
|
|
98
|
+
options: {}
|
|
99
|
+
},
|
|
100
|
+
type: "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
|
101
|
+
typeVersion: 1.2,
|
|
102
|
+
position: [-272, 768],
|
|
103
|
+
id: "b16482e8-0d48-4426-aa93-c3fee11dd3cd",
|
|
104
|
+
name: "OpenAI Model",
|
|
105
|
+
notesInFlow: true,
|
|
106
|
+
credentials: {},
|
|
107
|
+
notes: "Double-click to open"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
parameters: {
|
|
111
|
+
promptType: "define",
|
|
112
|
+
text: '=Summarize world news and tech news from the last 24 hours. \nSkip your comments. \nThe titles should be "World news:" and "Tech news:" \nToday is {{ $today }}',
|
|
113
|
+
options: {}
|
|
114
|
+
},
|
|
115
|
+
type: "@n8n/n8n-nodes-langchain.agent",
|
|
116
|
+
typeVersion: 2.2,
|
|
117
|
+
position: [-272, 544],
|
|
118
|
+
id: "084d56aa-d157-4964-9073-b36d9d9589c5",
|
|
119
|
+
name: "AI Summary Agent",
|
|
120
|
+
notesInFlow: true,
|
|
121
|
+
notes: "Double-click to open"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
parameters: {
|
|
125
|
+
content: "### Double click here to see the results:",
|
|
126
|
+
height: 240,
|
|
127
|
+
width: 192,
|
|
128
|
+
color: 7
|
|
129
|
+
},
|
|
130
|
+
type: "n8n-nodes-base.stickyNote",
|
|
131
|
+
typeVersion: 1,
|
|
132
|
+
position: [112, 464],
|
|
133
|
+
id: "a4b7a69a-0db8-4b9b-a81d-fd83378043a3",
|
|
134
|
+
name: "Sticky Note1"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
parameters: {
|
|
138
|
+
content: "### 📰 Daily AI Summary\n\n\nThis workflow gets the latest news and asks AI to summarize it for you.\n\n⭐ Bonus: Send the summary via email by connecting your Gmail account\n\n\n\n@[youtube](cMyOkQ4N-5M)",
|
|
139
|
+
height: 432,
|
|
140
|
+
width: 384,
|
|
141
|
+
color: 5
|
|
142
|
+
},
|
|
143
|
+
type: "n8n-nodes-base.stickyNote",
|
|
144
|
+
typeVersion: 1,
|
|
145
|
+
position: [-1152, 464],
|
|
146
|
+
id: "74d80857-5e63-47a8-8e86-8ecd10fd5f9e",
|
|
147
|
+
name: "Sticky Note2"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
parameters: {
|
|
151
|
+
subject: "Your news daily summary",
|
|
152
|
+
emailType: "text",
|
|
153
|
+
message: "={{ $json.output }}",
|
|
154
|
+
options: {}
|
|
155
|
+
},
|
|
156
|
+
type: "n8n-nodes-base.gmail",
|
|
157
|
+
typeVersion: 2.1,
|
|
158
|
+
position: [432, 544],
|
|
159
|
+
id: "45625d0d-bf26-4379-9eed-7bbc8e5d87a5",
|
|
160
|
+
name: "Send summary by email",
|
|
161
|
+
webhookId: "093b04f1-5e78-4926-9863-1b100d6f2ead",
|
|
162
|
+
notesInFlow: true,
|
|
163
|
+
credentials: {},
|
|
164
|
+
notes: "Double-click to open"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
connections: {
|
|
168
|
+
"Get Tech News": {
|
|
169
|
+
ai_tool: [
|
|
170
|
+
[
|
|
171
|
+
{
|
|
172
|
+
node: "AI Summary Agent",
|
|
173
|
+
type: "ai_tool",
|
|
174
|
+
index: 0
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"Get World News": {
|
|
180
|
+
ai_tool: [
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
node: "AI Summary Agent",
|
|
184
|
+
type: "ai_tool",
|
|
185
|
+
index: 0
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"Run every day at 7AM": {
|
|
191
|
+
main: [
|
|
192
|
+
[
|
|
193
|
+
{
|
|
194
|
+
node: "AI Summary Agent",
|
|
195
|
+
type: "main",
|
|
196
|
+
index: 0
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"Click ‘Execute workflow’ to run": {
|
|
202
|
+
main: [
|
|
203
|
+
[
|
|
204
|
+
{
|
|
205
|
+
node: "AI Summary Agent",
|
|
206
|
+
type: "main",
|
|
207
|
+
index: 0
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"OpenAI Model": {
|
|
213
|
+
ai_languageModel: [
|
|
214
|
+
[
|
|
215
|
+
{
|
|
216
|
+
node: "AI Summary Agent",
|
|
217
|
+
type: "ai_languageModel",
|
|
218
|
+
index: 0
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"AI Summary Agent": {
|
|
224
|
+
main: [
|
|
225
|
+
[
|
|
226
|
+
{
|
|
227
|
+
node: "Output",
|
|
228
|
+
type: "main",
|
|
229
|
+
index: 0
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
Output: {
|
|
235
|
+
main: [[]]
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
pinData: {}
|
|
239
|
+
};
|
|
240
|
+
const READY_TO_RUN_WORKFLOW_V2 = {
|
|
241
|
+
name: "AI Agent workflow",
|
|
242
|
+
meta: { templateId: "ready-to-run-ai-workflow-v2" },
|
|
243
|
+
nodes: [
|
|
244
|
+
{
|
|
245
|
+
parameters: {
|
|
246
|
+
url: "https://www.theverge.com/rss/index.xml",
|
|
247
|
+
options: {}
|
|
248
|
+
},
|
|
249
|
+
type: "n8n-nodes-base.rssFeedReadTool",
|
|
250
|
+
typeVersion: 1.2,
|
|
251
|
+
position: [-16, 768],
|
|
252
|
+
id: "303e9b4e-cc4e-4d8a-8ede-7550f070d212",
|
|
253
|
+
name: "Get Tech News"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
parameters: {
|
|
257
|
+
toolDescription: "Reads the news",
|
|
258
|
+
url: "=https://feeds.bbci.co.uk/news/world/rss.xml",
|
|
259
|
+
options: {}
|
|
260
|
+
},
|
|
261
|
+
type: "n8n-nodes-base.rssFeedReadTool",
|
|
262
|
+
typeVersion: 1.2,
|
|
263
|
+
position: [112, 768],
|
|
264
|
+
id: "4090a753-f131-40b1-87c3-cf74d5a7e325",
|
|
265
|
+
name: "Get World News"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
parameters: {
|
|
269
|
+
rule: {
|
|
270
|
+
interval: [
|
|
271
|
+
{
|
|
272
|
+
triggerAtHour: 7
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
type: "n8n-nodes-base.scheduleTrigger",
|
|
278
|
+
typeVersion: 1.2,
|
|
279
|
+
position: [-560, 752],
|
|
280
|
+
id: "651543b5-0213-433f-8760-57d62b8d6d64",
|
|
281
|
+
name: "Run every day at 7AM",
|
|
282
|
+
notesInFlow: true,
|
|
283
|
+
notes: "Double-click to open"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
parameters: {
|
|
287
|
+
assignments: {
|
|
288
|
+
assignments: [
|
|
289
|
+
{
|
|
290
|
+
id: "85b5c530-2c13-4424-ab83-05979bc879a5",
|
|
291
|
+
name: "output",
|
|
292
|
+
value: "={{ $json.output }}",
|
|
293
|
+
type: "string"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
options: {}
|
|
298
|
+
},
|
|
299
|
+
type: "n8n-nodes-base.set",
|
|
300
|
+
typeVersion: 3.4,
|
|
301
|
+
position: [160, 544],
|
|
302
|
+
id: "99f7bb9e-f8c0-43ca-a9a8-a76634ac9611",
|
|
303
|
+
name: "Output",
|
|
304
|
+
notesInFlow: true,
|
|
305
|
+
notes: "Double-click to open"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
parameters: {},
|
|
309
|
+
type: "n8n-nodes-base.manualTrigger",
|
|
310
|
+
typeVersion: 1,
|
|
311
|
+
position: [-560, 544],
|
|
312
|
+
id: "a0390291-6794-4673-9a6a-5c3d3a5d9e4b",
|
|
313
|
+
name: "Click ‘Execute workflow’ to run"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
parameters: {
|
|
317
|
+
content: "## ⚡ Start here:",
|
|
318
|
+
height: 224,
|
|
319
|
+
width: 224,
|
|
320
|
+
color: 7
|
|
321
|
+
},
|
|
322
|
+
type: "n8n-nodes-base.stickyNote",
|
|
323
|
+
typeVersion: 1,
|
|
324
|
+
position: [-624, 480],
|
|
325
|
+
id: "fac5929f-e065-4474-96b1-7bcc06834238",
|
|
326
|
+
name: "Sticky Note"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
parameters: {
|
|
330
|
+
model: {
|
|
331
|
+
__rl: true,
|
|
332
|
+
mode: "list",
|
|
333
|
+
value: "gpt-4.1-mini"
|
|
334
|
+
},
|
|
335
|
+
options: {}
|
|
336
|
+
},
|
|
337
|
+
type: "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
|
338
|
+
typeVersion: 1.2,
|
|
339
|
+
position: [-272, 768],
|
|
340
|
+
id: "b16482e8-0d48-4426-aa93-c3fee11dd3cd",
|
|
341
|
+
name: "OpenAI Model",
|
|
342
|
+
notesInFlow: true,
|
|
343
|
+
credentials: {},
|
|
344
|
+
notes: "Double-click to open"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
parameters: {
|
|
348
|
+
content: "@[youtube](cMyOkQ4N-5M)",
|
|
349
|
+
height: 512,
|
|
350
|
+
width: 902,
|
|
351
|
+
color: 7
|
|
352
|
+
},
|
|
353
|
+
type: "n8n-nodes-base.stickyNote",
|
|
354
|
+
typeVersion: 1,
|
|
355
|
+
position: [-352, -96],
|
|
356
|
+
id: "ec65e69e-77fa-4912-a4af-49e0a248e2c8",
|
|
357
|
+
name: "Sticky Note3"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
parameters: {
|
|
361
|
+
promptType: "define",
|
|
362
|
+
text: '=Summarize world news and tech news from the last 24 hours. \nSkip your comments. \nThe titles should be "World news:" and "Tech news:" \nToday is {{ $today }}',
|
|
363
|
+
options: {}
|
|
364
|
+
},
|
|
365
|
+
type: "@n8n/n8n-nodes-langchain.agent",
|
|
366
|
+
typeVersion: 2.2,
|
|
367
|
+
position: [-272, 544],
|
|
368
|
+
id: "084d56aa-d157-4964-9073-b36d9d9589c5",
|
|
369
|
+
name: "AI Summary Agent",
|
|
370
|
+
notesInFlow: true,
|
|
371
|
+
notes: "Double-click to open"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
parameters: {
|
|
375
|
+
content: "### Double click here to see the results:",
|
|
376
|
+
height: 240,
|
|
377
|
+
width: 192,
|
|
378
|
+
color: 7
|
|
379
|
+
},
|
|
380
|
+
type: "n8n-nodes-base.stickyNote",
|
|
381
|
+
typeVersion: 1,
|
|
382
|
+
position: [112, 464],
|
|
383
|
+
id: "a4b7a69a-0db8-4b9b-a81d-fd83378043a3",
|
|
384
|
+
name: "Sticky Note1"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
parameters: {
|
|
388
|
+
content: "### 📰 Daily AI Summary\n\n\nThis workflow gets the latest news and asks AI to summarize it for you.\n\n⭐ Bonus: Send the summary via email by connecting your Gmail account\n\n▶ Watch the video to get started ",
|
|
389
|
+
height: 272,
|
|
390
|
+
width: 224,
|
|
391
|
+
color: 5
|
|
392
|
+
},
|
|
393
|
+
type: "n8n-nodes-base.stickyNote",
|
|
394
|
+
typeVersion: 1,
|
|
395
|
+
position: [-624, 32],
|
|
396
|
+
id: "74d80857-5e63-47a8-8e86-8ecd10fd5f9e",
|
|
397
|
+
name: "Sticky Note2"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
parameters: {
|
|
401
|
+
subject: "Your news daily summary",
|
|
402
|
+
emailType: "text",
|
|
403
|
+
message: "={{ $json.output }}",
|
|
404
|
+
options: {}
|
|
405
|
+
},
|
|
406
|
+
type: "n8n-nodes-base.gmail",
|
|
407
|
+
typeVersion: 2.1,
|
|
408
|
+
position: [432, 544],
|
|
409
|
+
id: "45625d0d-bf26-4379-9eed-7bbc8e5d87a5",
|
|
410
|
+
name: "Send summary by email",
|
|
411
|
+
webhookId: "093b04f1-5e78-4926-9863-1b100d6f2ead",
|
|
412
|
+
notesInFlow: true,
|
|
413
|
+
credentials: {},
|
|
414
|
+
notes: "Double-click to open"
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
connections: {
|
|
418
|
+
"Get Tech News": {
|
|
419
|
+
ai_tool: [
|
|
420
|
+
[
|
|
421
|
+
{
|
|
422
|
+
node: "AI Summary Agent",
|
|
423
|
+
type: "ai_tool",
|
|
424
|
+
index: 0
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
"Get World News": {
|
|
430
|
+
ai_tool: [
|
|
431
|
+
[
|
|
432
|
+
{
|
|
433
|
+
node: "AI Summary Agent",
|
|
434
|
+
type: "ai_tool",
|
|
435
|
+
index: 0
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
"Run every day at 7AM": {
|
|
441
|
+
main: [
|
|
442
|
+
[
|
|
443
|
+
{
|
|
444
|
+
node: "AI Summary Agent",
|
|
445
|
+
type: "main",
|
|
446
|
+
index: 0
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
"Click ‘Execute workflow’ to run": {
|
|
452
|
+
main: [
|
|
453
|
+
[
|
|
454
|
+
{
|
|
455
|
+
node: "AI Summary Agent",
|
|
456
|
+
type: "main",
|
|
457
|
+
index: 0
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
"OpenAI Model": {
|
|
463
|
+
ai_languageModel: [
|
|
464
|
+
[
|
|
465
|
+
{
|
|
466
|
+
node: "AI Summary Agent",
|
|
467
|
+
type: "ai_languageModel",
|
|
468
|
+
index: 0
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"AI Summary Agent": {
|
|
474
|
+
main: [
|
|
475
|
+
[
|
|
476
|
+
{
|
|
477
|
+
node: "Output",
|
|
478
|
+
type: "main",
|
|
479
|
+
index: 0
|
|
480
|
+
}
|
|
481
|
+
]
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
Output: {
|
|
485
|
+
main: [[]]
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
pinData: {}
|
|
489
|
+
};
|
|
490
|
+
function useEmptyStateDetection() {
|
|
491
|
+
const foldersStore = useFoldersStore();
|
|
492
|
+
const projectPages = useProjectPages();
|
|
493
|
+
const route = useRoute();
|
|
494
|
+
const isTrulyEmpty = (currentRoute = route) => {
|
|
495
|
+
const hasNoWorkflows = foldersStore.totalWorkflowCount === 0;
|
|
496
|
+
const isNotInSpecificFolder = !currentRoute.params?.folderId;
|
|
497
|
+
const isMainWorkflowsPage = projectPages.isOverviewSubPage || !projectPages.isSharedSubPage;
|
|
498
|
+
const hasSearchQuery = !!currentRoute.query?.search;
|
|
499
|
+
const hasFilters = !!(currentRoute.query?.status || currentRoute.query?.tags || currentRoute.query?.showArchived || currentRoute.query?.homeProject);
|
|
500
|
+
return hasNoWorkflows && isNotInSpecificFolder && isMainWorkflowsPage && !hasSearchQuery && !hasFilters;
|
|
501
|
+
};
|
|
502
|
+
const shouldShowSimplifiedLayout = (currentRoute, isFeatureEnabled, loading) => {
|
|
503
|
+
if (loading || !isFeatureEnabled) {
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
return isTrulyEmpty(currentRoute);
|
|
507
|
+
};
|
|
508
|
+
return {
|
|
509
|
+
isTrulyEmpty,
|
|
510
|
+
shouldShowSimplifiedLayout
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
const LOCAL_STORAGE_CREDENTIAL_KEY = "N8N_READY_TO_RUN_V2_OPENAI_CREDENTIAL_ID";
|
|
514
|
+
const useReadyToRunWorkflowsV2Store = defineStore(
|
|
515
|
+
STORES.EXPERIMENT_READY_TO_RUN_WORKFLOWS_V2,
|
|
516
|
+
() => {
|
|
517
|
+
const telemetry = useTelemetry();
|
|
518
|
+
const i18n = useI18n();
|
|
519
|
+
const toast = useToast();
|
|
520
|
+
const router = useRouter();
|
|
521
|
+
const credentialsStore = useCredentialsStore();
|
|
522
|
+
const usersStore = useUsersStore();
|
|
523
|
+
const settingsStore = useSettingsStore();
|
|
524
|
+
const posthogStore = usePostHog();
|
|
525
|
+
const cloudPlanStore = useCloudPlanStore();
|
|
526
|
+
const workflowsStore = useWorkflowsStore();
|
|
527
|
+
const isFeatureEnabled = computed(() => {
|
|
528
|
+
const variant = posthogStore.getVariant(READY_TO_RUN_V2_EXPERIMENT.name);
|
|
529
|
+
return (variant === READY_TO_RUN_V2_EXPERIMENT.variant1 || variant === READY_TO_RUN_V2_EXPERIMENT.variant2) && cloudPlanStore.userIsTrialing;
|
|
530
|
+
});
|
|
531
|
+
const claimedCredentialIdRef = useLocalStorage(LOCAL_STORAGE_CREDENTIAL_KEY, "");
|
|
532
|
+
const claimingCredits = ref(false);
|
|
533
|
+
const userHasOpenAiCredentialAlready = computed(
|
|
534
|
+
() => !!credentialsStore.allCredentials.filter(
|
|
535
|
+
(credential) => credential.type === OPEN_AI_API_CREDENTIAL_TYPE
|
|
536
|
+
).length
|
|
537
|
+
);
|
|
538
|
+
const userHasClaimedAiCreditsAlready = computed(
|
|
539
|
+
() => !!usersStore.currentUser?.settings?.userClaimedAiCredits
|
|
540
|
+
);
|
|
541
|
+
const userCanClaimOpenAiCredits = computed(() => {
|
|
542
|
+
return settingsStore.isAiCreditsEnabled && !userHasOpenAiCredentialAlready.value && !userHasClaimedAiCreditsAlready.value;
|
|
543
|
+
});
|
|
544
|
+
const getCurrentVariant = () => {
|
|
545
|
+
return posthogStore.getVariant(READY_TO_RUN_V2_EXPERIMENT.name);
|
|
546
|
+
};
|
|
547
|
+
const trackExecuteAiWorkflow = (status) => {
|
|
548
|
+
const variant = getCurrentVariant();
|
|
549
|
+
telemetry.track("User executed ready to run AI workflow", {
|
|
550
|
+
status,
|
|
551
|
+
variant
|
|
552
|
+
});
|
|
553
|
+
};
|
|
554
|
+
const trackExecuteAiWorkflowSuccess = () => {
|
|
555
|
+
const variant = getCurrentVariant();
|
|
556
|
+
telemetry.track("User executed ready to run AI workflow successfully", {
|
|
557
|
+
variant
|
|
558
|
+
});
|
|
559
|
+
};
|
|
560
|
+
const claimFreeAiCredits = async (projectId) => {
|
|
561
|
+
claimingCredits.value = true;
|
|
562
|
+
try {
|
|
563
|
+
const credential = await credentialsStore.claimFreeAiCredits(projectId);
|
|
564
|
+
if (usersStore?.currentUser?.settings) {
|
|
565
|
+
usersStore.currentUser.settings.userClaimedAiCredits = true;
|
|
566
|
+
}
|
|
567
|
+
claimedCredentialIdRef.value = credential.id;
|
|
568
|
+
telemetry.track("User claimed OpenAI credits");
|
|
569
|
+
return credential;
|
|
570
|
+
} catch (e) {
|
|
571
|
+
toast.showError(
|
|
572
|
+
e,
|
|
573
|
+
i18n.baseText("freeAi.credits.showError.claim.title"),
|
|
574
|
+
i18n.baseText("freeAi.credits.showError.claim.message")
|
|
575
|
+
);
|
|
576
|
+
throw e;
|
|
577
|
+
} finally {
|
|
578
|
+
claimingCredits.value = false;
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
const createAndOpenAiWorkflow = async (source, parentFolderId) => {
|
|
582
|
+
const variant = getCurrentVariant();
|
|
583
|
+
telemetry.track("User opened ready to run AI workflow", {
|
|
584
|
+
source,
|
|
585
|
+
variant
|
|
586
|
+
});
|
|
587
|
+
const workflowTemplate = variant === READY_TO_RUN_V2_EXPERIMENT.variant2 ? READY_TO_RUN_WORKFLOW_V2 : READY_TO_RUN_WORKFLOW_V1;
|
|
588
|
+
try {
|
|
589
|
+
let workflowToCreate = {
|
|
590
|
+
...workflowTemplate,
|
|
591
|
+
parentFolderId
|
|
592
|
+
};
|
|
593
|
+
const credentialId = claimedCredentialIdRef.value;
|
|
594
|
+
if (credentialId && workflowToCreate.nodes) {
|
|
595
|
+
const clonedWorkflow = deepCopy(workflowToCreate);
|
|
596
|
+
const openAiNode = clonedWorkflow.nodes?.find((node) => node.name === "OpenAI Model");
|
|
597
|
+
if (openAiNode) {
|
|
598
|
+
openAiNode.credentials ??= {};
|
|
599
|
+
openAiNode.credentials[OPEN_AI_API_CREDENTIAL_TYPE] = {
|
|
600
|
+
id: credentialId,
|
|
601
|
+
name: ""
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
workflowToCreate = clonedWorkflow;
|
|
605
|
+
}
|
|
606
|
+
const createdWorkflow = await workflowsStore.createNewWorkflow(workflowToCreate);
|
|
607
|
+
await router.push({
|
|
608
|
+
name: VIEWS.WORKFLOW,
|
|
609
|
+
params: { name: createdWorkflow.id }
|
|
610
|
+
});
|
|
611
|
+
return createdWorkflow;
|
|
612
|
+
} catch (error) {
|
|
613
|
+
toast.showError(error, i18n.baseText("generic.error"));
|
|
614
|
+
throw error;
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
const claimCreditsAndOpenWorkflow = async (source, parentFolderId, projectId) => {
|
|
618
|
+
await claimFreeAiCredits(projectId);
|
|
619
|
+
await createAndOpenAiWorkflow(source, parentFolderId);
|
|
620
|
+
};
|
|
621
|
+
const getCardVisibility = (canCreate, readOnlyEnv, loading) => {
|
|
622
|
+
return !loading && isFeatureEnabled.value && userCanClaimOpenAiCredits.value && !readOnlyEnv && canCreate;
|
|
623
|
+
};
|
|
624
|
+
const getButtonVisibility = (hasWorkflows, canCreate, readOnlyEnv) => {
|
|
625
|
+
return isFeatureEnabled.value && userCanClaimOpenAiCredits.value && !readOnlyEnv && canCreate && hasWorkflows;
|
|
626
|
+
};
|
|
627
|
+
const { shouldShowSimplifiedLayout } = useEmptyStateDetection();
|
|
628
|
+
const getSimplifiedLayoutVisibility = (route, loading) => {
|
|
629
|
+
return shouldShowSimplifiedLayout(route, isFeatureEnabled.value, loading);
|
|
630
|
+
};
|
|
631
|
+
return {
|
|
632
|
+
isFeatureEnabled,
|
|
633
|
+
claimingCredits,
|
|
634
|
+
userCanClaimOpenAiCredits,
|
|
635
|
+
claimFreeAiCredits,
|
|
636
|
+
createAndOpenAiWorkflow,
|
|
637
|
+
claimCreditsAndOpenWorkflow,
|
|
638
|
+
getCardVisibility,
|
|
639
|
+
getButtonVisibility,
|
|
640
|
+
getSimplifiedLayoutVisibility,
|
|
641
|
+
trackExecuteAiWorkflow,
|
|
642
|
+
trackExecuteAiWorkflowSuccess
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
);
|
|
646
|
+
export {
|
|
647
|
+
useReadyToRunWorkflowsV2Store as u
|
|
648
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { eE as assert, eV as doesNodeHaveCredentialsToFill, V as VIEWS, dB as tryToParseNumber, eW as getNewWorkflow, eX as replaceAllTemplateNodeCredentials, dG as getNodesWithNormalizedPosition } from "./index-DGLJxfnn.js";
|
|
2
2
|
async function createWorkflowFromTemplate(opts) {
|
|
3
3
|
const { credentialOverrides, nodeTypeProvider, rootStore, template, workflowsStore } = opts;
|
|
4
4
|
const workflowData = await getNewWorkflow(rootStore.restApiContext, { name: template.name });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Q as useUIStore, cq as useCanvasStore, r as ref, x as computed, V as VIEWS, c as useI18n } from "./index-
|
|
1
|
+
import { Q as useUIStore, cq as useCanvasStore, r as ref, x as computed, V as VIEWS, c as useI18n } from "./index-DGLJxfnn.js";
|
|
2
2
|
function useBeforeUnload({ route }) {
|
|
3
3
|
const uiStore = useUIStore();
|
|
4
4
|
const canvasStore = useCanvasStore();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as useRouter, a as useToast, a2 as useWorkflowsStore, v as useSettingsStore, Q as useUIStore, aB as usePageRedirectionHelper, x as computed, aF as EnterpriseEditionFeature, c as useI18n, dV as DEBUG_PAYWALL_MODAL_KEY, aX as h, dW as sanitizeHtml, an as useMessage, ao as MODAL_CONFIRM, V as VIEWS, am as useTelemetry, au as useRootStore, dX as isFullExecutionResponse } from "./index-
|
|
1
|
+
import { b as useRouter, a as useToast, a2 as useWorkflowsStore, v as useSettingsStore, Q as useUIStore, aB as usePageRedirectionHelper, x as computed, aF as EnterpriseEditionFeature, c as useI18n, dV as DEBUG_PAYWALL_MODAL_KEY, aX as h, dW as sanitizeHtml, an as useMessage, ao as MODAL_CONFIRM, V as VIEWS, am as useTelemetry, au as useRootStore, dX as isFullExecutionResponse } from "./index-DGLJxfnn.js";
|
|
2
2
|
const useExecutionDebugging = () => {
|
|
3
3
|
const telemetry = useTelemetry();
|
|
4
4
|
const router = useRouter();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hf as process$1, hg as requirePathBrowserify, hh as require$$0, bT as getDefaultExportFromCjs, hi as Buffer, a as useToast, l as unref, eE as assert, hj as CURL_IMPORT_NOT_SUPPORTED_PROTOCOLS, hk as importCurlEventBus, hl as CURL_IMPORT_NODES_PROTOCOLS, c as useI18n, bF as get } from "./index-DGLJxfnn.js";
|
|
2
2
|
import { c as commonjsRequire } from "./_commonjs-dynamic-modules-TGKdzP3c.js";
|
|
3
3
|
class CCError extends Error {
|
|
4
4
|
}
|