NeuronWriter → WordPress Content Pipeline
Status: Draft for review
Last updated: 2026-07-28
Repo:rahul-10xers/ClaudeCode2.0(source of truth for all scripts & guides)
Table of Contents
- The Big Picture — Mermaid Flow
- What You Do vs What I Do
- The 4 Page Types
- How ACF Field Injection Works
- NW API vs NW MCP — What Each Unlocks
- The Complete Pipeline — Step by Step
- Credentials & Auth
- Open Questions for You
1. The Big Picture — Mermaid Flow
flowchart TB subgraph YOU["🔵 You (Human)"] A[Pick a keyword & page type] --> B[Create NW query<br/>app.neuronwriter.com<br/>1 analysis credit] B --> C[Share query URL/ID] C --> D[Upload images to WP<br/>Media Library, share IDs] end subgraph MCP["🟢 MCP Layer (free API calls)"] E[list-projects] --> F[new-query<br/>if not already created] F --> G[get-recommendations<br/>poll until ready] G --> H[get-competitors-content<br/>read competitor H2/H3] end subgraph BROWSER["🟡 Browser Layer (one session per article)"] I[Open NW query URL] --> J[Step 2: Select competitors] J --> K[Step 3: Generate meta title/desc] K --> L[Step 4: Open Content Designer Wizard] L --> M[Step 5: Paste content brief] M --> N[Step 6: Review outline] N --> O[Step 7: Extract facts from URLs] O --> P[Step 8: Generate article<br/>wait ~120s] P --> Q{Score ≥ 70?} Q -->|No| R[Step 9: Optimize<br/>Smart Headings → Auto-insert → FAQ] R --> Q Q -->|Yes| S[Step 10: Plagiarism check<br/>optional] end subgraph API["🟣 API Layer (direct REST calls)"] T[get-editor-content<br/>via MCP or NW API] --> U[Build WP payload<br/>by page type] U --> V[POST to WP REST API] V --> W[Re-save draft<br/>ACF fields need this] W --> X[Update Google Sheet<br/>tracker] end A --> MCP C --> BROWSER D --> API MCP --> BROWSER BROWSER --> API X --> Y[✅ Done<br/>Draft ready for review]
2. What You Do vs What I Do
You Do (human-only, cannot be automated)
| Step | Why you must do it |
|---|---|
| Pick a keyword + page type | Strategic decision — comparison, feature, free tool, or blog article? |
| Create the NW query | Costs 1 of 75 monthly analysis credits. I cannot spend your credits without your approval. |
| Upload images to WP Media Library | Images need a human to select/upload. I cannot invent image IDs. |
| Review the final draft | The pipeline produces a draft — you review and publish. |
| Decide on new page types | If we need a new template, you define the ACF fields. |
I Do (fully automated)
| Phase | What happens |
|---|---|
| MCP calls | List projects, create query (if you approve), poll until ready, read recommendations & competitor content |
| Browser automation | Drive the NW Content Designer wizard — select competitors, generate meta, paste brief, generate article, optimize score to ≥70 |
| API calls | Read final content from NW, build the correct payload for the page type, POST to WordPress, re-save draft, update Google Sheet |
| Payload assembly | Map NW’s HTML output to the correct ACF fields for each page type (see section 4) |
Hybrid (I do, but you provide input)
| Step | What I need from you |
|---|---|
| Content brief tokens | Feature name, what it does, target persona (for feature pages) |
| Competitor name | For comparison pages |
| Article topic + keywords | For blog articles |
| WP page ID | If updating an existing page (from sheet col U) |
3. The 4 Page Types
| Comparison | Free Tool | Feature | Article (Blog) | |
|---|---|---|---|---|
| Template | page-comparison.php | page-free-tools.php | page-features.php | single.php |
| WP type | page | page | page | post |
| ACF prefix | comp_* | ft_* | feat_* | Theme meta fields |
| Category | 18 | 46 | 9 | 3 |
| NW content type | landing-page | landing-page | landing-page | blog |
| Competitor type | landing pages | landing pages | landing pages | blog/informational |
| WP endpoint | wp/v2/pages | wp/v2/pages | wp/v2/pages | gr-articles/v1/create |
| Body content | ACF fields only | ACF fields only | ACF fields only | article_sections[] → block HTML |
| Publisher script | ✅ nw-to-comparison-page.js | ✅ nw-to-free-tool-page.js | ❌ Manual (script TBD) | ❌ Manual (script TBD) |
| Content source | NW article → curated into ACF | NW article → auto-parsed by nw-html-to-acf.js | NW article → manually curated into feat_* fields | NW article → mapped to article_sections[] patterns |
4. How ACF Field Injection Works
Comparison Pages (comp_* fields)
The script nw-html-to-comparison-acf.js parses NW’s HTML output:
NW HTML (H1, H2, H3, P, LI, TABLE tags)
│
▼
Regex tokenizer strips tables, lists, empty paragraphs
│
▼
Maps sections by H2 text patterns:
- "GrowReach vs [X]" → comp_comparison_table rows
- "Key Features" → comp_guide_sections[]
- "FAQ" → comp_faq_items[]
- Any other H2 → comp_guide_sections[]
│
▼
Merged with competitor-file.js data (pricing, features, positioning)
│
▼
Full payload: { title, status, template, page_category, acf: { comp_* } }
│
▼
POST /wp/v2/pages → re-save draft
Key ACF fields:
comp_hero_title,comp_hero_desc,comp_hero_badgecomp_comparison_table(rows of feature-vs-competitor)comp_guide_sections[](heading + content pairs)comp_faq_items[](question + answer)comp_pricing_cards[](plan name, price, features)comp_cta_text,comp_cta_link
Free Tool Pages (ft_* fields)
The script nw-html-to-acf.js parses NW’s HTML output:
NW HTML (H1, H2, H3, P, LI tags)
│
▼
Regex tokenizer splits by H2 markers
│
▼
Routes by H2 text pattern (CRITICAL — exact phrasing required):
- "How [Tool] Works" → ft_features_heading + ft_features_cards[]
(H3s with number emojis 1️⃣2️⃣3️⃣ become cards with icons)
- "Frequently Asked Questions" → ft_faq_heading + ft_faq_items[]
- Any other H2 → ft_guide_sections[]
│
▼
Full payload: { title, status, template, page_category, acf: { ft_* } }
│
▼
POST /wp/v2/pages → re-save draft
Key ACF fields:
ft_hero_title,ft_hero_desc,ft_hero_badge,ft_hero_stats[]ft_features_heading,ft_features_cards[](icon, title, desc)ft_guide_sections[](heading + content)ft_faq_heading,ft_faq_items[]ft_tool_html(the embedded tool iframe)ft_cta_text,ft_cta_link
⚠️ Critical rule: The H2 phrasing “How [Tool] Works” and “Frequently Asked Questions” must be exact — the regex parser depends on these strings. If NW paraphrases, content lands in the wrong ACF field.
Feature Pages (feat_* fields)
No auto-parser exists yet — content is manually curated from NW’s article:
NW article HTML
│
▼
Manual extraction by H2 section labels:
"HERO SECTION" → feat_hero_title, feat_hero_desc, feat_hero_benefits[]
"CAPABILITY 1:" → feat_capabilities_list[0] (heading + desc + layout)
"CAPABILITY 2:" → feat_capabilities_list[1]
"CAPABILITY 3:" → feat_capabilities_list[2]
"CAPABILITY 4:" → feat_capabilities_list[3]
"COMPARISON SECTION:" → feat_comp_engage_* fields
"RESULTS AND STATS SECTION" → feat_results_stats_items[]
"USE CASE EXAMPLES SECTION" → feat_keyword_examples_items[]
"TARGET ROLES SECTION" → feat_roles_items[]
"FAQ SECTION" → feat_faq_items[]
│
▼
Full payload: { title, slug, status, template, page_category,
meta: { rank_math_* }, acf: { feat_* } }
│
▼
POST /wp/v2/pages → re-save draft
Key ACF fields:
feat_hub_icon,feat_hub_desc,feat_hub_benefits— required (without these, Feature Hub shows “Coming Soon”)feat_hero_title,feat_hero_desc,feat_hero_benefits[],feat_hero_btn_text/link,feat_hero_media_type,feat_hero_hero_imagefeat_capabilities_list[]— 4 items, layouts alternate: left, right, left, rightfeat_comp_engage_*— comparison table (neg vs pos columns)feat_results_stats_items[]— 4 stat cards with emoji iconsfeat_keyword_examples_items[]— 4 persona cards (themes: blue/purple/green/orange)feat_roles_items[],feat_faq_items[]feat_show_target: false,feat_show_clone_button: true
Also includes Rank Math SEO in meta object:
rank_math_title,rank_math_description,rank_math_focus_keyword,rank_math_canonical_url
Article Pages (Blog Posts) — article_sections[]
Uses a custom endpoint — NOT wp/v2/posts:
NW article HTML
│
▼
Manual mapping to 9 content patterns:
Each H2 section → one article_sections[] item
│
▼
Full payload: { title, status, categories: [3], featured_media,
content: "", ← ALWAYS empty string
meta: { hero_badge, hero_short_desc, post_highlights_*,
faq_*, cta_* },
article_sections: [ ... ] }
│
▼
POST /wp-json/gr-articles/v1/create
│
▼
PHP converter builds post_content from article_sections[]
│
▼
Re-save draft via /wp/v2/posts/<id>
The 9 content patterns for article_sections[]:
| # | Pattern | When to use |
|---|---|---|
| 1 | TEXT ONLY | H2 + one paragraph (intro) |
| 2 | TEXT + H3 SUB-SECTIONS | H2 with multiple sub-points |
| 3 | TEXT + LIST | Paragraph + bullet list |
| 4 | TEXT + IMAGE | Paragraph + full-width image |
| 5 | TABLE ONLY | Pure data comparison table |
| 6 | TABLE + IMAGE | Table + image |
| 7 | TEXT + TABLE + IMAGE | Full rich-media section |
| 8 | STEPS | Numbered step-by-step |
| 9 | MULTIPLE IMAGES | Before/after comparison |
⚠️ Critical: content: "" must always be empty. The PHP class Article_Section_Blocks::build_rest_payload() converts article_sections[] into WordPress block HTML server-side. Using wp/v2/posts instead of gr-articles/v1/create produces a blank post body.
5. NW API vs NW MCP — What Each Unlocks
NW REST API (existing, via neuronwriter-api.js)
| Endpoint | Cost | What it does |
|---|---|---|
POST /list-projects | 0 | List your projects |
POST /new-query | 1 credit | Create a new SERP analysis |
POST /get-query | 0 | Get analysis data (NLP terms, competitors, questions) |
POST /list-queries | 0 | List queries with filters |
POST /get-content | 0 | Get saved editor content (HTML + title + desc) |
POST /evaluate-content | 0 | Score HTML without saving |
POST /import-content | 0 | Save HTML to editor (creates revision) |
Auth: X-API-KEY: n-cf40ec62b9297baad6e262cded11d808
NW MCP Server (new — https://app.neuronwriter.com/mcp/http)
Same endpoints as the REST API, but accessible via MCP protocol. The MCP adds:
| Advantage | What it means |
|---|---|
| OAuth login | No API key management — login via browser once |
get-competitors-content | Read competitor H2/H3 structures — not available in the old REST API |
source: "neuron-mcp" filter | Queries created via MCP are tagged separately |
| Standard MCP interface | Any MCP client (Claude Desktop, Cursor, etc.) can use it |
What MCP does NOT replace:
- ❌ Content Designer wizard (Steps 4-8) — still needs the browser
- ❌ Smart Headings / Auto-insert / FAQ optimizer (Step 9) — UI-only features
- ❌ The actual AI article generation — NW’s Content Designer does this
How I’ll Use Both
MCP (free reads) REST API (writes) Browser (generation)
│ │ │
├─ list-projects ├─ import-content ├─ Content Designer wizard
├─ new-query (1 credit) ├─ evaluate-content ├─ Smart Headings
├─ get-recommendations │ ├─ Auto-insert terms
├─ get-competitors-content │ ├─ FAQ generation
├─ get-editor-content │ └─ Score optimization
└─ get-queries │
│
Both hit the same backend:
https://app.neuronwriter.com/neuron-api/0.5/writer
6. The Complete Pipeline — Step by Step
Phase 0: Setup (one-time)
- Register NW MCP server in Hermes SEO profile
- Verify NW API key works (
node -e "require('./scripts/lib/neuronwriter-api').listProjects().then(d=>console.log(d[0]?.name))") - Verify WP REST access (
curl -w "%{http_code}" https://growreach.app/wp-json/wp/v2/pages?per_page=1 -H "Authorization: Basic ...")
Phase 1: You Start
| Step | Who | What |
|---|---|---|
| 1 | You | Pick a keyword + decide page type (comparison/feature/free-tool/article) |
| 2 | You | Create the NW query at app.neuronwriter.com (costs 1 analysis credit) |
| 3 | You | Share the query URL/ID with me |
| 4 | You | Upload any needed images to WP Media Library, share the attachment IDs |
Phase 2: MCP Reads (free, no browser)
| Step | Who | What |
|---|---|---|
| 5 | Me | Call get-recommendations via MCP — poll until status = “ready” |
| 6 | Me | Read NLP terms, target word count, PAA questions, competitor scores |
| 7 | Me | Call get-competitors-content — read competitor H2/H3 structures |
Phase 3: Browser — Content Designer Wizard (one session)
| Step | Who | What |
|---|---|---|
| 8 | Me | Open NW query URL in browser |
| 9 | Me | Login check + dismiss driver.js tour |
| 10 | Me | Run state check to determine where to resume |
| 11 | Me | Select competitors (score > 50, 5-7 minimum) |
| 12 | Me | Generate meta title & description via NW’s AI |
| 13 | Me | Open Content Designer Wizard (NEURO chevron → Long-Form Content Designer) |
| 14 | Me | Paste content brief (varies by page type) |
| 15 | Me | Set tone = Expert, words = 2000, paste 3-persona template |
| 16 | Me | Review outline, inject TLDR H2 if missing |
| 17 | Me | Extract facts from top 5 competitor URLs (wait ~60s) |
| 18 | Me | Generate article (wait ~120s) |
| 19 | Me | Save and check score |
Phase 4: Browser — Optimize to ≥70
| Step | Who | What |
|---|---|---|
| 20 | Me | If score < 70: Smart Headings → add quality-checked H2s |
| 21 | Me | Auto-insert unused terms (up to 2 attempts) |
| 22 | Me | FAQ with Unused Terms (if still < 70) |
| 23 | Me | Re-check score. Target: beat best competitor by a few points. |
Phase 5: API — Publish to WordPress
| Step | Who | What |
|---|---|---|
| 24 | Me | Read final content via MCP get-editor-content |
| 25 | Me | Build WP payload matching the page type’s ACF structure |
| 26 | Me | POST to correct WP endpoint |
| 27 | Me | Re-save draft (mandatory — ACF fields don’t render without it) |
| 28 | Me | Update Google Sheet tracker (one write, cols F-X) |
Phase 6: You Review
| Step | Who | What |
|---|---|---|
| 29 | You | Preview the draft in WP admin |
| 30 | You | Make edits or approve for publish |
7. Credentials & Auth
WordPress REST API
Endpoint: https://growreach.app/wp-json/
Auth: Basic (base64 of "claudecode-rahul:AsiN dlhT hPC9 ZC4E k2qM yLVa")
NeuronWriter API
Endpoint: https://app.neuronwriter.com/neuron-api/0.5/writer
Auth: X-API-KEY: n-cf40ec62b9297baad6e262cded11d808
Project: growreach.app (ID: 77b8d4a7acd88c2d)
Plan: Gold (WordPress + GSC + API access)
Credits: 75 analysis/month, 45,000 AI credits/month
NeuronWriter MCP
Server URL: https://app.neuronwriter.com/mcp/http
Auth: OAuth (login via browser, approve connection)
Google Sheets (Tracker)
Spreadsheet ID: 13q9uw9up_w0oe8M4jyTQX0NBPp2zfqwu43yiIPWbXVw
Auth: Service account JSON (in CREDENTIALS.md)
8. Open Questions for You
-
Should I register the NW MCP server in Hermes? This would let me call MCP tools directly instead of using the REST API client.
-
For feature pages — the publisher script (
nw-to-feature-page.js) doesn’t exist yet. Should I build it? It would auto-parse NW’s H2-sectioned output intofeat_*ACF fields, similar to hownw-html-to-acf.jsworks for free tool pages. -
For article pages — same situation. Should I build
nw-to-article-page.jsthat maps NW content to the 9article_sections[]patterns? -
Batch mode — do you want a mode where I take a list of keywords + page types and process them one by one without you needing to kick off each one?
-
Which profile should run this? The SEO profile doesn’t exist yet. Should I create one, or should the
defaultprofile handle it? -
How do you want to trigger this? Via a kanban task? A cron job? A chat command like “write a feature page for [keyword]”?