Draft a workflow, told as it goes
The same request, limits and answer as drafting a workflow, sent as Server-Sent Events so you can show what it’s doing during the 20 to 50 seconds a draft takes: stage events (reading, apps with the apps it picked, planned with the step count, repairing when the check found problems, checked), then one draft event with the draft, or one problem event with the standard problem body. A keep-alive comment every 10 seconds. Needs workflow:read.
Scopes: workflow:read
Authorizations
Headers
Body
Response
stage events as it works (reading, apps {apps}, planned {steps, name}, repairing {problems}, checked {steps}), then one draft (the POST /generate body) or one problem (the standard problem body). A : keep-alive comment every 10 s.
Server-Sent Events: event: stage|draft|problem lines, each with data: JSON.
"event: stage\ndata: {\"stage\": \"apps\", \"apps\": [\"HubSpot\", \"WhatsApp\"]}\n\nevent: draft\ndata: {\"draft_id\": \"wfd_…\", \"name\": \"…\", \"steps\": […]}\n\n"