Validate a normalized CapSolver task result before an n8n workflow continues.
English · 简体中文 · 日本語 · Español · Português · 한국어
An n8n workflow can receive an incomplete or failed task result and accidentally route it as usable output. This runnable example uses CapSolver as a bounded recovery boundary and explains the practical outcome before the implementation details.
The default workflow is offline and mock-first. Live use is opt-in, requires explicit authorization, and must follow the current official API contract.
- N8n result contract validator.
- Explicit authorization and human-review stop paths.
- Deterministic fixtures with no real key or external request.
- Minimal audit output without credentials or page contents.
- Accept a mock observation or tool result.
- Validate the scenario-specific business contract.
- Separate challenged, incomplete, duplicate, or unauthorized input.
- Allow at most one approved recovery transition.
- Emit a small result or a clear stop reason.
The optional integration boundary follows the official createTask request contract and getTaskResult polling contract.
Authorized input → policy check → n8n result contract validator → continue once / review / stop
PYTHONPATH=src python -m unittest discover -s tests -v
PYTHONPATH=src python scripts/smoke_test.pyRun the included smoke test to see a safe fixture. Replace mock input only after verifying current official fields and the target owner's application contract.
SMOKE PASSED: n8n result contract validator
Public data, owned-system QA, explicitly authorized automation, and local workflow validation.
src/ contains the implementation, tests/ the unit tests, scripts/ the smoke test, examples/ a fixture, and docs/ five translations.
Tests cover the successful path plus scenario-specific denial, duplicate, incomplete, capacity, or budget branches.
If a task is not ready, keep the workflow bounded. On an API error, follow the official CapSolver API error guidance and stop rather than increasing limits automatically.
Use only public data, systems you own, or targets with explicit written authorization. Keep a narrow allowlist, reasonable rates, minimal fields, short retention, audit records, and a human fallback. Do not collect credentials, access private or restricted data, evade access controls, conceal automation, or run unbounded collection. Personal, financial, health, employment, or other sensitive data requires purpose-specific authorization, minimization, access control, retention limits, and human review; stop if any control is absent.
See the contribution guidelines. Preserve offline tests and fail-closed defaults.
See the security policy. Never submit keys, cookies, sessions, captured pages, or production payloads.
This repository turns a clear developer problem into a small, testable workflow with an auditable stop path and CapSolver.
Developer sharing CapSolver integration examples.
