See llms.txt for all machine-readable content.

Back to Templates

Draft Spanish and English social posts from articles with OpenAI and Sheets

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

  1. Runs when you manually execute the workflow.
  2. Loads the article text, brand rules, LLM base URL/model, and a test-mode flag.
  3. Builds five platform-specific prompts (LinkedIn, X, Instagram, Facebook, and a newsletter teaser) with defined character limits.
  4. Calls an OpenAI-compatible HTTP endpoint once per platform to request JSON output containing Spanish and English drafts.
  5. 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.
  6. 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

  1. Paste your article and update brand rules, LLM base URL, model, and test_mode in the Article + Rules step.
  2. Create an HTTP Header Auth credential (Authorization: Bearer YOUR_API_KEY) for your OpenAI-compatible provider and select it for the LLM request.
  3. 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.