# AI Agent Workflows: n8n Research-to-Proposal Pipeline

> You will build a multi-agent n8n workflow that researches incoming client requests with OpenAI, validates findings in Python, and drafts proposals for review. It replaces the hand-built proposal loop with a trigger, checks, and a clear approval gate.

- Canonical page: https://syswithai.com/blog/ai-agent-workflows-n8n-proposals/
- Site: syswithai (syswithai.com)
- Format: executable automation workflow
- Published: 2026-11-06
- Last updated: 2026-11-06
- Author: Syswithai
- Citation policy: every data claim links, in the same sentence, to the page it came from. Claims without a source are not published.

When a new client request lands, someone on your team usually opens a blank doc, digs through past proposals, skims the brief, and types a custom draft by hand. That manual loop stalls replies, drops details, and leaves quality tied to whoever is free that hour. This guide shows you how to build **AI agent workflows** in n8n that take an incoming request, research it [with](https://syswithai.com/blog/reddit-pain-points-make-openai-airtable/) OpenAI, validate evidence through a small Python script, and draft a customized proposal ready for human review.

Last updated: November 2026

## Workflow at a glance

| Field | Detail |
| --- | --- |
| Problem it solves | Hand-built proposals that copy-paste old language and miss request-specific research |
| Manual steps it replaces | Reading the intake form, searching prior wins, outlining scope, drafting pricing language, formatting the proposal |
| Trigger | Webhook or form submission with client_name, request_summary, budget_band, deadline, and optional attachments notes |
| Output | Structured research brief JSON plus a draft proposal document, stored and flagged for human approval |
| Tools | n8n, OpenAI (via n8n OpenAI nodes), custom Python script for evidence checks, optional Google Docs or Notion for the draft |
| Skill level needed | Comfortable building n8n workflows; basic Python for one validation script |
| Complexity | Medium, because you split research, validation, and drafting into separate agents and add retries for rate limits |

## What you need before you start

Get the accounts and sample payload ready first. Skipping credentials is the usual reason the first test run fails.

- **n8n instance** (Cloud or self-hosted) with permission to create workflows, credentials, and Code or Execute Command nodes for Python.

- **OpenAI API key** created in your OpenAI account. n8n documents OpenAI credentials as the authentication method for its OpenAI node.

- **n8n OpenAI credential** saved under Credentials with that API key. You will attach it to every OpenAI-related node.

- **Python 3.10+** available to the n8n host (or a reachable runner) so the evidence-validation script can run.

- **Sample intake payload** as JSON: client_name, company, request_summary, goals, budget_band, deadline, industry, must_haves, nice_to_haves, competitor_notes.

- **Destination for drafts** such as a Google Drive folder, Notion database, or Slack channel your reviewers already check.

Permissions to confirm: your OpenAI key must allow Responses or Chat Completions for the model you pick. Your n8n user needs [workflow](https://syswithai.com/blog/n8n-workflow-automation-templates-invoices/) edit rights. If you write drafts to Drive or Notion, create those OAuth credentials in n8n before Step 1.

Test data tip: keep one "happy path" request and one thin request (empty goals, missing budget) so later tests cover both.

## How the workflow runs

Think of three cooperating [agent](https://syswithai.com/blog/ai-agent-workflow-small-business-slide-generator/)s inside one n8n workflow, not one giant prompt.

1. **Trigger** receives the intake JSON and stamps a run_id plus received_at.

2. **Normalize** maps fields into a single item: client_name, request_summary, research_queries[], constraints{}.

3. **Research agent (OpenAI)** returns findings[], open_questions[], and source_hints[] as JSON.

4. **Evidence agent (Python)** scores each finding, drops empty or duplicate claims, and returns validated_findings[] plus reject_reasons[].

5. **Branch**: if validated_findings length is below your threshold, route to a "needs more research" path; otherwise continue.

6. **Proposal agent (OpenAI)** drafts sections (summary, approach, timeline, assumptions, next steps) from validated_findings and constraints.

7. **Human review gate** posts the draft to Slack or email and waits for approve / revise.

8. **Output** stores the approved draft and closes the run.

Data fields [that](https://syswithai.com/blog/ai-trends-2026-productivity-gains/) move between steps: run_id, client_name, request_summary, research_queries, findings, validated_findings, reject_reasons, draft_markdown, review_status. Decision points sit after evidence validation and after human review.

## Build it step by step

### Step 1: Create the workflow and webhook trigger

In n8n, create a new [work](https://syswithai.com/blog/best-ai-automation-tools-2026/)flow named "Client request to proposal agents". Add a **Webhook** node.

- HTTP Method: POST

- Path: client-intake

- Response: When Last Node Finishes

- Authentication: Header Auth if this webhook is public

Add a **Set** node named Normalize Intake. Map:

```
run_id = {{$now.toMillis()}}
client_name = {{$json.body.client_name}}
company = {{$json.body.company}}
request_summary = {{$json.body.request_summary}}
goals = {{$json.body.goals}}
budget_band = {{$json.body.budget_band}}
deadline = {{$json.body.deadline}}
industry = {{$json.body.industry}}
must_haves = {{$json.body.must_haves}}
nice_to_haves = {{$json.body.nice_to_haves}}
competitor_notes = {{$json.body.competitor_notes}}
research_queries = [
  {{$json.body.company}} + " " + {{$json.body.industry}} + " overview",
  {{$json.body.request_summary}} + " common delivery approaches",
  {{$json.body.competitor_notes}} + " differentiation"
]
```

**Check:** Execute the webhook with your sample JSON. Normalize Intake should show every field populated and three research_queries strings.

### Step 2: Add the research agent with OpenAI

Add an **OpenAI** node (app node). Connect your OpenAI credential.

- Resource / Operation: text operation that generates a model response (or Message a Model, depending on your n8n version label)

- Model: pick a current OpenAI model your account supports

- Messages: system + user (paste from the Prompts section below)

- Maximum tokens: set high enough for structured JSON research (raise the limit if the response looks truncated)

n8n's OpenAI Chat Model node can use either Chat Completions or Responses API, and n8n says OpenAI recommends Responses API for new projects in its OpenAI Chat Model docs. Prefer the Responses path when your n8n build exposes it.

After the OpenAI node, add a **Code** node named Parse Research JSON that extracts the model text and runs JSON.parse. On failure, set parse_ok=false and raw_text for debugging.

**Check:** findings should be an array of objects with claim, why_it_matters, and confidence. open_questions should be an array of strings.

### Step 3: Add the evidence agent (Python)

Add an **Execute Command** node (or Code node in Python mode if your plan supports it) named Evidence Agent. Pass validated input as a temp JSON file or stdin.

```
#!/usr/bin/env python3
import json, sys, re

data = json.load(sys.stdin)
findings = data.get("findings") or []
validated = []
rejects = []

seen = set()
for i, f in enumerate(findings):
    claim = (f.get("claim") or "").strip()
    key = re.sub(r"\s+", " ", claim.lower())
    if not claim or len(claim) < 20:
        rejects.append({"index": i, "reason": "empty_or_too_short"})
        continue
    if key in seen:
        rejects.append({"index": i, "reason": "duplicate"})
        continue
    if f.get("confidence") not in ("high", "medium", "low"):
        rejects.append({"index": i, "reason": "bad_confidence"})
        continue
    seen.add(key)
    validated.append({
        "claim": claim,
        "why_it_matters": (f.get("why_it_matters") or "").strip(),
        "confidence": f.get("confidence"),
        "source_hint": (f.get("source_hint") or "").strip()
    })

print(json.dumps({
    "validated_findings": validated,
    "reject_reasons": rejects,
    "validated_count": len(validated)
}))
```

Map stdin to the research agent JSON. Store stdout back onto the item as evidence.

**Check:** For a normal sample, validated_count should be greater than zero and reject_reasons should list only the weak rows you seeded on purpose.

### Step 4: Gate on evidence quality

Add an **IF** node:

- Condition: {{$json.validated_count}} is greater than or equal to 3

- True: continue to proposal agent

- False: Slack/Email "Research thin for {{client_name}} - needs human research" and stop or loop back with a second research pass

**Check:** Drop two findings from the sample and confirm the false branch fires.

### Step 5: Draft the proposal with a second OpenAI agent

Add another **OpenAI** node named Proposal Agent. Same credential. Different system prompt (see Templates). Pass validated_findings, client fields, and constraints in the user message.

Ask for Markdown with fixed headings: Executive summary, Understanding of need, Proposed approach, Timeline, Assumptions, Investment framing, Next steps. Do not invent prices; leave Investment framing as ranges the human will fill.

Optional: add a **Convert to File** or Google Docs node to write the draft where reviewers work.

**Check:** Draft contains every heading and references at least three validated claims by paraphrase, not invented stats.

### Step 6: Human review and finalize

Add a **Slack** (or Email) node with Approve / Request changes buttons if you use waiting nodes, or a simple notification plus a manual "Mark approved" webhook for smaller teams.

```
Proposal ready for {{client_name}}
Run: {{run_id}}
Validated findings: {{validated_count}}
Draft preview:
{{draft_markdown.substring(0, 800)}}...
```

On approve, write to your CRM or Drive and respond 200 on the original webhook if you held it open. On revise, feed reviewer notes back into Proposal Agent once.

**Check:** End-to-end test from webhook to Slack notification completes without red nodes.

### Step 7: Harden rate limits and retries

n8n documents that a rate-limited node errors and may show the service's 429 error message. Turn on Retry On Fail for both OpenAI nodes (for example 3 tries with wait between). n8n recommends Retry On Fail or Loop Over Items with Wait to handle rate limits; its HTTP Request node also supports batching with an interval between batches.

If you batch many intakes, split items and add a Wait node between OpenAI calls. n8n documents that OpenAI rate-limit errors can be mitigated by [splitting data into smaller chunks and adding a Wait node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/common-issues), or by using HTTP Request with its batch-limit option.

**Check:** Temporarily set max retries to 1 and confirm a forced failure surfaces a clear error, then restore retries.

## Prompts and templates

Use these verbatim first. Tighten after two real runs.

**Research agent system prompt**

```
You are a research agent for B2B proposals. Return ONLY valid JSON.
No markdown fences. No invented statistics, prices, or customer counts.
If you lack evidence for a claim, put it in open_questions instead of findings.

Schema:
{
  "findings": [
    {
      "claim": "string, specific and falsifiable",
      "why_it_matters": "string, how it changes the proposal",
      "confidence": "high|medium|low",
      "source_hint": "string, where a human would verify"
    }
  ],
  "open_questions": ["string"],
  "research_notes": "string"
}

Rules:
- 5 to 8 findings max
- Prefer mechanism and process over hype
- confidence=high only when source_hint is concrete
```

**Research agent user template**

```
Client: {client_name} at {company}
Industry: {industry}
Request summary: {request_summary}
Goals: {goals}
Budget band: {budget_band}
Deadline: {deadline}
Must-haves: {must_haves}
Nice-to-haves: {nice_to_haves}
Competitor notes: {competitor_notes}
Research queries:
{research_queries_bulleted}

Produce findings that help a human write a tailored proposal. Do not invent numbers.
```

**Proposal agent system prompt**

```
You draft first-pass client proposals for human review.
Write clear Markdown. Second person to the client where natural.
Never invent prices, discounts, timelines you were not given, or case-study results.
Use only validated_findings for factual claims about the client's space.
If budget_band is missing, say the investment section needs human pricing.

Required headings:
## Executive summary
## Understanding of need
## Proposed approach
## Timeline
## Assumptions
## Investment framing
## Next steps
```

**Proposal agent user template**

```
Write a proposal draft for {client_name} ({company}).

Request: {request_summary}
Goals: {goals}
Constraints: deadline={deadline}; budget_band={budget_band}; must_haves={must_haves}

Validated findings (JSON):
{validated_findings_json}

Open questions still unresolved:
{open_questions}

Tone: direct, practical, no hype words.
```

**Expected research JSON shape**

```
{
  "findings": [
    {
      "claim": "Discovery workshops usually surface hidden integration owners early.",
      "why_it_matters": "Lets the proposal include a named discovery phase before build.",
      "confidence": "medium",
      "source_hint": "Prior delivery notes / client org chart discussion"
    }
  ],
  "open_questions": ["Who signs off on security review?"],
  "research_notes": "Thin public info; lean on intake."
}
```

## Test it before you trust it

Run these before you point a real form at the webhook.

| Test input | Expected output |
| --- | --- |
| Full happy-path JSON with 6+ sentence request_summary | validated_count >= 3; draft has all seven headings; Slack/email fires |
| Empty request_summary ("") | Research agent returns mostly open_questions; IF gate takes false branch; no proposal draft |
| Duplicate findings forced in a mocked research response | Python agent rejects duplicates; validated_count reflects unique claims only |
| Malformed model output (trailing prose after JSON) | Parse Research JSON sets parse_ok=false; workflow stops with a clear error path |
| Very large request_summary (far longer than a normal brief) | Workflow still completes or fails gracefully with token/length handling; no silent truncation without a flag |
| Two identical webhook posts with same client payload | Two run_ids; no overwrite of the first draft unless you explicitly upsert by client+day |
| OpenAI credential removed | Node errors on auth; no partial proposal written as if successful |

Record pass/fail in a short checklist next to the workflow. Promote to production only when the happy path and the empty-input path both behave.

## Where it breaks and how to fix it

Auth expiry shows up as sudden 401/403 on OpenAI nodes after a key rotate. Recreate the OpenAI credential in n8n and re-select it on every OpenAI node.

Rate limits: a rate-limited node errors and may show the service's 429 message. Enable Retry On Fail, add Wait between batches, or use HTTP Request batching as described in n8n's rate limit guidance.

Quota problems: n8n documents [insufficient OpenAI quota](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/common-issues) as a possible cause of failed requests and notes that a balance top-up may take time to appear in the account. Wait, then retry; do not keep hammering the node.

Schema drift: the model returns extra keys or drops findings. Keep Parse Research JSON strict; on parse failure, store raw_text and notify instead of drafting.

LLM output errors: prose wrapped around JSON, or proposals that invent prices. Strengthen system prompts ("JSON only", "no invented prices") and reject drafts that match a simple regex for currency amounts you did not supply.

Duplicate runs: two form submits create two drafts. Add an Idempotency-Key header or hash(client_name + request_summary + day) in a Data Store check before research.

## Running costs and limits

No verified plan prices for OpenAI or n8n seats were supplied for this guide, so treat cost as something you measure on your own runs rather than a fixed quote.

Cost drivers to watch:

- OpenAI tokens per research call and per proposal call (model choice multiplies this)

- How many intakes you process per day

- Retries after rate limits (each retry spends tokens again)

- n8n execution time and any paid features you attach (Docs, Slack, Drive)

If you use n8n Gateway credits instead of only your own keys, n8n says its Gateway credits are billed per request at rates listed on its service-pricing page, with rates varying by model and service. n8n's Gateway credits documentation also distinguishes supported services and models from using a customer's own API keys. Prefer your own OpenAI key for this workflow unless you deliberately want Gateway routing.

For node behavior and limits while building, start from the official [n8n OpenAI node docs](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai) and confirm current OpenAI usage in your OpenAI dashboard after a pilot week.

## Variations and extensions

- **Sales team**: trigger from HubSpot or Pipedrive deal stage instead of a webhook; write the draft back to the deal note.

- **Agencies**: add a brand-voice snippet library retrieved before the proposal agent runs.

- **Productized services**: skip open research; map request types to fixed package templates and only customize the executive summary.

- **Make.com or Zapier**: same three-agent idea (research → validate → draft) if your team will not run n8n; keep the Python validator as a small HTTP microservice.

- **Multi-language clients**: add a final OpenAI node that translates the approved English draft, still blocking invented numbers.

## Hand this to ChatGPT or Claude

Paste the brief below (or this page link) into your AI assistant and ask it to adapt the build to your stack, credential names, and review channel.

```
GOAL
Build an n8n multi-agent workflow that turns an incoming client request into researched, validated findings and a human-reviewed proposal draft using OpenAI plus a Python evidence script.

TRIGGER
POST webhook path client-intake with JSON fields:
client_name, company, request_summary, goals, budget_band, deadline, industry,
must_haves, nice_to_haves, competitor_notes

STEPS
1. Webhook → Set/Normalize fields and research_queries[]
2. OpenAI research agent → JSON findings[], open_questions[]
3. Code node parses JSON; on failure stop with raw_text stored
4. Python evidence agent dedupes/filters findings → validated_findings[], validated_count
5. IF validated_count >= 3 else notify "needs research" and stop
6. OpenAI proposal agent → Markdown draft with fixed headings; no invented prices
7. Slack/Email human review; on approve store draft; on revise one rewrite pass
8. Enable Retry On Fail + Wait between batched OpenAI calls for rate limits

DATA FIELDS
run_id, client_name, company, request_summary, goals, budget_band, deadline,
industry, must_haves, nice_to_haves, competitor_notes, research_queries,
findings, open_questions, validated_findings, reject_reasons, validated_count,
draft_markdown, review_status

PROMPTS
Use a research system prompt that returns only JSON with findings/open_questions.
Use a proposal system prompt that requires seven Markdown headings and forbids invented prices.
User prompts must inject intake fields and validated_findings only.

ACCEPTANCE TESTS
- Happy-path intake yields validated_count >= 3 and a full draft
- Empty request_summary takes the needs-research branch
- Duplicate findings are rejected by Python
- Malformed model JSON does not produce a fake proposal
- Missing OpenAI credential fails closed

CONSTRAINTS
Second person instructional voice in docs. No fabricated statistics.
Cite only official n8n OpenAI/credential/rate-limit docs when stating product behavior.
Human must approve before any client send.
```

## Frequently Asked Questions

### Do I need separate OpenAI projects for research and drafting?

No. One API key and one n8n credential are enough. Separate nodes keep prompts and token use clear. Split projects only if your finance team needs separate invoices.

### Can this run without Python?

Yes, with tradeoffs. You can reimplement the evidence checks in an n8n Code node (JavaScript). Python is easier to unit test outside n8n, which helps when non-builders maintain the rules.

### What model should I pick?

Use a model your OpenAI account already allows for JSON-style answers. Confirm the operation and max-token fields against the current n8n text operations page for your n8n version.

### How do AI agent workflows differ from one big Zap?

AI agent workflows split roles: research, validation, drafting, review. Each step has its own prompt or script and a check before the next step runs. That structure makes failures visible instead of one opaque generation.

### Will this send proposals to clients automatically?

Not in the build above. The human review gate is intentional. Autodetect only after you trust tone and accuracy on real samples.

### What if OpenAI returns a 429 during a busy launch day?

Expect the node to error with a rate-limit signal. Follow n8n's guidance: retries, Wait nodes, and smaller batches from the handle rate limits docs and the OpenAI [common issues](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/common-issues) page.

### Where should drafts live?

Wherever your team already reviews work: Slack for quick edits, Drive/Docs for formal proposals, Notion for internal logs. Wire that node only after the draft text looks right in Executions.

## Your first step

Create the n8n workflow, add the webhook, and save your OpenAI credential. Send one sample intake today and stop when Normalize Intake shows clean fields. Tomorrow add the research agent. Build in slices so each check stays honest.

## Related Articles

- [Automate with AI Reddit Research: Make, OpenAI and Airtable](https://syswithai.com/blog/reddit-pain-points-make-openai-airtable/)

- [n8n Workflow Automation Templates: Extract Invoice Data to Sheets](https://syswithai.com/blog/n8n-workflow-automation-templates-invoices/)

- [Ai Agent Workflow for Small Business: Turn Notes into Slide Decks](https://syswithai.com/blog/ai-agent-workflow-small-business-slide-generator/)

- [Automate Business Lead Routing with Zapier and OpenAI](https://syswithai.com/blog/automate-business-lead-routing-zapier-openai/)

- [Best AI Automation Tools Cut Manual Work When Built Right](https://syswithai.com/blog/best-ai-automation-tools-2026/)

- [Back to Home](https://syswithai.com/)

## Sources

- [OpenAI | Nodes](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai)
