Перейти к содержанию
НОВОЕПознакомьтесь с Alaaddin — вашим ИИ-джинном с голосом. trig8n запускается 1 января 2027. Что нового

Библиотека / Написание и генерация контента

Написание и генерация контента

Predict SEO traffic impact scenarios with Postgres and OpenAI GPT-4.1

When an API call/webhook arrives, it writes content with OpenAI / ChatGPT using Postgres.

Что делает

## 🔮 SEO What-If Simulator — n8n Backend API POST a *scenario* (merge pages / add new pages / remove pages) and get back a predicted traffic impact — before touching the live site. SEO DATA -> Current Website -> Simulation Engine |-> Merge Pages \ |-> New Pages >-> Predicted Impact |-> Remove Pages / ### How it works 1. Webhook receives POST /seo-what-if-simulate (header-auth protected) 2. Set - Config centralizes limits (max actions, max horizon, SERP-feature factor) 3. Code - Validate Request Schema — Zod-style validator; collects every violation, checks that a URL isn't merged/removed twice, returns a typed 400 4. Postgres - Fetch Current SEO Data loads the latest snapshot of per-page metrics 5. Code - Build Baseline Model builds the "current website" model: totals, clusters, existing cannibalization, CTR curve calibrated to the site's own CTR, and a site authority score. If no data exists -> typed 404 6. Three parallel simulation branches: Merge / New / Remove — each returns per-action deltas with an immediate part, a ramped part, uncertainty and risk flags 7. Merge - Simulation Results joins the three branches 8. Code - Predicted Impact builds the forecast: month-by-month timeline with low/expected/high band, per-action breakdown, risk score, verdict and confidence 9. LLM Chain - Strategy Narrative turns the numbers into an executive summary, recommendations, rollout order and watch-outs (uses ONLY the computed numbers) 10. Code - Validate Narrative — second independent validation boundary; falls back to a deterministic summary if the model output is malformed 11. Postgres - Log Simulation Run stores every run for audit / comparison, then Respond - Success (200) ### Request body json { "tenantId": "acme", "siteId": "acme-main", "scenarioName": "Q4 consolidation", "horizonMonths": 6, "actions": [ { "type": "merge", "targetUrl": "/blog/seo-guide", "sourceUrls": ["/blog/seo-tips", "/blog/seo-basics"], "redirect": true }, { "type": "new", "targetKeyword": "technical seo checklist", "searchVolume": 4400, "keywordDifficulty": 42, "contentQuality": 0.8, "clusterId": "seo" }, { "type": "remove", "url": "/blog/old-news", "strategy": "redirect", "redirectTo": "/blog" } ] }

Шаги

  1. Webhook - SEO Simulation Request
  2. Set - Config
  3. Code - Validate Request Schema
  4. IF - Validation Passed
  5. Respond - Validation Error (400)
  6. Postgres - Fetch Current SEO Data
  7. Code - Build Baseline Model
  8. IF - Baseline Data Found
  9. Respond - No SEO Data (404)
  10. Code - Simulate Merge Pages
  11. Code - Simulate New Pages
  12. Code - Simulate Remove Pages
  13. Merge - Simulation Results
  14. Code - Predicted Impact

Всего шагов: 19.

Похожие автоматизации