BuildShipBBuildShip
Powered by
Greg_OG
BuildShip•2y ago•
2 replies
Greg_O

Code from Buildship docs (setting variables) not working for workflow variables

Hi,
I'm reading the docs on using variables (https://docs.buildship.com/env-var).
The provided code (for reading, setting and deleting variables) works but only for project variables, the code for workflow variables throws an error ("Couldn't save project environment variables")

Example.
I use the code from the documentation (see below) and get an error. If I comment out the 2nd line (workflow variable) things work fine. Whatever format I use for the workflow variable code, I keep getting the same error. Any ideas?

Variations of the 2nd line
await env.set([{ name: 'first', value: 1 }]);
await env.set([{ name: 'first', value: 1 },]);
await env.set([{ name: 'first', value: 1 },'workflow']);

Script (from the website)
export default async function testFunctions({ value }, { env }) {
await env.set([{ name: 'first', value: 1 }]); // workflow - not working
await env.set([{ name: 'third', value: 3 }], 'project'); // project - working fine
return true;
}
BuildShip banner
BuildShipJoin
Join founders, builders, devs using Low-code / No-code to create backend, APIs, scheduled Jobs, automation, AI workflows
7,971Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Workflow-level Variables
ClintonCClinton / ❓・buildship-help
2y ago
Error response from Buildship Workflow even if success
FrancoisFFrancois / ❓・buildship-help
2y ago
I need help with "BuildShip Trigger & Execute Workflow Nodes" - (Not working)
Ugo_AugustusUUgo_Augustus / ❓・buildship-help
2y ago
Run "Execute BuildShip Workflow" asynchronously?
BrianBBrian / ❓・buildship-help
13mo ago