Integrations

Power Automate + CaptchaAI: Microsoft Flow CAPTCHA Solving

Microsoft Power Automate (formerly Flow) automates business processes across the Microsoft ecosystem and hundreds of third-party services. When those workflows encounter CAPTCHA-protected web forms or APIs, CaptchaAI can solve them through Power Automate's HTTP connector.

This guide shows how to build a Power Automate flow that submits CAPTCHAs to CaptchaAI, polls for results, and uses the solved token to complete form submissions.

Real-World Scenario

Your finance team needs to automate data retrieval from a vendor portal that shows reCAPTCHA v2. Instead of manual intervention, a Power Automate flow:

  1. Receives the CAPTCHA parameters (sitekey, page URL)
  2. Sends them to CaptchaAI
  3. Waits for the solution
  4. Uses the token to authenticate and retrieve the data

Step 1: Create the Flow

In Power Automate, create an Instant cloud flow with a Manual trigger (or any trigger of your choice).

Add Input Parameters to the Trigger

Add two text inputs to the manual trigger:

  • sitekey — The reCAPTCHA v2 sitekey
  • pageurl — The URL of the page with the CAPTCHA

Step 2: Submit CAPTCHA Task

Add an HTTP action (Premium connector):

Setting Value
Method GET
URI https://ocr.captchaai.com/in.php

Queries:

Key Value
key Your CaptchaAI API key
method userrecaptcha
googlekey @{triggerBody()['text']} (sitekey input)
pageurl @{triggerBody()['text_1']} (pageurl input)
json 1

Parse the response: Add a Parse JSON action after the HTTP action:

Schema:

{
  "type": "object",
  "properties": {
    "status": { "type": "integer" },
    "request": { "type": "string" }
  }
}

Content: @{body('HTTP')}

Step 3: Validate Submit Response

Add a Condition action:

  • Condition: @{body('Parse_JSON')?['status']} is equal to 1

If No (submit failed):

  • Add a Terminate action with status "Failed" and message: Submit error: @{body('Parse_JSON')?['request']}

If Yes:

  • Continue to polling loop

Step 4: Build the Polling Loop

Inside the "If Yes" branch, add a Do until loop:

Loop condition: @{variables('solveStatus')} is not equal to pending

Before the loop, initialize two variables:

  • solveStatus (String) = pending
  • solvedToken (String) = empty

Inside the Do until loop, add these actions in sequence:

4a. Delay

Add a Delay action: 5 seconds.

4b. HTTP — Poll for Result

Setting Value
Method GET
URI https://ocr.captchaai.com/res.php

Queries:

Key Value
key Your CaptchaAI API key
action get
id @{body('Parse_JSON')?['request']}
json 1

4c. Parse JSON — Poll Response

Use the same schema as Step 2.

4d. Condition — Check Status

Condition: @{body('Parse_JSON_2')?['status']} is equal to 1

If Yes (solved):

  • Set variable solvedToken = @{body('Parse_JSON_2')?['request']}
  • Set variable solveStatus = solved

If No:

  • Add another condition: @{body('Parse_JSON_2')?['request']} is not equal to CAPCHA_NOT_READY
  • If true (error), set solveStatus = error
  • If false (still pending), do nothing (loop continues)

Set the Do until loop limit:

  • Count: 20 (maximum iterations)
  • Timeout: PT3M (3 minutes)

Step 5: Use the Solved Token

After the loop, add a Condition to check @{variables('solveStatus')}:

If equals "solved":

  • Use @{variables('solvedToken')} in an HTTP POST to submit the form
  • Or send it via email, Teams message, or any other connector

Example HTTP POST to submit a form:

Setting Value
Method POST
URI Target form URL
Body {"g-recaptcha-response": "@{variables('solvedToken')}", "other_field": "value"}

If not "solved":

  • Send an error notification via Teams or email

Complete Flow Structure

[Manual Trigger (sitekey, pageurl)]
    ↓
[Initialize Variables: solveStatus, solvedToken]
    ↓
[HTTP: Submit to CaptchaAI /in.php]
    ↓
[Parse JSON]
    ↓
[Condition: status = 1?]
    ↓ Yes
[Do Until: solveStatus ≠ pending]
    ├── [Delay: 5 seconds]
    ├── [HTTP: Poll CaptchaAI /res.php]
    ├── [Parse JSON]
    └── [Condition: Solved or Error?]
    ↓
[Condition: solveStatus = solved?]
    ↓ Yes
[HTTP: Submit form with token]
    ↓
[Compose: Success response]

Troubleshooting

Problem Cause Fix
HTTP connector not available Free plan doesn't include Premium connectors Upgrade to Power Automate Premium or use a custom connector
Parse JSON fails Response body is text, not JSON Ensure json=1 is in the query parameters
Loop runs indefinitely solveStatus variable not updated Check variable names match exactly in Set Variable actions
403 error from CaptchaAI IP restriction or wrong API key Verify API key; check if IP whitelisting is enabled on your account
Flow timeout Default 30-day timeout is fine, but individual actions timeout at 2 min The Do Until timeout (PT3M) handles this; increase if needed

FAQ

Does this require a Premium Power Automate license?

Yes, the HTTP connector is a Premium feature. If you're on a free plan, consider using a custom connector or routing through Azure Functions.

Can I solve other CAPTCHA types?

Yes. Change the method parameter to turnstile for Cloudflare Turnstile, or post for Image CAPTCHAs. Adjust the required parameters accordingly.

How do I store the API key securely?

Use Power Automate's Environment Variables or Azure Key Vault connector to avoid hardcoding the API key in the flow definition.

Can I trigger this flow from Power Apps?

Yes. Use the Power Automate connector in Power Apps to call this flow, passing sitekey and pageurl as parameters, and receiving the token back.

Next Steps

Add CAPTCHA solving to your Power Automate workflows — get your CaptchaAI API key and build the flow.

Related guides:

Discussions (0)

No comments yet.

Related Posts

Tutorials Pytest Fixtures for CaptchaAI API Testing
Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI.

Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI. Covers mocking, live integra...

Automation Python reCAPTCHA v2
Apr 08, 2026
Integrations Retool + CaptchaAI: Internal Tool CAPTCHA Form Handling
Build Retool internal tools that solve re CAPTCHA v 2 CAPTCHAs by integrating Captcha AI API through REST API queries and Java Script transformers.

Build Retool internal tools that solve re CAPTCHA v 2 CAPTCHAs by integrating Captcha AI API through REST API...

reCAPTCHA v2 Testing No-Code
Mar 19, 2026
Use Cases Automated Form Submission with CAPTCHA Handling
Complete guide to automating web form submissions that include CAPTCHA challenges — re CAPTCHA, Turnstile, and image CAPTCHAs with Captcha AI.

Complete guide to automating web form submissions that include CAPTCHA challenges — re CAPTCHA, Turnstile, and...

Python reCAPTCHA v2 Cloudflare Turnstile
Mar 21, 2026
Tutorials Browser Console CAPTCHA Detection: Finding Sitekeys and Parameters
Use browser Dev Tools to detect CAPTCHA types, extract sitekeys, and find parameters needed for Captcha AI API requests.

Use browser Dev Tools to detect CAPTCHA types, extract sitekeys, and find all parameters needed for Captcha AI...

Automation reCAPTCHA v2 Cloudflare Turnstile
Mar 25, 2026
Use Cases Government Portal Automation with CAPTCHA Solving
Automate government portal interactions (visa applications, permit filings, records requests) with Captcha AI handling CAPTCHA challenges.

Automate government portal interactions (visa applications, permit filings, records requests) with Captcha AI...

Automation Python reCAPTCHA v2
Jan 30, 2026
DevOps & Scaling GitHub Actions + CaptchaAI: CI/CD CAPTCHA Testing
Integrate Captcha AI with Git Hub Actions for automated CAPTCHA testing in CI/CD pipelines.

Integrate Captcha AI with Git Hub Actions for automated CAPTCHA testing in CI/CD pipelines. Test flows, verify...

Python reCAPTCHA v2 Testing
Feb 04, 2026
Use Cases Multi-Step Checkout Automation with CAPTCHA Solving
Automate multi-step e-commerce checkout flows that include CAPTCHA challenges at cart, payment, or confirmation stages using Captcha AI.

Automate multi-step e-commerce checkout flows that include CAPTCHA challenges at cart, payment, or confirmatio...

Automation Python reCAPTCHA v2
Mar 21, 2026
Integrations Selenium Wire + CaptchaAI: Request Interception for CAPTCHA Solving
Complete guide to using Selenium Wire for request interception, proxy routing, and automated CAPTCHA solving with Captcha AI in Python.

Complete guide to using Selenium Wire for request interception, proxy routing, and automated CAPTCHA solving w...

Python reCAPTCHA v2 Cloudflare Turnstile
Mar 13, 2026
Use Cases CAPTCHA Handling for University Course Registration Testing
Handle re CAPTCHA v 2 CAPTCHAs when testing university course registration systems — QA testing enrollment workflows, seat availability checks, and registration...

Handle re CAPTCHA v 2 CAPTCHAs when testing university course registration systems — QA testing enrollment wor...

Python reCAPTCHA v2 Testing
Mar 11, 2026
Use Cases CAPTCHA Handling in Continuous Integration Testing
Integrate CAPTCHA solving into CI/CD pipelines — run end-to-end tests against CAPTCHA-protected pages in Git Hub Actions, Git Lab CI, and Jenkins with Captcha A...

Integrate CAPTCHA solving into CI/CD pipelines — run end-to-end tests against CAPTCHA-protected pages in Git H...

Python reCAPTCHA v2 Cloudflare Turnstile
Mar 28, 2026
Integrations Browser Profile Isolation + CaptchaAI Integration
Browser profile isolation tools create distinct browser environments with unique fingerprints per session.

Browser profile isolation tools create distinct browser environments with unique fingerprints per session. Com...

Automation Python reCAPTCHA v2
Feb 21, 2026
Integrations Axios + CaptchaAI: Solve CAPTCHAs Without a Browser
Use Axios and Captcha AI to solve re CAPTCHA, Turnstile, and image CAPTCHAs in Node.js without launching a browser.

Use Axios and Captcha AI to solve re CAPTCHA, Turnstile, and image CAPTCHAs in Node.js without launching a bro...

Automation All CAPTCHA Types
Apr 08, 2026
Integrations Puppeteer Stealth + CaptchaAI: Reliable Browser Automation
Standard Puppeteer gets detected immediately by anti-bot systems.

Standard Puppeteer gets detected immediately by anti-bot systems. `puppeteer-extra-plugin-stealth` patches the...

Automation reCAPTCHA v2 Cloudflare Turnstile
Apr 05, 2026