capabilities.work

Run a Script and Await its Result

A 4-step recipe with Windmill. We can help you get access.

Recipe · 4 steps

Run a Script and Await its Result

Run a Windmill script by path and wait for the asynchronous job result.

  1. Fetch the script metadata to confirm the path exists and to surface the expected argument schema before running it.
  2. Submit an asynchronous run of the script by path. The response body is the newly created job UUID as plain text.
  3. Poll the completed-result-maybe endpoint. While the job is still running the completed flag is false, so the flow loops back to poll again; once completed it proceeds to read the full job record.
  4. Read the full completed job record to capture the result payload, success flag and execution timing.
What you'll need to have ready
  • token: Windmill API token presented as a Bearer credential.
  • workspace: The Windmill workspace id (e.g. "demo").
  • path: The script path to run (e.g. "f/examples/my_script").
  • args: The argument map passed to the script as its inputs.
For your developer

Arazzo workflow windmill:run-script-and-await-result, 4 operations: getScriptByPath → runScriptByPath → getCompletedJobResultMaybe → getCompletedJob. Specs on APIs.io.