diff --git a/src/lib/components/AutomationModal.svelte b/src/lib/components/AutomationModal.svelte
index 606d13271..35991c4dc 100644
--- a/src/lib/components/AutomationModal.svelte
+++ b/src/lib/components/AutomationModal.svelte
@@ -225,12 +225,14 @@
if (automation) {
await updateAutomationById(localStorage.token, automation.id, form);
toast.success($i18n.t('Automation updated'));
+ show = false;
+ dispatch('save', { id: automation.id });
} else {
- await createAutomation(localStorage.token, form);
+ const created = await createAutomation(localStorage.token, form);
toast.success($i18n.t('Automation created'));
+ show = false;
+ dispatch('save', { id: created?.id });
}
- show = false;
- dispatch('save');
} catch (e: any) {
toast.error(e?.detail ?? `${e}` ?? 'Failed to save');
} finally {
diff --git a/src/lib/components/automations/AutomationEditor.svelte b/src/lib/components/automations/AutomationEditor.svelte
new file mode 100644
index 000000000..62e0ce3be
--- /dev/null
+++ b/src/lib/components/automations/AutomationEditor.svelte
@@ -0,0 +1,907 @@
+
+
+