See llms.txt for all machine-readable content.

Back to Templates

Gate and rewrite social posts with TypeSafe Jev and OpenAI GPT-4o mini

Quick overview

This workflow drafts or validates a social post, scores it with TypeSafe Jev against quality and overclaim thresholds, rewrites failing copy with OpenAI up to a set limit, and sends unresolved posts to Telegram for human review before you publish.

How it works

  1. Runs manually or is triggered by another n8n workflow with optional inputs like product facts, audience, platform, and an existing draft.
  2. If no draft is provided, OpenAI generates an under-80-word post based only on the supplied product facts.
  3. TypeSafe Jev scores the post for overall quality and flags issues like overclaiming, weak hook, lack of clarity, hard-sell tone, typos, and being off-topic.
  4. The workflow evaluates the Jev results against your minimum quality and maximum overclaim thresholds and decides to publish, rewrite, or request human review.
  5. When rewriting is needed, OpenAI rewrites the post using the specific feedback and the workflow re-scores it with TypeSafe Jev until it passes or the rewrite limit is reached.
  6. If the post still fails after the maximum rewrites (or scoring fails), the workflow sends the post and scores to Telegram for human review; otherwise it outputs the approved post for you to connect to your publishing step.

Setup

  1. Add a TypeSafe Jev API key as an HTTP Bearer Auth credential for the TypeSafe API request.
  2. Add OpenAI credentials for the draft and rewrite steps (gpt-4o-mini is configured by default).
  3. Add Telegram bot credentials and set your target telegramChatId in the configuration values.
  4. Update the configuration values (facts, audience, platform, language, and thresholds like qualityMin, overclaimMax, and maxRewrites) and replace the “Passed” placeholder with your actual publishing node (for example Threads, X, or LinkedIn).

Additional info

Video walkthrough: https://youtu.be/5x8tIN3mZ6w