# Validate content briefs before the AI node: a three-node pattern

**URL:** <https://community.n8n.io/t/validate-content-briefs-before-the-ai-node-a-three-node-pattern/320955>\
**Category:** Tips & Tricks\
**Created:** [October 12, 2026, 6:52pm UTC](https://community.n8n.io/t/validate-content-briefs-before-the-ai-node-a-three-node-pattern/320955 "2026-10-12T18:52:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adjair\_Gouveia](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/adjair_gouveia/32/190018_2.png) [@Adjair\_Gouveia](https://community.n8n.io/u/Adjair_Gouveia)\
**Post date:** [October 12, 2026, 6:52pm UTC](https://community.n8n.io/t/validate-content-briefs-before-the-ai-node-a-three-node-pattern/320955/1 "2026-10-12T18:52:31Z")

</div>

For small agencies building content workflows, a deterministic input check can catch incomplete briefs before an AI request.

Start with Manual Trigger → Edit Fields → Code.

Supply topic, audience, search\_intent and content\_pillar. Reject missing, non-string or whitespace-only values. Trim valid strings and lowercase search\_intent. Keep the node’s default stop-on-error behaviour.

Test with fictional data:

- Complete brief: passes
- Empty content\_pillar: fails and names the field
- Numeric audience: fails the type check
- Restored valid input: passes again

Connect the AI step only to the validator’s successful output. A Code node using $input.first() handles only one incoming item; add deliberate per-item processing before connecting a spreadsheet or queue.

These checks establish structure; they don’t validate search demand, factual accuracy or publication readiness.
