Launch a bound workflow
Bind a workflow in the Frontend Page resource:
workflowBindings: {
writePost: ref('workflowDefinitions', 'writePost'),
}
Then use the alias from page code:
const result = await host.runWorkflow('writePost', {
prompt: 'Explain why a smaller roadmap can improve retention.',
channel: 'linkedin',
});
The host resolves writePost to the installed workflow and pins the installation and app attribution server-side.
Handle failures
try {
const run = await host.runWorkflow('writePost', {prompt});
showRunStarted(run);
} catch (error) {
showError(error instanceof Error ? error.message : 'Unable to start workflow');
}
The default request timeout is 15 seconds. You may configure a different timeout when creating the client, but workflow execution itself remains asynchronous after a run is accepted.