Updating a Workflow using Import from JSON fails

  1. My goal: Is to import a workflow from its JSON
  2. Issue:

Error saving workflow

Workflow with the same name already exists in this folder.
3) Steps I've taken to troubleshoot:
Importing as a fresh workflow with a fresh name works, but I can't import /replace an existing workflow without that error. Its not related to the file name used

  1. Additional info: Cloud, same issue on Safari & Chrome
1 Like

Hi @mawdo81,

I understand the issue you're facing while importing a workflow.

I tested the same scenario in my Retool account and found that the error seems to occur when a workflow with the same name already exists in the destination folder.

Here's what I observed:

  • If I try to import a workflow into a folder where another workflow with the same name already exists, the import fails with the duplicate name error.
  • When I change the workflow name to a different value before importing, the import completes successfully.

So, as a workaround, try the following:

  1. Import the workflow JSON.
  2. Before clicking Import, change the workflow name to a unique name.
  3. Then proceed with the import.

This worked consistently in my testing and allowed the workflow to be imported successfully.

If you're still seeing the error even after using a unique workflow name, could you share the exact error message or a screenshot? That would help determine whether it's the same issue or something different.

1 Like

Ok, so importing a workflow also imports its name, even if you're importing it to an existing workflow? That would marry up but its quite an odd behaviour and not intuitive to the user at all...

1 Like

Hi @mawdo81 , I ran across this just this week. I agree it is odd behaviour and would almost consider it a bug. At least you now have the workaround.

2 Likes

Hi @mawdo81!

Sorry for the confusion here! When you import a JSON export into an existing workflow, Retool also imports the name stored inside the JSON, not just the logic.

So, even though you're importing into a folder that already has a workflow of that name, Retool tries to create a workflow with that same name again and conflicts with itself, throwing the error that you were seeing.

As @WidleStudioLLP suggested, renaming it before exporting would be the best course of action here :+1: I'll also file an internal report to make this more intuitive for users!

Let me know if you have any other questions!

-Jen

1 Like