This is best addressed using environment variables.
Did you use the OL Connect Automate installer for your installation?
When using the installer, you should find a file named olca.environments.json in the following location:
C:\ProgramData\Objectif Lune\OL Connect Automate
In this file, you can define environment- or local-machine-specific variables. The file is JSON-based and uses key-value pairs, where each key is the name of an environment variable that can be used in your flows.
For example:
{
"ENV_INSTANCE": "olca-local-dev",
"ENV_WORKSPACE": "C:\\workspace"
}
Note the use of double backslashes in the path. These are required to escape backslashes correctly in JSON.
These variables can then be used in Change nodes, Function nodes, JSONata expressions, and other places in your flows.
For example, in a Folder Capture node, you can use JSONata to set the path to an in folder like this:
$env("ENV_WORKSPACE") & "\\letters\\in"
This basically results in:
C:\\workspace\\letters\\in
On another machine, the workspace could be located somewhere else, for example:
D:\\automate\\some_other_folder\\letters\\in
Other example usage:
Reading the env var to a variable in a Function node:
let workspace = env.get("ENV_WORKSPACE")
msg.targetFolder = `${workspace}\\letters\\out`
// Or:
// msg.targetFolder = env.get("ENV_WORKSPACE") + "\\letters\\out"
return msg;
This approach lets you keep your flows portable across different machines while only changing the environment-specific configuration.
I hope this helps,
Erik