Quick overview
This workflow takes a pasted article, generates Spanish and English social post drafts for five platforms using an OpenAI-compatible chat completions API, checks each draft against platform character limits, and appends the results to a Google Sheets tab for human review (nothing is published).
How it works
- Runs when you manually execute the workflow.
- Loads the article text, brand rules, LLM base URL/model, and a test-mode flag.
- Builds five platform-specific prompts (LinkedIn, X, Instagram, Facebook, and a newsletter teaser) with defined character limits.
- Calls an OpenAI-compatible HTTP endpoint once per platform to request JSON output containing Spanish and English drafts.
- Parses the model response, creates one row per language (ES/EN), calculates character counts, flags whether each draft is within the platform limit, and records errors without stopping the run.
- Either outputs the rows only when test mode is enabled or appends the rows to the Drafts sheet in Google Sheets with status set to needs_review or error.
Setup
- Paste your article and update brand rules, LLM base URL, model, and test_mode in the Article + Rules step.
- Create an HTTP Header Auth credential (Authorization: Bearer YOUR_API_KEY) for your OpenAI-compatible provider and select it for the LLM request.
- Add Google Sheets credentials, set the target spreadsheet ID, and create a Drafts tab with columns: created_at, platform, language, draft, chars, within_limit, status, note.
Requirements
- An LLM API that supports OpenAI-style chat completions (OpenAI or a compatible provider) with an API key, and optionally a Google Sheets account with a tab named Drafts.