Save forder ID in local variable : set (edit field)?

Describe the problem/error/question

If am building a workflow to create and store a proposal (google docs ) in a client folder.
I need to check if the client folder exists and create if it doesn’t. Then save the proposal in the folder.
My ideal was to create a folderId variable to empty with set (edit field) node. Look for the client folder (google drive node) based on its name. depending on the result, create the folder and store its id in the folderId variable.

How do I create a local variable ? If set (edit field) node is the correct way, how to I get the variable on a downstream node ?

What is the error message (if any)?

The resource you are requesting could not be found

File not found: empty.

Please share your workflow

Information on your n8n setup

  • n8n version:
    1.38.2 (Cloud)
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via n8n cloud:
  • Operating system: window

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

You can use either Set or Code nodes. To refer to the property (aka variable) downstream if not directly attached, you would need to utilize the node reference as in Output of other nodes | n8n Docs.