Quick overview This workflow accepts a webhook request with a drama topic, genre, tone, and size constraints, uses Python-based genre classification plus OpenAI GPT‑4.1 to generate a full script as structured JSON, then returns the script to the caller and appends a summary log entry to Google Sheets. How it works Receives a POST webhook request containing the script topic, genre, tone, language, act count, and character count. Normalizes inputs by applying defaults, clamping acts to 1–5 and characters to 2–8, and adding request metadata like a request ID and timestamp. Classifies the genre in Python and prepares genre-specific guidance used to shape the script structure, then filters out requests marked as invalid. Sends the prepared parameters and genre guidance to OpenAI (GPT‑4.1) to generate a complete drama script as a single JSON object. Parses and validates the AI response as JSON, falls back to a safe wrapper if parsing fails, and enriches the result with counts for acts, scenes, and characters. Waits briefly and then returns the structured script to the webhook caller while also appending a summary row to a Google Sheets tab for tracking.
Tags
Related workflows
See all AI Automation→Manage Google and Trustpilot reviews with OpenAI and Slack
Quick overview This workflow runs hourly to fetch new Google Business Profile and Trustpilot reviews, deduplicates them, uses OpenAI via a LangChain agent to draft sentiment-aware replies, escalates negative reviews in Slack, and routes positive replies to Slack for approval before posting the reply back to Trustpilot. How it works Runs every hour on a schedule. Fetches the latest reviews from the Google Business Profile API and the Trustpilot API and combines the results. Deduplicates reviews by tracking previously seen review IDs in workflow static data and stops if there are no new reviews. Processes each new review and uses OpenAI (via a LangChain agent) to generate structured JSON containing sentiment, a draft reply, and an optional suggested resolution. Sends negative reviews to a Slack channel for the owner along with the suggested resolution. Sends positive draft replies to Slack for one-tap approval (with a 24-hour timeout) and, if approved, publishes the reply to the Trustpilot API. Sends a Slack alert to the ops channel if the workflow errors. Setup Configure authentication and replace placeholders for the Google Business Profile reviews endpoint (account and location) i
Send weekly blended ad performance reports with Meta, Google Ads, GA4 and OpenAI
Quick overview This workflow runs every Monday at 8am to pull the last 7 days of performance from Meta Ads, Google Ads, and GA4, calculate blended KPIs, generate an OpenAI-powered narrative summary, email an HTML report via Gmail, and post an internal update (and errors) to Slack. How it works Runs every Monday at 8am on a scheduled trigger. Fetches the last 7 days of spend and engagement metrics from the Meta Ads Insights API, campaign cost and conversion metrics from the Google Ads API, and conversions and revenue by channel from the GA4 Reporting API. Combines the three datasets and calculates blended KPIs including total spend, total conversions, total revenue, and ROAS. Sends the computed metrics to an OpenAI chat model to generate a 3–4 sentence client-friendly performance summary with one risk and one recommendation. Builds a simple HTML report containing the KPIs and AI summary. Emails the HTML report to the client via Gmail and posts a brief confirmation with spend and ROAS to a Slack channel. If the workflow fails, posts an error alert message to an ops Slack channel. Setup Configure authentication for the HTTP requests to Meta Ads (access token), Google Ads (OAuth/access
Generate executive decision briefings from APIs with OpenAI and Google Sheets
Quick overview This workflow runs daily or via an on-demand webhook to pull financial metrics, operational KPIs, and market quotes via HTTP APIs, then uses OpenAI to detect anomalies and generate an executive briefing that is POSTed to a dashboard endpoint and logged to Google Sheets. How it works Runs on a daily schedule or receives a POST request via a webhook to start an executive briefing run with a configurable lookback period. Fetches financial metrics, operational KPIs, and market data in parallel from three HTTP API endpoints and continues even if one source fails. Merges and normalizes the three datasets into a single snapshot, marking missing sources as unavailable so downstream steps keep a consistent structure. Uses OpenAI to analyze the snapshot for anomalies, unusual trends, and data gaps, returning a severity-scored findings JSON. Uses OpenAI again to turn the anomaly findings and raw metrics into a structured executive briefing with a health score, risks, opportunities, and recommended actions. Formats a final JSON payload and delivers it by POSTing to your dashboard endpoint and appending a summary row to a Google Sheets tracker. If the run was triggered by the web