diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index c9893e6ca8..b4b90e839c 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -181,6 +181,7 @@ class App { const newWorkflowData = req.body; + newWorkflowData.name = newWorkflowData.name.trim(); newWorkflowData.createdAt = this.getCurrentDate(); newWorkflowData.updatedAt = this.getCurrentDate(); diff --git a/packages/editor-ui/src/components/mixins/workflowHelpers.ts b/packages/editor-ui/src/components/mixins/workflowHelpers.ts index 7b8e5fb377..ffef68b209 100644 --- a/packages/editor-ui/src/components/mixins/workflowHelpers.ts +++ b/packages/editor-ui/src/components/mixins/workflowHelpers.ts @@ -399,7 +399,7 @@ export const workflowHelpers = mixins( if (currentWorkflow === undefined || withNewName === true) { // Workflow is new or is supposed to get saved under a new name // so create a new entry in database - workflowData.name = workflowName as string; + workflowData.name = workflowName.trim() as string; if (withNewName === true) { // If an existing workflow gets resaved with a new name