1.0.1 • Published 2 years ago
alloy-sdk v1.0.1
alloy-sdk
This is a tiny wrapper that makes a POST request to run an Alloy workflow.
Usage
import {runAlloy} from 'alloy-sdk';
...
await runAlloy({
// You can find this on Step 4 of the Webhook block in your workflow
workflowId : '<workflowId>',
// required for authenticated workflows; found in Forge Settings
apiKey: '<apiKey>',
// each parameterName should match what you entered in the Parameter fields on the Webhook block
data: {
parameterName: 'Parameter Value'
},
// Set this flag to retrieve output from workflow
returnExecutionData:true,
});
Workflow Output
If the returnExecutionData
option is set, then runAlloy()
will return an array of all block output. Be aware that the returnExecutionData
flag can add a significant amount of latency, since the function will have to wait for the workflow to finish running.