> For the complete documentation index, see [llms.txt](https://docs.zerowork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link.md).

# Open Link

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2F9rXgzG6UHksI2irnXKfu%2Fopen_link_block.png?alt=media&amp;token=ffb1c4c9-abfc-4286-bd4d-664942e18b0b" alt="" width="354"><figcaption></figcaption></figure>

The **Open Link** block navigates the browser to a URL. Subsequent web interaction blocks (like Click Web Element, Save Web Element, etc) act on the page this block opens.

{% hint style="info" %}
If no browser is running when this block executes, it launches one first using your current defaults in your TaskBot's Browser Launch Settings. You don't need a [Launch Browser](/using-zerowork/using-building-blocks/launch-browser.md) block before an Open Link block unless you want to override those existing launch settings.
{% endhint %}

## How To Use It

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2FIBleLzxUAG6umVhJrICT%2Fopen_link_settings.png?alt=media&amp;token=d03114df-fc47-4591-9feb-5a6a31c768d9" alt=""><figcaption></figcaption></figure>

### Link

{% hint style="success" %}
This field accepts dynamic inputs, such as spintax, variable and table references, as well as code expressions. See [Dynamic Inputs](/using-zerowork/using-building-blocks/dynamic-inputs.md) for more information.
{% endhint %}

Enter one address to navigate to. To open two or more URLs, put this block inside a [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) and loop over a list of URLs in your table or sheet.

* Type a URL directly, for example `https://example.com`.
* Or insert a variable or table reference to pull the URL from your data.
* Or point to a local file with a `file://` address, for example `file:///Users/<username>/reports/report.html`. The path must exist on the machine running the Desktop Agent. On macOS, folders such as Desktop, Documents, and Downloads are protected by the system. A `file://` address inside one of them fails with `ERR_ACCESS_DENIED` until the Desktop Agent is granted access under **System Settings > Privacy & Security > Files and Folders**.

### Timeout

How long to wait for the page to load before logging an [error](#website-and-network-errors), in seconds. The default is **90 seconds**. This timeout value is used for each built-in automatic retry this block makes.

### Open in a new tab

Opens the URL in a new tab instead of reusing the current active tab.

* **Unchecked** (default) navigates the active tab to the new URL.
* **Checked** opens a new tab, brings it to the front, and makes it the active page for the blocks that follow.

### Min sec & Max sec

A pause after the page loads, before the next block runs. The wait is randomized between the two values, and setting both to the same number makes it fixed. The Open Link block defaults to **3 seconds**.

{% hint style="info" %}
See the [Delay](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) block for more information on how these two fields behave, including decimals, dynamic references, and what happens when a field is left empty. See [Delay Times between the Building Blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks) for how block-level delays fit into a TaskBot run.
{% endhint %}

## Things To Know

* **This block uses your TaskBot's default browser settings.** When this block launches a browser, it uses your TaskBot's **Browser Launch Settings** plus anything a [Launch Browser](https://docs.zerowork.io/using-zerowork/using-building-blocks/launch-browser) block or `zw.browserContext.setDefaults()` changed earlier in the run.
* **Opening a page doesn't automatically log you in.** If the site needs a session, either use a **sticky profile**, which keeps [cookies](/using-zerowork/general-run-schedule-share-webhooks/cookies.md) and login state on your machine between runs, or supply cookies up front; you rarely need both. Both can be configured in your **Browser Launch Settings** or a [Launch Browser](https://docs.zerowork.io/using-zerowork/using-building-blocks/launch-browser) block.
* **Closing the last tab ends the browser.** If a [Switch or Close Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) block closes the last open tab, the next Open Link block launches a fresh browser from the current defaults.
* **Proxy failures can surface here.** If you use a proxy and it stops responding, this is the block that reports it clearly, as `ERR_PROXY_CONNECTION_FAILED` or `ERR_TUNNEL_CONNECTION_FAILED`. Other blocks can fail less obviously, usually as a missing css selector, because they land on a browser error page instead. See [Proxies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies).

### Website & Network Errors

When your TaskBot can't reach a website, it stops the run and records the network error code in your [Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports).

The usual causes are that the website is down, the page is taking too long, your internet connection is slow, or your proxy settings are incorrectly configured.

There are over 200 network error codes, so we don't document each one here. If you see the same network error code repeatedly, searching for it is usually the fastest route. The cause is often specific to your VPN, antivirus, router, or proxy provider. The full error list is available in your browser at <chrome://network-errors/>.

#### Continuing After A Network Error

If you'd rather gracefully handle a failure than end the TaskBot run, you can wrap the Open Link block in a [Try-Catch](https://docs.zerowork.io/using-zerowork/using-building-blocks/try-catch) block sequence. The **On Catch Error** path then decides what happens next; for example, log the error, send a notification, try a different URL, or end the run deliberately with an [Abort Run](https://docs.zerowork.io/using-zerowork/using-building-blocks/abort-run) block.

{% hint style="success" %}
You don't need a Try-Catch block sequence to survive a brief outage. The Open Link block already retries network errors a few times on its own prior to logging an error. Try-Catch is for deciding what happens if those built-in automatic retries have failed.
{% endhint %}

<figure><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2F9Y00AEMFLPrYWIiHBfNK%2Ftry_catch_open_link_example.png?alt=media&amp;token=bda01fb2-de88-49ff-9cd6-e68aa1c95c16" alt=""><figcaption></figcaption></figure>

{% hint style="success" icon="circle-caret-right" %}
**Try It Yourself**\
\
The above is a real TaskBot that you can experiment with in your own ZeroWork account. Click this TaskBot Share Link to add it to your account and get started!\
\
<https://creator.zerowork.io/get-taskbot/1253684709817015>
{% endhint %}

{% hint style="info" icon="discord" %}
Looking for other popular TaskBot patterns, tips, and tricks? Join our active community of Automators on our [Discord](https://discord.com/invite/JkkCNmVBeg) server!
{% endhint %}

## Block Behavior

* **When no browser exists** this block launches one from the current defaults, then navigates to the URL.
* **When a browser is already running** this block navigates the active page to the URL. No launch settings are re-applied.
* **When Open in new tab is checked** this block opens a new tab, navigates to it, and makes it the active page for subsequent blocks.
* **When the page loads too slowly or the network fails** this block automatically retries a few times prior to failing with a timeout log entry.

## Video Tutorial

{% embed url="<https://youtu.be/N8kRvfu6nB0?si=S1Z13osY2CXeRiUn>" %}
