diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte
index dc442c0fae..85e6a5faa3 100644
--- a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte
+++ b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte
@@ -1,36 +1,20 @@
-
diff --git a/packages/builder/src/components/automation/AutomationPanel/CreateAutomationModal.svelte b/packages/builder/src/components/automation/AutomationPanel/CreateAutomationModal.svelte
index 3549bc6de8..5fb27eaaf3 100644
--- a/packages/builder/src/components/automation/AutomationPanel/CreateAutomationModal.svelte
+++ b/packages/builder/src/components/automation/AutomationPanel/CreateAutomationModal.svelte
@@ -1,6 +1,4 @@
-
(touched = true)} />
+
(touched = true)}
+ updateOnChange={false}
+ />
{#if touched && !value}
{/if}
diff --git a/packages/builder/src/components/automation/Shared/CreateWebhookModal.svelte b/packages/builder/src/components/automation/Shared/CreateWebhookModal.svelte
index 59bf818b71..86eadd66a1 100644
--- a/packages/builder/src/components/automation/Shared/CreateWebhookModal.svelte
+++ b/packages/builder/src/components/automation/Shared/CreateWebhookModal.svelte
@@ -1,17 +1,18 @@
+
+
+
+
+
+
+
diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/ButtonActionEditor.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/ButtonActionEditor.svelte
index 6a23ba8cbd..2c5f07240e 100644
--- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/ButtonActionEditor.svelte
+++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/ButtonActionEditor.svelte
@@ -42,29 +42,22 @@
return
}
try {
- await automationStore.actions.create({
- name: parameters.newAutomationName,
- })
- const appActionDefinition = $automationStore.blockDefinitions.TRIGGER.APP
- const newBlock = $automationStore.selectedAutomation.constructBlock(
+ let trigger = automationStore.actions.constructBlock(
"TRIGGER",
"APP",
- appActionDefinition
+ $automationStore.blockDefinitions.TRIGGER.APP
)
-
- newBlock.inputs = {
+ trigger.inputs = {
fields: Object.keys(parameters.fields ?? {}).reduce((fields, key) => {
fields[key] = "string"
return fields
}, {}),
}
-
- automationStore.actions.addBlockToAutomation(newBlock)
- await automationStore.actions.save(
- $automationStore.selectedAutomation?.automation
+ const automation = await automationStore.actions.create(
+ parameters.newAutomationName,
+ trigger
)
- parameters.automationId =
- $automationStore.selectedAutomation.automation._id
+ parameters.automationId = automation._id
delete parameters.newAutomationName
} catch (error) {
notifications.error("Error creating automation")
diff --git a/packages/builder/src/components/start/CreateAppModal.svelte b/packages/builder/src/components/start/CreateAppModal.svelte
index e3ce048a89..62194df3db 100644
--- a/packages/builder/src/components/start/CreateAppModal.svelte
+++ b/packages/builder/src/components/start/CreateAppModal.svelte
@@ -28,10 +28,10 @@
const validation = createValidationStore()
$: {
- const { name, url } = $values
+ const { url } = $values
validation.check({
- name,
+ ...$values,
url: url?.[0] === "/" ? url.substring(1, url.length) : url,
})
}
@@ -95,9 +95,9 @@
appValidation.url(validation, { apps: applications })
appValidation.file(validation, { template })
// init validation
- const { name, url } = $values
+ const { url } = $values
validation.check({
- name,
+ ...$values,
url: url?.[0] === "/" ? url.substring(1, url.length) : url,
})
}
diff --git a/packages/builder/src/components/start/UpdateAppModal.svelte b/packages/builder/src/components/start/UpdateAppModal.svelte
index 4385175816..59d2957bf5 100644
--- a/packages/builder/src/components/start/UpdateAppModal.svelte
+++ b/packages/builder/src/components/start/UpdateAppModal.svelte
@@ -24,10 +24,10 @@
const validation = createValidationStore()
$: {
- const { name, url } = $values
+ const { url } = $values
validation.check({
- name,
+ ...$values,
url: url?.[0] === "/" ? url.substring(1, url.length) : url,
})
}
@@ -37,9 +37,9 @@
appValidation.name(validation, { apps: applications, currentApp: app })
appValidation.url(validation, { apps: applications, currentApp: app })
// init validation
- const { name, url } = $values
+ const { url } = $values
validation.check({
- name,
+ ...$values,
url: url?.[0] === "/" ? url.substring(1, url.length) : url,
})
}
diff --git a/packages/builder/src/pages/builder/admin/index.svelte b/packages/builder/src/pages/builder/admin/index.svelte
index cc1a70b3bc..dc87054b0c 100644
--- a/packages/builder/src/pages/builder/admin/index.svelte
+++ b/packages/builder/src/pages/builder/admin/index.svelte
@@ -149,6 +149,7 @@