Skip to content

Repository files navigation

How to Validate CAPTCHA Results in n8n with CapSolver

English cover for How to Validate CAPTCHA Results in n8n with CapSolver

Validate a normalized CapSolver task result before an n8n workflow continues.

English · 简体中文 · 日本語 · Español · Português · 한국어

Introduction

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.

Features

  • 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.

How It Works

  1. Accept a mock observation or tool result.
  2. Validate the scenario-specific business contract.
  3. Separate challenged, incomplete, duplicate, or unauthorized input.
  4. Allow at most one approved recovery transition.
  5. Emit a small result or a clear stop reason.

The optional integration boundary follows the official createTask request contract and getTaskResult polling contract.

Architecture

Authorized input → policy check → n8n result contract validator → continue once / review / stop

Quick Start

PYTHONPATH=src python -m unittest discover -s tests -v
PYTHONPATH=src python scripts/smoke_test.py

Usage

Run 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.

Example Output

SMOKE PASSED: n8n result contract validator

Supported Scenarios

Public data, owned-system QA, explicitly authorized automation, and local workflow validation.

Project Structure

src/ contains the implementation, tests/ the unit tests, scripts/ the smoke test, examples/ a fixture, and docs/ five translations.

Testing

Tests cover the successful path plus scenario-specific denial, duplicate, incomplete, capacity, or budget branches.

Troubleshooting

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.

Responsible Use

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.

Contributing

See the contribution guidelines. Preserve offline tests and fail-closed defaults.

Security

See the security policy. Never submit keys, cookies, sessions, captured pages, or production payloads.

Conclusion

This repository turns a clear developer problem into a small, testable workflow with an auditable stop path and CapSolver.

Maintainer Note

Developer sharing CapSolver integration examples.

License

MIT

About

Validate a normalized CapSolver task result before an n8n workflow continues.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages