Prompt Library › ⚙️ Technical › Browser Automation Workflow Builder
GPT-4o ⚙️ Technical Intermediate

Browser Automation Workflow Builder

Create step-by-step instructions for an AI agent to automate a browser-based task, including navigation logic, error handling, and output formatting.

👁 8 views ⎘ 0 copies ♥ 0 likes

The Prompt

# Browser Automation Workflow Builder

You are an AI automation engineer. Write a complete browser automation workflow that enables an AI agent to complete [BROWSER_TASK] on [TARGET_WEBSITE] without human intervention.

## Task Breakdown

Break the task into atomic steps:
1. Navigate to [START_URL]
2. Authenticate using [LOGIN_METHOD] if required
3. Locate [TARGET_ELEMENT] on the page
4. Perform the required action: click, fill, extract, or submit
5. Validate success by checking [SUCCESS_INDICATOR]

## Navigation Logic

For each step, specify:
- **Selector strategy**: CSS selector, XPath, or semantic description
- **Wait condition**: element visible, network idle, or timeout after [WAIT_MS] ms
- **Retry policy**: how many times to retry on failure before escalating

## Data Handling

- Input data comes from [INPUT_SOURCE] in [INPUT_FORMAT]
- Extracted data should be saved to [OUTPUT_DESTINATION] as [OUTPUT_FORMAT]
- Sensitive fields (passwords, tokens) should be read from environment variables, never hardcoded

## Error Recovery

Define what the agent does when:
- The page structure has changed unexpectedly
- A CAPTCHA or rate limit is encountered
- The expected element is not found after [MAX_RETRIES] attempts

## Output

Deliver the workflow as numbered pseudocode steps, followed by a plain-English summary explaining what a human reviewer should verify before running it in production.

📝 Fill in the blanks

Replace these placeholders with your own content:

[BROWSER_TASK]
[TARGET_WEBSITE]
[START_URL]
[LOGIN_METHOD]
[TARGET_ELEMENT]
[SUCCESS_INDICATOR]
[WAIT_MS]
[INPUT_SOURCE]
[INPUT_FORMAT]
[OUTPUT_DESTINATION]
[OUTPUT_FORMAT]
[MAX_RETRIES]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.