For the complete documentation index, see llms.txt. This page is also available as Markdown.

Run DocOperator Prompt (Automation Script)


Add this card to the Then group of the Workflow Builder — the actions that run once the When/And conditions match:

Workflow Builder canvas with When, And and Then card groups
The Run DocOperator Prompt card is added to the Then group via Add Card.

📌 Version Information

Current Version: v3 (Latest & Recommended) Status: ✅ Active

Version History:

  • v2 → Original DocOperator implementation

  • v3 → CURRENT (added execution control parameter)

  • v4 → Deprecated (features reverted)

What Changed: v3 added optional "Execute the prompt" parameter for more control. v4 attempted to revert this but was deprecated.

📖 Version History & Changes | Complete Card Database


Purpose

This card runs an automated browser action or script using DocOperator. Think of it as a robot that can interact with websites or systems exactly like a human would - clicking buttons, filling forms, extracting data, etc.

Real-world example: Your company uses a web-based purchasing system. This card can automatically log in, search for a product, check availability, and get the current price - all without anyone doing it manually.


When to Use This Card

Use this card when you need to:

  • Automate tasks on websites that don't have APIs

  • Extract data from web pages

  • Fill forms automatically

  • Log into systems and retrieve information

  • Automate repetitive manual tasks

  • Interact with legacy systems that aren't integrated

Common scenarios:

  • Log into supplier websites and get real-time inventory

  • Automatically fill out forms on external systems

  • Extract data from web pages that don't offer APIs

  • Check delivery status on courier websites

  • Get pricing from systems without API access


How It Works

  1. Card Triggered: Workflow reaches this card and conditions are met

  2. Script Starts: DocOperator bot starts running your automation script

  3. Bot Actions: The bot performs actions like clicking, typing, scrolling, extracting

  4. Data Extraction: Bot collects information from web pages

  5. Return Data: Data comes back to DocFlow for use in next cards

  6. Timeout Handling: If script takes too long, it stops and returns what it has


Parameters Explained

DocOperator Prompt/Script

The automation script that tells DocOperator exactly what to do

Example (Plain English):

Variables

Data you want to pass INTO the script

Example:

These variables can be used in the script like:

Maximum Steps

How many actions the bot is allowed to perform

Typical values:

  • Simple task (like getting one price): 10-20 steps

  • Medium complexity (fill form + extract): 20-50 steps

  • Complex workflow (login + search + validate): 50-100 steps

Why it matters: Prevents infinite loops and very long running scripts

Maximum Retries

If the bot fails an action, how many times should it try again?

Examples:

  • 1: Try once, if it fails move on

  • 3: Try 3 times before giving up

  • 5: Very persistent - try 5 times


Step-by-Step Example

Scenario: Get Supplier Pricing from Website

Script Definition:

Variables Passed In:

Script Using Variables:

Expected Result:


Types of Actions DocOperator Can Perform

  • Go to URL

  • Click links

  • Press buttons

  • Scroll page

Form Filling

  • Type text into fields

  • Select dropdown options

  • Check/uncheck boxes

  • Click buttons

Data Extraction

  • Read text from page

  • Extract numbers

  • Get table data

  • Copy information

Waiting

  • Wait for page to load

  • Wait for elements to appear

  • Wait for dynamic content

Conditional Logic

  • If something exists, do this

  • If text matches, then...

  • Count results and act accordingly


Common Use Cases

1. Get Real-Time Pricing

Scenario: Supplier doesn't have API but website shows prices

Script:

2. Check Inventory Availability

Scenario: Need to know if supplier has stock

Script:

3. Automatic Form Submission

Scenario: Need to fill out a form on an external site

Script:

4. Data Entry Verification

Scenario: Verify data matches on two different systems

Script:


Configuration Steps

Step 1: Create the Script

  1. Define what you want to accomplish

  2. Break it into small steps

  3. Write each step clearly

  4. Test manually first (open the website, do it yourself)

  5. Document exactly what you click, where you type, what you extract

Step 2: Identify Variables

  1. What data will change between documents?

  2. What should be passed into the script?

  3. Define variable names

  4. Specify where variables are used in the script

Step 3: Set Parameters

  • Maximum Steps: Based on script complexity

  • Maximum Retries: How persistent should bot be?

  • Timeout: How long should it wait for pages?

Step 4: Test

  1. Test with sample data

  2. Verify bot can access the website

  3. Verify extraction is correct

  4. Check if variables work properly


Script Writing Tips

Clear Language

Do:

Don't:

Specific Selectors

Do:

Don't:

Error Handling

Do:

Don't:


Troubleshooting

"Script Timed Out"

Cause: Script took too long to complete

Solutions:

"Element Not Found"

Cause: DocOperator couldn't find the button/field you specified

Solutions:

"Login Failed"

Cause: Authentication failed

Solutions:

"Data Not Extracted Correctly"

Cause: The script ran but extracted wrong information

Solutions:

"Script Runs Slowly"

Cause: Too many steps or slow website

Solutions:


Best Practices

Do:

  • Test scripts thoroughly before deploying

  • Keep scripts simple and focused

  • Add comments explaining each step

  • Use meaningful variable names

  • Monitor script performance

  • Have fallback for when scripts fail

Don't:

  • Create extremely long scripts (>100 steps)

  • Put sensitive passwords in logs

  • Rely on exact coordinates (websites change)

  • Create loops without exit conditions

  • Ignore error messages


Performance Tips

  • Remove unused steps - Every step takes time

  • Combine similar actions - Group related clicks

  • Optimize waits - Use only necessary delays

  • Cache data - Don't extract same data twice

  • Parallel processing - Run multiple scripts if possible


Security Considerations

⚠️ Important:

  • Don't store passwords in DocFlow

  • Use secure methods to pass credentials

  • Don't log sensitive data

  • Monitor what's being extracted

  • Ensure bot activity is logged and auditable


Variables Example

Available Variables You Can Use:

Script Using Variables:


Comparison: When to Use DocOperator vs API

Situation
Use DocOperator
Use API

Website has API

❌ No

✅ Yes

Website is interactive

✅ Yes

❌ No

Requires login

✅ Yes

Depends

Very fast needed

❌ No

✅ Yes

Complex workflow

✅ Yes

❌ Maybe not

Data changes daily

✅ Yes

✅ Yes


  • CALL_API - Use when API is available instead

  • ACTION_HTTPS_REQUEST - Simpler requests

  • ACTION_SET_FIELD_TO_TEXT - Use extracted data

  • CONDITION_HTTPS_REQUEST_STATUS - Check request status

Last updated

Was this helpful?