Please save the workflow first to use $workflow error in existing workflow

Describe the problem/error/question

For the existing workflow which was running fine, throwing error as “Please save the workflow first to use $workflow”

What is the error message (if any)?

ERROR: save workflow to view
Please save the workflow first to use $workflow

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version: 1.21.0
  • **Database (default: SQLite): postgres
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): AKS

Hi @Shalini, I am sorry you’re having trouble. Unfortunately I could not reproduce the problem based on your description.

Are you able to save the workflow? Do you see any error in the server logs when trying to do so? Does the workflow function as expected after saving the workflow?

And does the issue persist when upgrading to the newest available n8n release 1.22.3?

The workflow was running fine for an year, it is saved and scheduled to run every half an hour, but with the recent update only faced the issue.
I will try to upgrade the version, for the workaround instead of picking workflow id({{ $ }}) in runtime updated it to pick the constant value(49)

Also just wanted to check very fast if it is an execution or a display issue. So is the workflow still running fine without an error but you see this confusing error message just if you look at an execution in the UI? Or does the workflow actually fail because of this?

Workflow fails, please open node “Create semaphore” and check

I am sadly not able to reproduce this issue. I can see that the UI does not display it correctly, but I am somehow unable to make the workflow fail. Can you please post a simple workflow that reproduces this issue we can then have a look. Thanks!

With latest update even I can’t reproduce the error, may be it was with 1.21 and 1.23 is working fine

1 Like

That is good to hear that it is working in the latest version. Please update us if that issue returns again. Thanks!

1 Like