Configurations
Learn about Configurations in Laminar
Configurations in Laminar are key-value stores that manage environment-specific settings, credentials, and properties for workflows. They enable you to run the same workflow with different settings across environments or customers.
Usage
To understand how configurations work, we'll use the completed example from Getting Started.
Suppose we had different API base urls for each environment: STAGING
and PROD
. To be able to reuse the workflow with different variables, we would need to create two new configurations. To do so:
from the workflow editor, click on the Select a configuration dropdown
click on the New Configuration from the menu. It should bring up a configuration form
Fill out configuration form. Enter name, id and set of properties
[OPTIONAL] Repeat steps 1 through 3 for the second configuration
Update step programs. Substitute the hardcoded value to abstract with the syntax
{{config.<configuration_property_key>}}
and save your changes.
Example:
(data) => {
// The body of the request is the output from the previous step (step_1)
const requestBody = data.step_1.data;
return {
"lam.httpRequest": {
"method": "POST",
- "url": "https://shipping-logistics-loic21.replit.app/api/orders",
+ "url": "{{config.shipping_api_base_url}}",
"headers": {
"Content-Type": "application/json"
},
"body": requestBody
}
};
}
To run the workflow with a specific configuration, make sure you select the right configuration from the editor before:
clicking on the Run Workflow button if triggering the workflow in-app
copying the workflow execution link if triggering workflow remotely
Last updated
Was this helpful?