WorkatoBuilds, by Workloft ← All builds

Recipe view · 5 Dec 2026

Video script. The recipes.

A staged recipe that stops to ask a human between stages: script from demo notes, revise with notes, then LinkedIn post copy from the final transcript. One data table row holds the state.

4recipes
30steps
1AI
4formula / Python
16action
9control

Generated from the recipe JSON, so this is exactly what runs. IDs and workspace details removed. Code on GitHub →

How the recipes connect

API endpoint · POST /video-script-v1/video/start

Video script API

POST /video/start {context_json, input_text, topic}: new video_runs row, stage script async, 202 {run_id}.

Inputcontext_json, input_text, topic
Outputstatus, run_id, message
ConnectionsAPI Platform, Data tables, Recipe functions
#TagStepWhat it does
1ACTIONData table: add row video_runsCreate the run row: run_id = this API job id, stage script, status running
2ACTIONCall recipe function (async) Video script stageStart stage script asynchronously
3ACTIONReturn HTTP response 202Accepted: return the run id at once

API endpoint · POST /video-script-v1/video/next

Video script next API

POST /video/next {run_id, stage: revise|post, input_text}: starts the next stage async, 202.

Inputrun_id, stage, input_text
Outputstatus, run_id, message
ConnectionsAPI Platform, Data tables, Python, Recipe functions
#TagStepWhat it does
1ACTIONData table: read rows video_runsRead the run rows (filter in Python, G05)
2FORMULAPython codefind this run's row and record id
3CONTROLIfOnly start a stage for a known run that is not already running
4ACTIONData table: update row video_runsMark the run running for this stage
5ACTIONCall recipe function (async) Video script stageStart the stage asynchronously
6ACTIONReturn HTTP response 202Accepted
7CONTROLElse
8ACTIONReturn HTTP response 202Not started

API endpoint · POST /video-script-v1/video/result

Video script result API

POST /video/result {run_id}: status needs_input | done | running | failed, plus script, post, questions, checks.

Inputrun_id
Outputstatus, run_id, stage, topic, script_md, post_text, questions, checks, error, versions_json
ConnectionsAPI Platform, Data tables, Python
#TagStepWhat it does
1ACTIONData table: read rows video_runsRead the run rows (filter in Python, G05)
2FORMULAPython codethis run's row (versions_json = number of script versions)
3ACTIONReturn HTTP response 200Return the run

Recipe function · called by other recipes

Video script stage

Staged video script (house rule H06): stage script | revise | post. Python builds ONE Model Gateway request per stage from the run row; Python checks (no em-dashes, no trailer lines, only real UI labels, no money on dashboard beats, length vs target, post numbers only from the transcript). Bob asks Alfred between stages.

Inputrun_id, stage, input_text, context_json, run_record_id
Outputstatus, stage, script_md, post_text, questions, checks
ConnectionsData tables, HTTP (Workato AI Gateway), Python, Recipe functions
#TagStepWhat it does
1CONTROLMonitor (try)Monitor the stage; on any error mark the run failed and fail the job.
2ACTIONData table: read rows video_runsread video_runs (the run row holds the context and the current script)
3FORMULAPython codeload the run state and build the ONE gateway request for this stage
4AIHTTP request Model Gateway /v1/chat/completionsone Model Gateway call for this stage (script, revise or post), JSON out
5FORMULAPython codeparse, fix dashes, check UI labels / trailer lines / money / length / numbers, render markdown
6CONTROLIfthe answer did not parse or had no beats
7ACTIONData table: update row video_runsMark the run failed with the reasons
8CONTROLStop job (with error)Fail the job
9CONTROLIfSave: the post stage writes post_text only; script stages write the script and its version history
10ACTIONData table: update row video_runsSave the post copy on the run row
11CONTROLElse
12ACTIONData table: update row video_runsSave the script version on the run row
13ACTIONReturn resultReturn the stage output and what Bob must ask Alfred
14CONTROLOn error
15ACTIONData table: update row video_runsMark the run failed
16CONTROLStop job (with error)End the job as FAILED after recording the error

Data tables