Recipe view · 5 Dec 2026
Source text in, carousel PDF out. One AI call writes the slides; Python enforces the rules; a separate function renders the PDF; the final step returns it.
Generated from the recipe JSON, so this is exactly what runs. IDs and workspace details removed. Code on GitHub →
POST /linkedin-carousel-v1/carousel→LinkedIn carousel APILinkedIn carousel API⇢ asyncLinkedIn carouselPOST /linkedin-carousel-v1/carousel/result→LinkedIn carousel result APILinkedIn carousel→Render carousel PDFAPI endpoint · POST /linkedin-carousel-v1/carousel
POST /carousel {topic, source_text, audience?, handle?}: creates a carousel_runs row, starts LinkedIn carousel async, returns 202 with run_id. Collect with POST /carousel/result.
| # | Tag | Step | What it does |
|---|---|---|---|
| 1 | ACTION | Data table: add row carousel_runs | Create the run row (carousel_runs): run_id = this API job id, status running. |
| 2 | ACTION | Call recipe function (async) LinkedIn carousel | Start LinkedIn carousel asynchronously; it writes the PDF link onto the run row. |
| 3 | ACTION | Return HTTP response 202 | Accepted: return the run id at once (API Platform cuts sync jobs at 30 s). |
API endpoint · POST /linkedin-carousel-v1/carousel/result
POST /carousel/result {run_id}: returns the carousel run (status running | done | failed | not_found, pdf_url, checks).
| # | Tag | Step | What it does |
|---|---|---|---|
| 1 | ACTION | Data table: read rows carousel_runs | Read the run rows (get_records ignores the column filter, gotcha G05; matched in Python). |
| 2 | FORMULA | Python code | pick the row for this run_id, map column ids to names |
| 3 | ACTION | Return HTTP response 200 | Return the run. |
Recipe function · called by other recipes
Source text → LinkedIn carousel PDF. ONE Model Gateway call writes the slides; Python checks guarantee no em-dashes, word limits and no number that is not in the source; Render carousel PDF makes the 1080x1350 PDF. Planned with the Recipe Recipe.
| # | Tag | Step | What it does |
|---|---|---|---|
| 1 | CONTROL | Monitor (try) | Monitor the pipeline; on any error record the failure on the run row and fail the job. |
| 2 | AI | HTTP request Model Gateway /v1/chat/completions | one Model Gateway call writes the slides (hook, 6 to 8 content, CTA) as JSON. Source trimmed to 12k chars. |
| 3 | FORMULA | Python code | parse the answer, no em-dashes, word limits, drop any number not in the source, 6 to 8 content slides |
| 4 | CONTROL | If | stop if the checks failed |
| 5 | CONTROL | If | |
| 6 | ACTION | Data table: update row carousel_runs | Mark the run failed with the check results |
| 7 | CONTROL | Stop job (with error) | Not enough slides survived the checks: fail the job with the reasons (caught below, written to the run row). |
| 8 | ACTION | Call recipe function (waits) Render carousel PDF | render the PDF (recipe function Render carousel PDF, which holds the render service connection) |
| 9 | CONTROL | If | stop unless the render says done |
| 10 | CONTROL | If | |
| 11 | ACTION | Data table: update row carousel_runs | Mark the run failed with the render error |
| 12 | CONTROL | Stop job (with error) | Render failed: fail the job with the render error. |
| 13 | CONTROL | If | |
| 14 | ACTION | Data table: update row carousel_runs | Store the PDF link on the run row (carousel_runs) for the API caller |
| 15 | ACTION | Return result | return the carousel PDF |
| 16 | CONTROL | On error | |
| 17 | CONTROL | If | |
| 18 | ACTION | Data table: update row carousel_runs | Mark the run failed with the reason |
| 19 | CONTROL | Stop job (with error) | End the job as FAILED after recording the error. |
Recipe function · called by other recipes
Carousel JSON → render service /carousel-pdf → PDF link. Called by LinkedIn carousel.
| # | Tag | Step | What it does |
|---|---|---|---|
| 1 | ACTION | HTTP request POST /carousel-pdf | POST the checked carousel to the render service /carousel-pdf (weasyprint, 1080x1350 portrait, Workato deck look) and get back the PDF link. Always answers 200 with status done|failed. |
| 2 | ACTION | Return result | Return the PDF link |