# Table of Contents - [Home and Welcome | ZeroWork](#home-and-welcome-zerowork) - [Getting Started | ZeroWork](#getting-started-zerowork) - [Install the Agent | ZeroWork](#install-the-agent-zerowork) - [Crash Course | ZeroWork](#crash-course-zerowork) - [Log in to the Agent | ZeroWork](#log-in-to-the-agent-zerowork) - [General: Run, Schedule, Share, Webhooks | ZeroWork](#general-run-schedule-share-webhooks-zerowork) - [Run Modes | ZeroWork](#run-modes-zerowork) - [Stop | ZeroWork](#stop-zerowork) - [Run | ZeroWork](#run-zerowork) - [Run Non-Incognito | ZeroWork](#run-non-incognito-zerowork) - [Run Incognito | ZeroWork](#run-incognito-zerowork) - [What Are Selectors | ZeroWork](#what-are-selectors-zerowork) - [Remote (Cloud) Execution | ZeroWork](#remote-cloud-execution-zerowork) - [How to Check and Update Your Agent | ZeroWork](#how-to-check-and-update-your-agent-zerowork) - [TaskBot Sharing Options | ZeroWork](#taskbot-sharing-options-zerowork) - [Scheduler | ZeroWork](#scheduler-zerowork) - [Run Settings | ZeroWork](#run-settings-zerowork) - [Copy Selectors | ZeroWork](#copy-selectors-zerowork) - [Use Element's Text | ZeroWork](#use-element-s-text-zerowork) - [Using Selectors | ZeroWork](#using-selectors-zerowork) - [Run in Background | ZeroWork](#run-in-background-zerowork) - [Install ZeroWork Agent on VPS | ZeroWork](#install-zerowork-agent-on-vps-zerowork) - [CSS Selectors Master Class | ZeroWork](#css-selectors-master-class-zerowork) - [Bring Pages to Front | ZeroWork](#bring-pages-to-front-zerowork) - [Cookies | ZeroWork](#cookies-zerowork) - [Proxies | ZeroWork](#proxies-zerowork) - [Stay on Page after Run | ZeroWork](#stay-on-page-after-run-zerowork) - [Run in My Regular Browser | ZeroWork](#run-in-my-regular-browser-zerowork) - [Trigger Run via Webhook | ZeroWork](#trigger-run-via-webhook-zerowork) - [How to Build Custom Selectors | ZeroWork](#how-to-build-custom-selectors-zerowork) - [How to Use XPath in ZeroWork (advanced) | ZeroWork](#how-to-use-xpath-in-zerowork-advanced-zerowork) - [One Element Can Have Many Selector Expressions | ZeroWork](#one-element-can-have-many-selector-expressions-zerowork) - [Addressing Siblings | ZeroWork](#addressing-siblings-zerowork) - [Exact or Loose Match | ZeroWork](#exact-or-loose-match-zerowork) - [Check if Selector Is Correct and Unique | ZeroWork](#check-if-selector-is-correct-and-unique-zerowork) - [Combine Filters with Standard CSS Logic | ZeroWork](#combine-filters-with-standard-css-logic-zerowork) - [Basic Concepts of Selectors | ZeroWork](#basic-concepts-of-selectors-zerowork) - [Hierarchy | ZeroWork](#hierarchy-zerowork) - [Lists: Incremental CSS Selectors | ZeroWork](#lists-incremental-css-selectors-zerowork) - [Version 1.1.69 | ZeroWork](#version-1-1-69-zerowork) - [Version 1.1.62 | ZeroWork](#version-1-1-62-zerowork) - [Using Tables | ZeroWork](#using-tables-zerowork) - [Version 1.1.70 | ZeroWork](#version-1-1-70-zerowork) - [Version 1.1.64 | ZeroWork](#version-1-1-64-zerowork) - [Version 1.1.65 | ZeroWork](#version-1-1-65-zerowork) - [Version 1.1.67 | ZeroWork](#version-1-1-67-zerowork) - [Version 1.1.71 | ZeroWork](#version-1-1-71-zerowork) - [Common Problems | ZeroWork](#common-problems-zerowork) - [Google Sheets | ZeroWork](#google-sheets-zerowork) - [How to Add Tables | ZeroWork](#how-to-add-tables-zerowork) - [Version 1.1.63 | ZeroWork](#version-1-1-63-zerowork) - [Version 1.1.66 | ZeroWork](#version-1-1-66-zerowork) - [Version 1.1.68 | ZeroWork](#version-1-1-68-zerowork) - [Convert Native Table to a Google Sheet | ZeroWork](#convert-native-table-to-a-google-sheet-zerowork) - [Using Google Sheet vs. Native Tables | ZeroWork](#using-google-sheet-vs-native-tables-zerowork) - [Using Variables | ZeroWork](#using-variables-zerowork) - [Keyboard Action Is Not Working As Expected | ZeroWork](#keyboard-action-is-not-working-as-expected-zerowork) - [Data Is Saved in Wrong Format | ZeroWork](#data-is-saved-in-wrong-format-zerowork) - [Website is Glitching and Flashing | ZeroWork](#website-is-glitching-and-flashing-zerowork) - [Native Tables | ZeroWork](#native-tables-zerowork) - [Export Data as CSV | ZeroWork](#export-data-as-csv-zerowork) - [When Using Insert Data Block, First Letters Are Cut Off | ZeroWork](#when-using-insert-data-block-first-letters-are-cut-off-zerowork) - [Import Data from CSV | ZeroWork](#import-data-from-csv-zerowork) - [Create Columns | ZeroWork](#create-columns-zerowork) - [Using Run Reports | ZeroWork](#using-run-reports-zerowork) - [My TaskBot Does Not Start Run | ZeroWork](#my-taskbot-does-not-start-run-zerowork) - [Click Web Element | ZeroWork](#click-web-element-zerowork) - [My TaskBot Saves Some Data but Not All | ZeroWork](#my-taskbot-saves-some-data-but-not-all-zerowork) - [TaskBot Does Not Automatically Scroll | ZeroWork](#taskbot-does-not-automatically-scroll-zerowork) - [Using Building Blocks | ZeroWork](#using-building-blocks-zerowork) - [When I Use Data from Table, No Data is Being Pulled | ZeroWork](#when-i-use-data-from-table-no-data-is-being-pulled-zerowork) - [Workflow Has More than One Starting Building Block | ZeroWork](#workflow-has-more-than-one-starting-building-block-zerowork) - [Website Requires SMS or Email Verification | ZeroWork](#website-requires-sms-or-email-verification-zerowork) - [No Selector is Found | ZeroWork](#no-selector-is-found-zerowork) - [Check Web Element Identifies Selector as Found but Next Action Does Not | ZeroWork](#check-web-element-identifies-selector-as-found-but-next-action-does-not-zerowork) - [Getting Support | ZeroWork](#getting-support-zerowork) - [Version 1.1.61 | ZeroWork](#version-1-1-61-zerowork) - [Select Web Dropdown | ZeroWork](#select-web-dropdown-zerowork) - [Dynamic Inputs | ZeroWork](#dynamic-inputs-zerowork) - [Version 1.1.72 (upcoming) | ZeroWork](#version-1-1-72-upcoming-zerowork) - [References to Variables and Tables | ZeroWork](#references-to-variables-and-tables-zerowork) - [Go Back or Forward | ZeroWork](#go-back-or-forward-zerowork) - [Hover Web Element | ZeroWork](#hover-web-element-zerowork) - [Save Page URL | ZeroWork](#save-page-url-zerowork) - [Check Web Element | ZeroWork](#check-web-element-zerowork) - [Code in Inputs | ZeroWork](#code-in-inputs-zerowork) - [Save Web Element | ZeroWork](#save-web-element-zerowork) - [Switch or Close Tab | ZeroWork](#switch-or-close-tab-zerowork) - [Insert Text or Data | ZeroWork](#insert-text-or-data-zerowork) - [Spintax | ZeroWork](#spintax-zerowork) - [Shorten Content Length | ZeroWork](#shorten-content-length-zerowork) - [Switch Frame | ZeroWork](#switch-frame-zerowork) - [Before (Date) & After (Date) | ZeroWork](#before-date-after-date-zerowork) - [Open Link | ZeroWork](#open-link-zerowork) - [Delete Data | ZeroWork](#delete-data-zerowork) - [Abort Run | ZeroWork](#abort-run-zerowork) - [Actions <, ≤, >, ≥ | ZeroWork](#actions-zerowork) - [Browser Alert | ZeroWork](#browser-alert-zerowork) - [Break Repeat | ZeroWork](#break-repeat-zerowork) - [Contains & Does Not Contain | ZeroWork](#contains-does-not-contain-zerowork) - [Raise Error | ZeroWork](#raise-error-zerowork) - [Actions = & ≠ | ZeroWork](#actions-zerowork) - [Try-Catch | ZeroWork](#try-catch-zerowork) - [Remove Duplicates | ZeroWork](#remove-duplicates-zerowork) - [Continue until No Element Is Found | ZeroWork](#continue-until-no-element-is-found-zerowork) - [Data Found & Data not Found | ZeroWork](#data-found-data-not-found-zerowork) - [Dynamic Loop | ZeroWork](#dynamic-loop-zerowork) - [Start Condition and Set Condition | ZeroWork](#start-condition-and-set-condition-zerowork) - [Example: Standardize different formats | ZeroWork](#example-standardize-different-formats-zerowork) - [Standard Loop | ZeroWork](#standard-loop-zerowork) - [Record Date | ZeroWork](#record-date-zerowork) - [Keyboard Action | ZeroWork](#keyboard-action-zerowork) - [Format Data | ZeroWork](#format-data-zerowork) - [Start Repeat | ZeroWork](#start-repeat-zerowork) - [Save Lists | ZeroWork](#save-lists-zerowork) - [Save from Clipboard | ZeroWork](#save-from-clipboard-zerowork) - [Remove Words | ZeroWork](#remove-words-zerowork) - [Send Notification | ZeroWork](#send-notification-zerowork) - [Auto-Scroll | ZeroWork](#auto-scroll-zerowork) - [Log | ZeroWork](#log-zerowork) - [Split Data | ZeroWork](#split-data-zerowork) - [Apply Regex | ZeroWork](#apply-regex-zerowork) - [Take Screenshot | ZeroWork](#take-screenshot-zerowork) - [After Repeat | ZeroWork](#after-repeat-zerowork) - [Delay | ZeroWork](#delay-zerowork) - [Building Block Options | ZeroWork](#building-block-options-zerowork) - [Auto-Continue from Last Row or Element | ZeroWork](#auto-continue-from-last-row-or-element-zerowork) - [Enrich Existing Data | ZeroWork](#enrich-existing-data-zerowork) - [Update Data | ZeroWork](#update-data-zerowork) - [Number Operations | ZeroWork](#number-operations-zerowork) - [Sticky Notes | ZeroWork](#sticky-notes-zerowork) - [Delay Times between the Building Blocks | ZeroWork](#delay-times-between-the-building-blocks-zerowork) - [Auto-Align | ZeroWork](#auto-align-zerowork) - [Shortcuts | ZeroWork](#shortcuts-zerowork) - [Local and Global State (upcoming) | ZeroWork](#local-and-global-state-upcoming-zerowork) - [Nested Loops - Handle Pagination | ZeroWork](#nested-loops-handle-pagination-zerowork) - [Upload File | ZeroWork](#upload-file-zerowork) - [Ask ChatGPT | ZeroWork](#ask-chatgpt-zerowork) - [Save File | ZeroWork](#save-file-zerowork) - [Device Storage (upcoming) | ZeroWork](#device-storage-upcoming-zerowork) - [Deactivate Building Blocks | ZeroWork](#deactivate-building-blocks-zerowork) - [APIs: Send HTTP Request | ZeroWork](#apis-send-http-request-zerowork) - [Utilities (upcoming) | ZeroWork](#utilities-upcoming-zerowork) - [Metadata (upcoming) | ZeroWork](#metadata-upcoming-zerowork) - [Write and Read Variables and Tables | ZeroWork](#write-and-read-variables-and-tables-zerowork) - [Write JavaScript (upcoming) | ZeroWork](#write-javascript-upcoming-zerowork) - [Imports and Package Management (upcoming) | ZeroWork](#imports-and-package-management-upcoming-zerowork) - [Write JavaScript | ZeroWork](#write-javascript-zerowork) - [Browser Context (upcoming) | ZeroWork](#browser-context-upcoming-zerowork) - [Email Protection | Cloudflare](#email-protection-cloudflare) --- # Home and Welcome | ZeroWork ZeroWork is dedicated to creators who want to build TaskBots that automate repetitive tasks such as typing, clicking and copy-pasting data in the browser. TaskBots are designed to mimic human interactions on any website by clicking buttons, saving text, and more. They act like real human users! This enables automation without limits. 🚀 No coding required. ### [hashtag](https://docs.zerowork.io/#typical-use-cases) Typical Use Cases * **Scrape**: Collect LinkedIn profiles, FB group members, IG followers, Amazon products. * **Enrich data**: Enrich collected data by collecting data from individual pages such as email, job title, rating, reviews, etc. * **Automate actions**: Auto-send DMs, auto-like content, auto-follow, auto-fill out forms. * **Transform data** **(calculate, filter, compare)**: Auto-qualify your leads based on keywords, location or activity, auto-format or tag collected data. * **Add AI**: Auto-post AI-generated blog posts, auto-comment with AI-generated comments, auto-reply to messages with AI, auto-send AI-generated product or prospect summaries to your email. ### [hashtag](https://docs.zerowork.io/#getting-started) Getting Started * [Sign Up](https://docs.zerowork.io/getting-started) * [Install the Agent](https://docs.zerowork.io/install-the-agent) * [Crash Course](https://docs.zerowork.io/crash-course) * [FAQsarrow-up-right](https://zerowork.io/faq) ### [hashtag](https://docs.zerowork.io/#taskbot-creation-process) TaskBot Creation Process * [Running TaskBots](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks) * [Using Building Blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks) * [Using Selectors](https://docs.zerowork.io/using-zerowork/using-selectors) * [Using Tables](https://docs.zerowork.io/using-zerowork/using-tables) * [Using Variables](https://docs.zerowork.io/using-zerowork/using-variables) ### [hashtag](https://docs.zerowork.io/#troubleshooting-and-support) Troubleshooting and Support * [Common Problems](https://docs.zerowork.io/using-zerowork/common-problems) * [TaskBot Creator Support](https://docs.zerowork.io/support/getting-support) [NextGetting Startedchevron-right](https://docs.zerowork.io/getting-started) Last updated 9 months ago --- # Getting Started | ZeroWork Start your 14-day free trial [herearrow-up-right](https://creator.zerowork.io/register) — no credit card needed. To get set up: 1. **Install the desktop agent** Download the ZeroWork agent from [this linkarrow-up-right](https://creator.zerowork.io/download-agent) and follow this [quick guide](https://docs.zerowork.io/install-the-agent) to install it. 2. **Chrome must be installed (even if you don't use it)** TaskBots run in an automated Chrome browser behind the scenes. You can build and start them from any browser, but Chrome needs to be installed on your device for the automation to work. Also note: if you're using a browser with strict security settings (like Brave), you may need to whitelist the ZeroWork agent in your browser settings. 3. **Watch the crash course** Our [crash course](https://docs.zerowork.io/crash-course) walks you through building and running your first TaskBot. [PreviousHome and Welcomechevron-left](https://docs.zerowork.io/) [NextInstall the Agentchevron-right](https://docs.zerowork.io/install-the-agent) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Install the Agent | ZeroWork Agent is needed to run your TaskBots on your computer. triangle-exclamation Agent does not have any user interface, it simply 'sits' on your desktop to run TaskBots. The actual building of TaskBots is done at [https://creator.zerowork.io/workflowsarrow-up-right](https://creator.zerowork.io/workflows) . ### [hashtag](https://docs.zerowork.io/install-the-agent#step-1-download) Step 1: Download Download the agent for Mac, Windows or Linux from [https://creator.zerowork.io/download-agentarrow-up-right](https://creator.zerowork.io/download-agent) . ### [hashtag](https://docs.zerowork.io/install-the-agent#step-2-install) Step 2: Install #### [hashtag](https://docs.zerowork.io/install-the-agent#on-mac) **On Mac** Move the agent icon to the Applications folder. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FbdmxpM2rTwHys7aZvkxk%252FScreenshot%25202023-01-31%2520at%252015.24.43.png%3Falt%3Dmedia%26token%3D904df1f6-901d-4d4c-905a-e0cd7ffba583&width=768&dpr=3&quality=100&sign=44dcb683&sv=2) #### [hashtag](https://docs.zerowork.io/install-the-agent#on-windows) **On Windows** Click on the downloaded .exe file to initiate installation process. If prompted for permissions, confirm and grant access. **On Linux** Select the type you need for your Linux distribution: .AppImage, .deb or .rpm. For Ubuntu or Mint, choose .deb. For Fedora, choose .rpm. Use .AppImage if your distribution doesn’t support .deb or .rpm. **Notes about Linux installation:** * If you choose to use the .AppImage format, it is recommended to install the AppImageLauncher application ([https://github.com/TheAssassin/AppImageLauncherarrow-up-right](https://github.com/TheAssassin/AppImageLauncher) ) and use it to add/remove the agent. * If after starting the agent and waiting for at least 30 seconds, there is no agent tray icon visible in your toolbar / taskbar, please first make sure the agent is running by opening [http://localhost:9990arrow-up-right](http://localhost:9990/) in your browser. If you see the agent-is-running message as a response, then the issue is likely that the tray icon is missing due to not having the appindicator extension installed. Fix it by installing the "extension manager" app, start it and search for extension named "appindicator ..." and install it. For more details, see: [https://linuxiac.com/how-to-enable-system-tray-icons-in-gnome/arrow-up-right](https://linuxiac.com/how-to-enable-system-tray-icons-in-gnome/) . * The openSUSE distribution is not supported. ### [hashtag](https://docs.zerowork.io/install-the-agent#step-3-double-click-to-activate-the-agent) Step 3: Double-Click to Activate the Agent Once installed, double-click the agent to activate it. Double-clicking the agent will make it appear in your toolbar, as shown below (top-right on Mac and bottom-right on Windows). If you see a security prompt by your operating system, such as "ZeroWork Agent is an app downloaded from the internet. Are you sure you want to open it?", click confirm. You won’t see any user interface when the agent runs — this is intentional. The agent works quietly in the background, and that's exactly how it’s meant to function. To build and start TaskBots, go to [https://creator.zerowork.ioarrow-up-right](https://creator.zerowork.io/) . #### [hashtag](https://docs.zerowork.io/install-the-agent#mac-view) Mac view ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FtCcFm5oG0fjvmCkvdezE%252FScreenshot%25202023-01-27%2520at%252015.20.31.png%3Falt%3Dmedia%26token%3D78f962d7-89df-46c0-9398-92efe70fe985&width=768&dpr=3&quality=100&sign=c80ab5c0&sv=2) #### [hashtag](https://docs.zerowork.io/install-the-agent#windows-view) Windows view ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FVOa9cil55DIliQfUvdm8%252Fimage.png%3Falt%3Dmedia%26token%3D08190e6a-88cd-477b-894b-f6af35e68619&width=768&dpr=3&quality=100&sign=c0577cca&sv=2) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FV73347u0s1bJXNNGsucg%252Fimage%2520%281%29.png%3Falt%3Dmedia%26token%3D876344f5-df7a-4d67-a682-6a257c3d65bb&width=768&dpr=3&quality=100&sign=e5e57122&sv=2) ### [hashtag](https://docs.zerowork.io/install-the-agent#step-4-confirm-successful-installation) Step 4: Confirm Successful Installation Build a simple TaskBot that opens a link, as described here [Open Link](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link) . (You can open any link. For example, just use a wikipedia page [https://www.wikipedia.org/arrow-up-right](https://www.wikipedia.org/) .) This is meant as a test to confirm that the agent is working. If you see a browser window popping up, opening that link and then quickly closing the browser window again, then your installation was successful! 🥳 circle-exclamation On Windows, the browser window where the TaskBot runs might not get in front. It might stay behind your primary window. Simply toggle [Stay on Page after Run](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) or minimize your windows after the TaskBot finishes running to locate the Chrome window. ### [hashtag](https://docs.zerowork.io/install-the-agent#how-to-use-agent-options) How to Use Agent Options You can click on the agent in your toolbar to see its options. In the options, you can see the version of your agent and its status (should be 'ready'). **Mac view** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FKakzFhDYonXu7hu9GbDf%252FScreenshot%25202023-01-31%2520at%252015.30.39.png%3Falt%3Dmedia%26token%3Dd2ed35b5-2881-447a-863f-3870d7a2ce76&width=768&dpr=3&quality=100&sign=913b8d6d&sv=2) **Windows view** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FfOsugoBDQM7O85oVgm79%252Fimage%2520%281%29.png%3Falt%3Dmedia%26token%3Dd4e07688-968c-46ea-91eb-ea03b82ee5d3&width=768&dpr=3&quality=100&sign=46486734&sv=2) ### [hashtag](https://docs.zerowork.io/install-the-agent#video-tutorial-install-zerowork-agent) Video Tutorial: Install ZeroWork Agent [PreviousGetting Startedchevron-left](https://docs.zerowork.io/getting-started) [NextCrash Coursechevron-right](https://docs.zerowork.io/crash-course) Last updated 8 months ago * [Step 1: Download](https://docs.zerowork.io/install-the-agent#step-1-download) * [Step 2: Install](https://docs.zerowork.io/install-the-agent#step-2-install) * [Step 3: Double-Click to Activate the Agent](https://docs.zerowork.io/install-the-agent#step-3-double-click-to-activate-the-agent) * [Step 4: Confirm Successful Installation](https://docs.zerowork.io/install-the-agent#step-4-confirm-successful-installation) * [How to Use Agent Options](https://docs.zerowork.io/install-the-agent#how-to-use-agent-options) * [Video Tutorial: Install ZeroWork Agent](https://docs.zerowork.io/install-the-agent#video-tutorial-install-zerowork-agent) sun-brightdesktopmoon sun-brightdesktopmoon --- # Crash Course | ZeroWork Ready to build your first TaskBot? This crash course covers all the basics. 🚀 [PreviousInstall the Agentchevron-left](https://docs.zerowork.io/install-the-agent) [NextGeneral: Run, Schedule, Share, Webhookschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Log in to the Agent | ZeroWork When using webhooks or using scheduler, you need to log in to your agent, as shown below. You do not need to log in to your agent if you don't use webhooks or scheduler. This needs to be done **only once** after the installation. You don't need to be logged in to your agent if you only run TaskBots manually. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent#mac-view) Mac view ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FQjcXghfjRXtXWTjYBMOK%252FScreenshot%25202022-07-25%2520at%252013.35.02.png%3Falt%3Dmedia%26token%3D575a198d-4f91-4960-984c-6f5586e6cd8c&width=768&dpr=3&quality=100&sign=3324eafd&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent#windows-view) Windows view ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FrTGw4Pa8jb5a6H0qz5V6%252Fimage.png%3Falt%3Dmedia%26token%3D3b6e03dd-bf91-4059-8e81-11509138e071&width=768&dpr=3&quality=100&sign=4ee3dbdd&sv=2) Bottom right view ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FiMzDxesga4ql3VGB1ZPe%252Fimage%2520%281%29.png%3Falt%3Dmedia%26token%3Da1d67cd3-567f-45aa-bb8d-752513021405&width=768&dpr=3&quality=100&sign=6e5c4193&sv=2) Click on ZeroWork agent to see the options #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent#after-you-logged-in) After you logged in After you logged in to your agent, you should see status **connected**, as shown below. Same is the case for webhooks if your account has any active webhooks. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F9fsOHsz80agc47E9I6hL%252FScreenshot%25202022-07-25%2520at%252013.15.22.png%3Falt%3Dmedia%26token%3Deaec5a00-8f61-4a10-95a5-3a9b9fc1f0e1&width=768&dpr=3&quality=100&sign=b7bc671f&sv=2) [PreviousStopchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/stop) [NextRun Modeschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # General: Run, Schedule, Share, Webhooks | ZeroWork [Runchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run) [Stopchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/stop) [Log in to the Agentchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent) [Run Modeschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes) [Run Settingschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings) [TaskBot Sharing Optionschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options) [Cookieschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) [Schedulerchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler) [Trigger Run via Webhookchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook) [Proxieschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies) [Remote (Cloud) Executionchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/remote-cloud-execution) [How to Check and Update Your Agentchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent) [Install ZeroWork Agent on VPSchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/install-zerowork-agent-on-vps) [PreviousCrash Coursechevron-left](https://docs.zerowork.io/crash-course) [NextRunchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Run Modes | ZeroWork [Run Incognitochevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito) [Run Non-Incognitochevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito) [Run in My Regular Browserchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) [PreviousLog in to the Agentchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent) [NextRun Incognitochevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito) sun-brightdesktopmoon sun-brightdesktopmoon --- # Stop | ZeroWork When TaskBot started its run, you can stop it at any time by clicking on the _Stop_ button_._ ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fj3jtySjmVe63Om0LkY6K%252FScreenshot%25202023-11-20%2520at%252017.19.25.png%3Falt%3Dmedia%26token%3D1deecb38-a9a3-45b6-a16d-c015ac96341e&width=768&dpr=3&quality=100&sign=21b6a1f9&sv=2) circle-check The data that the TaskBot collected or manipulated up until the stop signal will be saved. [PreviousRunchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run) [NextLog in to the Agentchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Run | ZeroWork When you click on _Run,_ your TaskBot will open a new Chrome browser window and execute the task. To see how _Stop_ works, see [Stop](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/stop) . You can click _Run_ inside the workflow, as shown below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FlCNjNVJm9e9MfA0w8RF3%252FScreenshot%25202023-11-20%2520at%252016.12.44.png%3Falt%3Dmedia%26token%3D69f32377-fe05-4a8e-b735-8cda53d6c829&width=768&dpr=3&quality=100&sign=8fd66fcf&sv=2) Or, you can click on the Play button from your TaskBot list, as shown below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F1Ob9KhaPkT5oHen426HB%252FScreenshot%25202023-11-20%2520at%252016.14.11.png%3Falt%3Dmedia%26token%3D15f4908c-7cdd-439a-b58f-712d840606cf&width=768&dpr=3&quality=100&sign=ae99d710&sv=2) Each time you start running a TaskBot, a real-time display of its actions will be shown: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FL6wNHCaE3vaIyDimUt7O%252FScreenshot%25202023-11-20%2520at%252016.16.43.png%3Falt%3Dmedia%26token%3D063ba784-21e2-4e9c-a531-a787478ecb9d&width=768&dpr=3&quality=100&sign=42e486db&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run#how-many-taskbots-can-i-run-in-parallel-at-the-same-time) How many TaskBots can I run in parallel at the same time? As many as your computer resources allow - that would be between 5 to 20 on a regular Mac depending on what your TaskBot set-up is. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run#troubleshooting-taskbot-does-not-run) Troubleshooting: TaskBot does not run Please see [My TaskBot Does Not Start Run](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run) . [PreviousGeneral: Run, Schedule, Share, Webhookschevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks) [NextStopchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/stop) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Run Non-Incognito | ZeroWork Runs TaskBot in a persistent browser session, reusing the same environment and authentications from previous runs. This mode retains browsing data between runs, making it suitable for tasks that require consistent sessions. Since the browser is re-using the same session, multiple TaskBots cannot run in parallel. If you cannot use the default [Run Incognito](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito) mode but need TaskBots to run in parallel, you might want to explore [Run in My Regular Browser](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) option, which is similar but allows parallel TaskBot runs in multiple tabs. To enable this option, click on the settings gear icon in the top-right corner of your TaskBot page, navigate to TaskBot settings, and select this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fi6hKaMNOlwkDLlK0b73j%252FScreenshot%25202024-11-21%2520at%252010.26.39%2520copy%25205.png%3Falt%3Dmedia%26token%3D8b083039-9afb-48db-bf84-99d4ca657169&width=768&dpr=3&quality=100&sign=95047978&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito#how-do-i-make-taskbot-log-in-to-my-accounts) How do I make TaskBot log in to my accounts? You can add your [Cookies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) in TaskBot settings. Alternatively, you can log in manually. Here is how. You can create a simple TaskBot with one single building block _Open Link_ and activate [Stay on Page after Run](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) option - once your TaskBot opens that link, log in to your account. This session will persist to the subsequent runs. [PreviousRun Incognitochevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito) [NextRun in My Regular Browserchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Run Incognito | ZeroWork This is the default run mode. It runs your TaskBot in an isolated, cache-free, and cookie-free browser session. This mode ensures clean isolation of runs—both parallel (multiple TaskBots) and sequential (the same TaskBot)—without sharing browsing history or stored data. It is ideal for running automations across multiple accounts. To change this option, click on the settings gear icon in the top-right corner of your TaskBot page, navigate to TaskBot settings, and select this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F3cNvKs0yDyoZvIA3MDYb%252FScreenshot%25202024-11-21%2520at%252010.26.39%2520copy%25206.png%3Falt%3Dmedia%26token%3D862d9fa5-6551-4479-a1e9-63661a477fbf&width=768&dpr=3&quality=100&sign=639b495f&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito#when-should-i-use-this-option) When should I use this option? This is the recommended default option for most use cases, especially when managing multiple accounts or when data privacy and isolation is important. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito#how-do-i-make-taskbot-log-in-to-my-accounts) How do I make TaskBot log in to my accounts? You can add your [Cookies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) in TaskBot settings. [PreviousRun Modeschevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes) [NextRun Non-Incognitochevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # What Are Selectors | ZeroWork Every element on a website can be identified by its unique selector (CSS or XPath). Each time you want your TaskBot to interact with an element of a website, such as clicking a button, your TaskBot needs to know the selector of that element in order to perform that action. **Note**: While ZeroWork supports both CSS and XPath selectors, in this guide we will focus on CSS selectors only, as they are more beginner- and intermediate-friendly. We expect more advanced users to be already familiar with how to use XPath selectors. Here is a page whith some basic information about XPath: [How to Use XPath in ZeroWork (advanced)](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-use-xpath-in-zerowork-advanced) . Here is an overview of how to get selectors: * [Copy Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors) * [Use Element's Text](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text) * [How to Build Custom Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors) Are you wondering which way is the best? In the beginning, it may be enough to use the first two methods. These may also be enough if you automate websites other than social media. If you automate social media, then with time you will need to advance your skills by learning how to build your own selectors in order to build truly robust TaskBots. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/what-are-selectors#selectors-introduction-and-overview) Selectors: Introduction and Overview [PreviousUsing Selectorschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors) [NextUse Element's Textchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Remote (Cloud) Execution | ZeroWork _**Upcoming**_ This option will be available at an additional pay-per-cloud-credit cost. With this option, you can run your TaskBots remotely on the cloud. [PreviousProxieschevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies) [NextHow to Check and Update Your Agentchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # How to Check and Update Your Agent | ZeroWork ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent#how-to-check-if-your-agent-is-outdated) How to Check If Your Agent Is Outdated First, open your agent options (see how here:[How to Use Agent Options](https://docs.zerowork.io/install-the-agent#how-to-use-agent-options) ) and check your currently installed agent version. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FlP7XRWCmzu1v8wwEUJKl%252FScreenshot%25202024-07-02%2520at%252018.19.24.png%3Falt%3Dmedia%26token%3D42702062-7785-4fad-b356-1885d3d23e4d&width=768&dpr=3&quality=100&sign=be012414&sv=2) Then, open the general [**agent download page**arrow-up-right](https://creator.zerowork.io/download-agent) and check what the latest available version is. If the version displayed on the download page is higher than the version installed on your machine, your agent is outdated. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FIX6mg1NWD0LeebH7olE2%252FScreenshot%25202024-11-21%2520at%252010.47.58.png%3Falt%3Dmedia%26token%3D9ce827f7-a328-4869-9bad-9e8371b503e7&width=768&dpr=3&quality=100&sign=cc2fc1d2&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent#how-to-update-your-agent) How to Update Your Agent 1. In your agent options, click **Check for update** and confirm the prompt to install the new version. 2. After the update, you'll be asked to confirm an agent restart — simply accept, and you're done! ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FPrHsH2S3VMWsgdJ7OJG3%252FScreenshot%25202025-04-26%2520at%252013.12.31.png%3Falt%3Dmedia%26token%3Db67fd43e-7f8c-465e-8e1d-4c78fb024895&width=768&dpr=3&quality=100&sign=9ad0443d&sv=2) * * * If for any reason the update fails, you can always uninstall your current agent and manually install the latest version from [https://creator.zerowork.io/download-agentarrow-up-right](https://creator.zerowork.io/download-agent) . ✅ Uninstalling and reinstalling the agent will not affect any of your scheduled TaskBots or webhooks. [PreviousRemote (Cloud) Executionchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/remote-cloud-execution) [NextInstall ZeroWork Agent on VPSchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/install-zerowork-agent-on-vps) Last updated 9 months ago * [How to Check If Your Agent Is Outdated](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent#how-to-check-if-your-agent-is-outdated) * [How to Update Your Agent](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent#how-to-update-your-agent) sun-brightdesktopmoon sun-brightdesktopmoon --- # TaskBot Sharing Options | ZeroWork Click on _Share TaskBot_ on your TaskBot builder page. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FqkAV9hXGJLa98c5UAaRI%252FScreenshot%25202023-11-20%2520at%252016.24.42.png%3Falt%3Dmedia%26token%3D49626eb7-579f-47b7-9564-8a30762685be&width=768&dpr=3&quality=100&sign=9f0600f5&sv=2) There are two options how you can share your TaskBot. Whether you use the option to share with specific user or generate a sharing link, a full copy of your TaskBot, including its parameters, variables and tables, will be added to a receiving user's ZeroWork account. Your specific data will not be shared, which means that the receiving user's ZeroWork native tables will have empty rows and variables will have empty values. Google Sheet tables will still contain your Google Sheet link, so be sure to restrict sharing access to it or change it before sharing, if this is not desired. Your TaskBot run settings (cookies, proxy, scheduler, etc.) will never be shared. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#option-share-with-specific-user) Option: Share with specific user Enter the email address of the account you want to send TaskBot to. A copy of your TaskBot will be sent to that user's ZeroWork Creator account. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FqTlM8RUabXo1AdtoWaoj%252FScreenshot%25202024-03-21%2520at%252011.41.45.png%3Falt%3Dmedia%26token%3Dd55ca42b-6c91-4632-9296-fc4419e11ea5&width=768&dpr=3&quality=100&sign=ede12d23&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#option-generate-sharing-link) Option: Generate sharing link You can activate a sharing link. Any user who you share this link with can pull a copy of your TaskBot to their ZeroWork Creator account. By deactivating, your link will become inaccessible. By resetting (see the renew icon on the right of the link 🔄), your current link will become inaccessible and a new link will be generated. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FdIvZe78mQkNxxO3Ny9Ot%252FScreenshot%25202024-03-21%2520at%252011.46.21.png%3Falt%3Dmedia%26token%3D90f8f525-98fc-49b4-862e-dea6f79efac8&width=768&dpr=3&quality=100&sign=f5b9ca75&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#are-cookies-and-proxy-details-shared) Are cookies and proxy details shared? No, your TaskBot run settings are never shared with the user who pulls a copy of your TaskBot. Their TaskBot run settings (including scheduler set-up) will be reset to blank or default values. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#are-tables-variables-and-parameters-sent-to-the-other-user-too) Are tables, variables and parameters sent to the other user, too? When sending a TaskBot to another account, everything is duplicated including the TaskBot logic (building blocks), all the tables and their columns, variables and parameters. Data inside ZeroWork native tables and variables won't be duplicated in order to protect your privacy. This means that the duplicated TaskBot's variables will contain **empty** values and the native tables with have no rows. Note that the Google Sheet tables will still contain your Google Sheet link. If this is not desired, be sure to change it to a different link or restrict access to it. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#what-if-i-want-to-share-the-data-inside-my-zerowork-native-tables-too) **What if I want to share the data inside my ZeroWork native tables, too?** If you need to, you can export your data as CSV and give that CSV to the other user, so that they can [Import Data from CSV](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv) . The whole process takes just a few clicks on both sides. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#after-generating-a-sharing-link-i-added-more-changes.-will-they-be-reflected) After generating a sharing link, I added more changes. Will they be reflected? Yes, the sharing link enables other users to duplicate your **current** TaskBot. So whatever changes you make, they are always reflected. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#after-sending-to-specific-user-when-will-the-user-receive-the-taskbot) **After sending to specific user, when will the user receive the TaskBot?** It takes just a minute or less to duplicate the TaskBot to the other user. After you sent your TaskBot to another account, that user will see it in their list of TaskBots. They may need to reload their page to see the received TaskBot and its tables. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options#troubleshooting-after-sending-to-specific-user-the-receiving-user-did-not-receive-the-taskbot) Troubleshooting: After **sending to specific user, t**he receiving user did not receive the TaskBot Please ask them to reload their page. [PreviousBring Pages to Frontchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/bring-pages-to-front) [NextCookieschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Scheduler | ZeroWork triangle-exclamation **IMPORTANT**: * When you use Scheduler for the first time, you need to **log in to your agent** (see instructions here: [Log in to the Agent](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent) ). * During the scheduled time, your **agent must be active**. That means if you quit it or restarted your computer after which you didn't activate the agent, the scheduled task won't happen because there is no agent to run it. * During the scheduled time, your computer **must be turned on and active**. You may want to adjust your sleep mode and battery settings to ensure that your computer doesn't turn off or switch to a sleep mode for the time that the TaskBot is scheduled to run. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#how-to-set-up-the-scheduler) How to Set up the Scheduler Click on the scheduler icon inside your TaskBot, as shown here: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FbsfWAaydYWyfgkgwQujn%252FScreenshot%25202024-06-17%2520at%252020.17.34.png%3Falt%3Dmedia%26token%3D1fcd2ba4-d9fa-4d9d-a60d-2187205ce854&width=768&dpr=3&quality=100&sign=f33cb6cd&sv=2) A dialog will open. Now you choose the time or interval for your TaskBot ton run. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FizS2QNMMawvvogtwGjx4%252FScreenshot%25202024-06-17%2520at%252020.18.33.png%3Falt%3Dmedia%26token%3D7b97a955-9499-4074-a263-17fc717edb0f&width=768&dpr=3&quality=100&sign=a17e726b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#can-i-schedule-multiple-taskbots-in-parallel) Can I schedule multiple TaskBots in parallel? Yes, you can run parallel scheduled jobs - just make sure your computer has enough capacity to handle multiple parallel executions. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#i-want-to-run-my-scheduled-taskbots-on-a-dedicated-device-but-i-want-to-keep-building-and-running-ta) I want to run my scheduled TaskBots on a dedicated device but I want to keep building and running TaskBots manually on my current device without interfering with the scheduled TaskBots. How to achieve this? Let's say, you have a dedicated computer A where you want to run your **scheduled** TaskBots, and you have computer B where you want to continue building and running TaskBots (in this case running means that you **manually** click on the run button). To enable this setup, follow these simple steps: * Install the agent on both computers A and B. * Log in to your scheduler inside the agent on your computer A (as described here: [Log in to the Agent](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent) ). * Do **not** log in inside the agent on your computer B. Explanation: Your agent needs to be logged in **only** for scheduled runs and runs triggered by webhooks ([Trigger Run via Webhook](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook) ). It does not need to be logged in for runs that happen when you click on _Run_ button manually. So by logging in only to the agent that runs scheduled TaskBots (on computer A), you can ensure that the second agent (on computer B) won't pick up on any scheduled or webhook-triggered TaskBots and you can use it for manual runs. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#i-forgot-to-turn-on-my-computer-at-the-time-of-the-scheduled-run.-will-it-still-run) I forgot to turn on my computer at the time of the scheduled run. Will it still run? No, if the agent is inactive at the time when the scheduled run is supposed to start, then the scheduled run is skipped. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#if-a-taskbot-is-scheduled-to-run-but-it-is-currently-running-already-what-will-happen) If a TaskBot is scheduled to run but it is currently running already, what will happen? If a TaskBot is scheduled to run but it is already running, the new run will not be triggered. The currently active run will continue to run. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#i-tried-logging-into-https-creator.zerowork.io-from-device-a-where-im-not-logged-in-to-my-agent-and) I tried logging into [https://creator.zerowork.io/arrow-up-right](https://creator.zerowork.io/) from device A (where I'm not logged in to my agent), and scheduling a TaskBot to run on device B (where I'm logged in to my agent). However, the scheduled run did not happen. What can be the issue? You can schedule for a different device, but you would need to restart your agent on the device where it's supposed to run on schedule (in this case device B). As a desktop app, the agent cannot be called by the backend that operates on the cloud. (A desktop application can call the backend itself, but it cannot be called by it.) This is why it needs to be called from frontend (in other words, your scheduling or rescheduling action in the user interface triggers the agent to update the list of its scheduled jobs). However, when you restart the agent, it will fetch all the updated scheduled jobs. [PreviousCookieschevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) [NextTrigger Run via Webhookchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook) Last updated 1 year ago * [How to Set up the Scheduler](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#how-to-set-up-the-scheduler) * [FAQ](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Run Settings | ZeroWork [Run in Backgroundchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/run-in-background) [Stay on Page after Runchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) [Bring Pages to Frontchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/bring-pages-to-front) [PreviousRun in My Regular Browserchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) [NextRun in Backgroundchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/run-in-background) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Copy Selectors | ZeroWork Copying selectors can be done very easily. Although directly copied selectors won't work for all use cases, they will work in **most** cases, and given how easy this method is, it's a great starting point. This section explains how to copy selectors in one click. We recommend this free CSS selector tool for Chrome: [Copy CSS Chrome pluginarrow-up-right](https://chrome.google.com/webstore/detail/copy-css-selector/kemkenbgbgodoglfkkejbdcpojnodnkg) . With it, you can right-click on any element of the website to copy its CSS selector and then paste it into the building block _Website action_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FA3HMNACjfiqcywJsAwai%252FScreenshot%25202022-05-01%2520at%252013.23.55.png%3Falt%3Dmedia%26token%3D6a0b7882-2650-48d6-b2ec-c766c6d84f14&width=768&dpr=3&quality=100&sign=cc081488&sv=2) After clicking on _copy CSS selector_, wait a few seconds until a dotted frame is shown. If no frame is shown, then something went wrong - try right-clicking again until the frame appears. This is what this frame looks like: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FOv1xQZMrPs5AXjgy7hcN%252FScreenshot%25202022-05-01%2520at%252013.26.06.png%3Falt%3Dmedia%26token%3D41b2dc3e-7160-4eb0-be37-3c5dd30ccdfe&width=768&dpr=3&quality=100&sign=debfcd69&sv=2) Wait for the frame to appear on the selected element ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors#video-tutorial-introduction-to-selectors) Video Tutorial: Introduction to Selectors [PreviousUse Element's Textchevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text) [NextHow to Build Custom Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Use Element's Text | ZeroWork If the element you want to address has unique text, you can address that element by that text. For example, if you want to automatically like a page on Facebook, you can make your TaskBot find and click on a button with text "Like". Below you will see how exactly this can be done. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#exact-match) **Exact Match** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#text-enter-exact-text-of-the-element-inside-the-double-quotes) _**text="Enter exact text of the element" (inside the double quotes)**_ If you enter text inside double quotes, as shown below, your TaskBot will search for an element that matches exactly this text. text="some text" Beware: This option is case-sensitive! For example, assume you want to start a post on LinkedIn, and the button on LinkedIn is called "Start a post". ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FtQYh5eCFIkuBXv5dmejo%252FScreenshot%25202022-07-08%2520at%252018.01.09.png%3Falt%3Dmedia%26token%3D4ad61d22-489a-4668-82ac-593e9aa75eff&width=768&dpr=3&quality=100&sign=1b286e0f&sv=2) In this case, you can create a selector using the following syntax: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F3GdygJL89Iu9TXpxm7Rm%252FScreenshot%25202023-11-20%2520at%252017.39.57.png%3Falt%3Dmedia%26token%3Db254f340-652a-43af-8919-495cd195515f&width=768&dpr=3&quality=100&sign=8daa24b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#loose-match) **Loose Match** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#text-enter-some-keywords-of-the-text-of-the-element-without-double-quotes) _**text=Enter SOME keywords of the text of the element**_ **(without double quotes)** If you enter text without double quotes, as shown below, your TaskBot will search for an element that has text that contains the keywords you provided. text=some keywords that the text contains For example, assume you want to save the number of followers from a Facebook business page, and the information on the page contains a text that says _1,456 people follow this_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FnIejlYQvLdnFhR9TLwBW%252FScreenshot%25202022-07-08%2520at%252018.02.19.png%3Falt%3Dmedia%26token%3D7ab46220-9cca-4d6e-a160-2f4c850b3239&width=768&dpr=3&quality=100&sign=cfdac622&sv=2) As the number changes dynamically depending on the popularity of the page, you cannot use text="1,456 people follow this" (with double quotes) but you can use the keyword _people follow this_. Simply skip double quotes like shown here: text=people follow this (❌ instead of text="people follow this") ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F1WcYHue8vXCk1C782PJ6%252FScreenshot%25202023-11-20%2520at%252017.43.26.png%3Falt%3Dmedia%26token%3Dbbb9c5fc-eaf4-4157-9086-a11b0bb63536&width=768&dpr=3&quality=100&sign=6d9f776a&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#video-tutorial-introduction-to-selectors) Video Tutorial: Introduction to Selectors ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#video-tutorial-example-of-using-text-and-text) Video Tutorial: Example of Using text="" and text= [PreviousWhat Are Selectorschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/what-are-selectors) [NextCopy Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors) Last updated 26 days ago * [Exact Match](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#exact-match) * [Loose Match](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#loose-match) * [Video Tutorial: Introduction to Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#video-tutorial-introduction-to-selectors) * [Video Tutorial: Example of Using text="" and text=](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text#video-tutorial-example-of-using-text-and-text) sun-brightdesktopmoon sun-brightdesktopmoon --- # Using Selectors | ZeroWork [What Are Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/what-are-selectors) [Use Element's Textchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text) [Copy Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors) [How to Build Custom Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors) [How to Use XPath in ZeroWork (advanced)chevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-use-xpath-in-zerowork-advanced) [CSS Selectors Master Classchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/css-selectors-master-class) [PreviousInstall ZeroWork Agent on VPSchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/install-zerowork-agent-on-vps) [NextWhat Are Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/what-are-selectors) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Run in Background | ZeroWork When enabled, TaskBot will run in the background, hiding the browser window entirely. When disabled, TaskBot will display the browser window on your screen, allowing you to watch its actions. To enable this option, click on the settings gear icon in the top-right corner of your TaskBot page, navigate to TaskBot settings, and select this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FpWIiC3RnQB86vt1q0kaw%252FScreenshot%25202024-11-21%2520at%252010.26.39%2520copy.png%3Falt%3Dmedia%26token%3Da6e7b73c-a042-45bf-8ac3-a9cbb72fc6f4&width=768&dpr=3&quality=100&sign=5547fb16&sv=2) circle-info _Run in background_ is ignored when using the [Run in My Regular Browser](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) mode. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/run-in-background#faq) FAQ **When should I use this option?** * **During Building or Testing:** Keep this option disabled while building or testing your TaskBot so you can monitor its actions and ensure everything runs as expected. * **After Ensuring Reliability:** Once you’re confident your TaskBot is functioning reliably, you can enable this option. Here are some additional tips: * Many users with two or more monitors prefer to leave _Run in Background_ disabled. This allows them to keep an eye on the TaskBot's progress in another browser window on their secondary monitor while continuing their work on their primary monitor. * Other users prefer to keep it enabled at all times, monitoring TaskBot activity via the **Running TaskBots display**, reviewing logs and setting up notifications for failed runs (see [Using Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports) ). [PreviousRun Settingschevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings) [NextStay on Page after Runchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Install ZeroWork Agent on VPS | ZeroWork You can install and run the ZeroWork Agent on a VPS. Follow this community tutorial to learn how: [PreviousHow to Check and Update Your Agentchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent) [NextUsing Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors) Last updated 10 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # CSS Selectors Master Class | ZeroWork [PreviousHow to Use XPath in ZeroWork (advanced)chevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-use-xpath-in-zerowork-advanced) [NextUsing Building Blockschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Bring Pages to Front | ZeroWork This setting brings each new active page (such as a new tab or a link opened in a new tab) to the front. circle-info Some operating systems, like macOS, will bring the browser window to the front _once_ at the start of the run when launching Chrome, regardless of whether this option is enabled or disabled. When this option is disabled, your TaskBot does not bring new tabs to the foreground when opening or switching to them. If you observe your TaskBot in action and it uses the [Switch or Close Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) building block, you’ll notice that the TaskBot switches to the new tab silently, without bringing it to the foreground. To disable or enable this option, click on the settings gear icon in the top-right corner of your TaskBot page, navigate to TaskBot settings, and select this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FDXpDHLIK1VampboPWv8H%252FScreenshot%25202024-11-21%2520at%252010.26.39%2520copy%25203.png%3Falt%3Dmedia%26token%3Df5b28c9e-c1fb-42c2-89c0-1659ee900a1b&width=768&dpr=3&quality=100&sign=ebd333fb&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/bring-pages-to-front#faq) FAQ **When should I use this option?** Keep enabled while building or testing your TaskBot, so you can monitor pages as they come to the front during the run. [PreviousStay on Page after Runchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) [NextTaskBot Sharing Optionschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Cookies | ZeroWork Enable your TaskBot to access your browser cookie session, so that it doesn't have to log in every time it runs in an incognito session. circle-exclamation If you ever log out from the website that you copied cookies from, this will invalidate the cookie session. So if you log out, be sure to re-copy and re-paste your cookies again! circle-exclamation Your cookies may expire over time. Simply copy them again and paste to your TaskBot workflow, as described below. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#step-1-copy-cookies) Step 1: Copy Cookies Download this free-of-charge plugin Cookie-Editor: [https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdmarrow-up-right](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) . Click on the puzzle sign on your Chrome bar and pin it, like shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FxgzGGFTq2sTlR2xiQq8n%252FScreenshot%25202024-11-12%2520at%252013.05.14.png%3Falt%3Dmedia%26token%3D31f23915-9a58-4b40-9fef-de96b88a3f48&width=768&dpr=3&quality=100&sign=9ef0c951&sv=2) Go to the website for which you need to get cookies. For example, if you are building a TaskBot for LinkedIn, open linkedin.com, make sure you are logged in, click on the Cookie-Editor plugin and click on Export button - marked red in the screenshot below. Then select _Export as JSON_ option. That action will copy your cookies to your clipboard. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FF7gRWTbVVGZhHgDBOVFY%252FScreenshot%25202024-11-12%2520at%252013.10.06.png%3Falt%3Dmedia%26token%3D5ccc1a40-c134-4b70-b4e9-987bf3492228&width=768&dpr=3&quality=100&sign=40064518&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#step-2-paste-cookies-to-zerowork) Step 2: Paste Cookies to ZeroWork Now return to your TaskBot builder page, open _TaskBot Settings_ and paste your cookies in the cookies field. Now you are good to go! ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fl94SqpXjmeHvVeimQ4hp%252FScreenshot%25202023-11-20%2520at%252016.09.38.png%3Falt%3Dmedia%26token%3D13058828-064f-4ecf-862a-811c2da2219c&width=768&dpr=3&quality=100&sign=87ce8277&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#troubleshooting-taskbot-cannot-log-in-with-cookies) Troubleshooting: TaskBot Cannot Log in with Cookies In some rare cases, some websites do not accept cookies to be logged in with. In such cases, you have two options: * Use building blocks to build a login flow. For example, add the building block [Insert Text or Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data) with your username and password and then add the building block [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) to click on the button "Log in". You can encrypt your password, as described here: [Encrypt Content](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#encrypt-content) . * Use [Run in My Regular Browser](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) or [Run Non-Incognito](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito) run modes. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#video-tutorial) Video Tutorial Start watching from 2:55 mark to see how to use cookies. [PreviousTaskBot Sharing Optionschevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/taskbot-sharing-options) [NextSchedulerchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler) Last updated 1 year ago * [Step 1: Copy Cookies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#step-1-copy-cookies) * [Step 2: Paste Cookies to ZeroWork](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#step-2-paste-cookies-to-zerowork) * [Troubleshooting: TaskBot Cannot Log in with Cookies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#troubleshooting-taskbot-cannot-log-in-with-cookies) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Proxies | ZeroWork Enable the TaskBot to be launched via your own proxies. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies#step-1-open-your-proxy-providers-dashboard) Step 1: Open Your Proxy Provider's Dashboard Enter your proxy address, username and password. If your proxy does not require username and password, leave those fields blank. For example, consider this proxy configuration provided by a commonly used proxy provider in the screenshot below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FSzQRNfkRXm3IbvtwW54w%252FScreenshot%25202023-06-16%2520at%252013.16.55.png%3Falt%3Dmedia%26token%3D40dc1e20-95b0-4e99-9033-d84069a724ad&width=768&dpr=3&quality=100&sign=ed411a05&sv=2) Given this proxy configuration, then this will be the data you will need to enter. * **Proxy address**: 194.32.225.238:21261 (proxy IP followed by the port, separated by a colon) * **Username**: See username in 4th column * **Password**: See password in 5th column triangle-exclamation **IMPORTANT**: Your proxy address should be entered as a combination of ip **and** port, separated by a colon mark. **Example**: Proxy ip is 194.32.225.238 and the port is 21261. ❌ 194.32.225.238 won't work because port is missing. ❌ 194.32.225.23821261 won't work because port must be separated from ip. ❌ 194.32.225.238.21261 won't work because port must be preceded by a colon mark, not dot. ✅ **194.32.225.238:21261 will work.** #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies#socks5-proxy) SOCKS5 Proxy To use SOCKS5 proxies, use this format: socks5://:3128, where 3128 corresponds to the port as described above. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies#step-2-open-settings-and-enter-your-proxy-data) Step 2: Open Settings and Enter Your Proxy Data Simply click on the settings gear on the top right of your TaskBot page to access TaskBot settings, click on _Add proxy_ and then enter your proxy credentials. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FtZaRdAvXrwKAf7Du5EaN%252FScreenshot%25202024-12-29%2520at%252013.19.42.png%3Falt%3Dmedia%26token%3D00f73aea-9948-44d2-885d-094ec4c0f71b&width=768&dpr=3&quality=100&sign=aaef9f63&sv=2) [PreviousTrigger Run via Webhookchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook) [NextRemote (Cloud) Executionchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/remote-cloud-execution) Last updated 1 year ago * [Step 1: Open Your Proxy Provider's Dashboard](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies#step-1-open-your-proxy-providers-dashboard) * [Step 2: Open Settings and Enter Your Proxy Data](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies#step-2-open-settings-and-enter-your-proxy-data) sun-brightdesktopmoon sun-brightdesktopmoon --- # Stay on Page after Run | ZeroWork When enabled, TaskBot will keep the browser window open after completing its run. This is particularly useful if you want to remain on the page to perform manual actions after the TaskBot finishes. When disabled, TaskBot will close the window automatically. To enable this option, click on the settings gear icon in the top-right corner of your TaskBot page, navigate to TaskBot settings, and select this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuT4AUC6pS424s5Ojl2jJ%252FScreenshot%25202024-11-21%2520at%252010.26.39%2520copy%25204.png%3Falt%3Dmedia%26token%3D8aa9ba4d-071e-4f13-8a36-d374901ba1e5&width=768&dpr=3&quality=100&sign=655ab5e1&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run#behavior-across-different-run-modes) Behavior Across Different Run Modes **When using** [Run Incognito](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-incognito) **mode** * TaskBots operate in independent browser environments. If _Stay on Page After Run_ is enabled, the corresponding browser instance will remain open and idle after the TaskBot completes its run. * Keep in mind that having multiple Chrome instances open simultaneously can significantly consume computer resources, particularly if several instances are left idle. **When using** [Run in My Regular Browser](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser) **mode** * By default, pages opened during the TaskBot run are closed once the run is complete. * If _Stay on Page After Run_ is enabled, the tab will remain open instead. **When using** [Run Non-Incognito](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito) **mode** * You can enable _Stay on Page After Run_, but note the following limitation. _Run Non-Incognito_ does not allow parallel TaskBot runs, so you cannot initiate a new TaskBot run in this mode while the current page remains open. The existing page must be closed first. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run#faq) FAQ **When should I use this option?** Keep disabled to save computer resources, unless you need to verify something on the page after the run (e.g., check if a form was filled correctly) or perform manual actions after the TaskBot finishes. [PreviousRun in Backgroundchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/run-in-background) [NextBring Pages to Frontchevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/bring-pages-to-front) Last updated 1 year ago * [Behavior Across Different Run Modes](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run#behavior-across-different-run-modes) * [FAQ](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Run in My Regular Browser | ZeroWork Runs TaskBot directly in your regular browser session, reusing your **existing logged-in accounts and extensions**. This feature supports Chromium-based browsers like Chrome, Brave and most anti-detect browsers. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#parallel-runs) Parallel runs TaskBots can run in parallel, each operating in its own tab. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#combine-manual-work-with-automation) Combine manual work with automation You can continue using your own tabs while TaskBots run in others, enabling manual and automated work side-by-side. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#let-taskbots-access-your-own-tabs-or-tabs-of-parallel-taskbots) Let TaskBots access your own tabs or tabs of parallel TaskBots Each TaskBot launches a new browser tab or window in the specified Chrome profile, but the context is not isolated — TaskBots can access all open pages within your regular browser, regardless of the profile. Using the [Switch or Close Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) building block, you can direct your TaskBot to work with tabs opened manually or by other TaskBots. However, be cautious to avoid unintentionally closing or switching to the wrong tab. circle-info When using the [Switch or Close Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) building block with _Run in my regular browser_ mode enabled, it’s recommended to define the tab using the **Tab URL** rather than options based on the tab order. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#after-taskbot-finishes-its-run) After TaskBot finishes its run Tabs used by TaskBots will be automatically closed after the run. To prevent this, select the [Stay on Page after Run](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) option. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#how-to-enable) How to enable To enable this option, click on the settings gear icon in the top-right corner of your TaskBot page, navigate to TaskBot settings, and select this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FJJ1vztAXDAfe2sfii5Em%252FScreenshot%25202024-11-21%2520at%252011.10.57.png%3Falt%3Dmedia%26token%3D368d6074-73a9-4006-afc1-ed3d7a0fe643&width=768&dpr=3&quality=100&sign=d203aa1c&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#before-you-start) Before you start 1. **Ensure a Chromium-based browser is installed** Make sure a Chromium-based browser (Chrome, Brave, etc.) is installed on your system. 2. **Specify profile path (optional)** By default, TaskBots will use the "Default" Chrome profile. If you want TaskBots to use a specific profile or a browser other than Chrome, do this: * Open your browser, go to `chrome://version`. This URL works for any Chromium-based browser, like Chrome or Brave. If the page doesn't open, you're likely using a non-Chromium browser, such as Firefox or Safari. (Regular browser run mode is only supported in Chromium-based browsers.) * Look for the **Profile Path** field. Copy and paste the entire line. A typical profile path might look like this: /Users/your-username/Library/Application Support/Google/Chrome/Default. * Add this profile name to the TaskBot settings. 3. **Provide browser path (optional)** If you want ZeroWork to connect to a browser other than Chrome or your Chrome installation is not in the default location, provide the path to the browser executable: * Open your browser, go to `chrome://version`, and copy the value under **Executable Path**. * Paste this value into the account settings. (Click on _Add custom path_.) 4. **Connect ZeroWork to your browser by relaunching it** 1. **If not on Chrome browser** If you want ZeroWork to connect to a browser **other than** Chrome, please read the section **Connect ZeroWork to your browser manually** further down the page. 2. **If on Chrome browser** If you want ZeroWork to connect to **Chrome**, then there is a convenience option to relaunch Chrome in a connected state. Click on Relaunch Chrome option in the _Required Action_ section. If you want to use a browser other than Chrome, please read step 5. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fx5XYPLoXafYks7yrfqv0%252FScreenshot%25202024-11-21%2520at%252011.21.27.png%3Falt%3Dmedia%26token%3D0edf9f84-b7ce-4044-8bff-45e8ccdea88b&width=768&dpr=3&quality=100&sign=a18618bb&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#troubleshooting-cannot-relaunch-connect-to-the-browser-for-the-first-time) Troubleshooting: Cannot relaunch / connect to the browser for the first time Here are possible reasons and approaches to resolve them: * **Too many tabs** If the connect attempt fails, it may be due to having too many tabs open in Chrome. This can interfere with the relaunch process. * **Recommendation:** Before retrying, close as many tabs as possible and keep the total number of open tabs under **10**. * This will improve the reliability of the launch process. * **Your computer has low processing power** It has been reported that the relaunch process does not work as reliably on devices with low processing power. If that's your case, please try the manual solution to connect your agent to your browser. Steps are described in section **Connect ZeroWork to your browser manually** further down the page. * **Your system prevents the quit operation** You will need to quit your browser manually. Please read the section **Connect ZeroWork to your browser manually** below.👇 #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#connect-zerowork-to-your-browser-manually) Connect ZeroWork to your browser manually 1. **Quit browser manually** Quit your browser entirely to ensure all processes are terminated. Be sure to **quit**, not just close. 2. **Open ZeroWork in a different browser** Use a browser other than the one you want ZeroWork to connect to and navigate to https://creator.zerowork.io. 3. **Open TaskBot run settings** Pick a simple TaskBot that contains the **Open Link** building block and open TaskBot run settings. 4. **Select** _**Run in my regular browser**_ **mode** Select _Run in my regular browser_ mode. The connection status will show _Not connected,_ but this is normal and does not matter. 5. **Enable** _**Stay on Page after Run**_ Enable the [Stay on Page after Run](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) option for this run. This prevents the TaskBot from closing the tab it was running in, keeping the browser connected to the agent. 6. **Run the TaskBot** Click on run. By clicking on run, the agent will launch the desired browser in the required connected state. **Tip**: Use a very simple TaskBot that only opens one link and takes just a few seconds to run. 7. **Continue using your browser** Once the TaskBot has launched your browser, you can switch back to using it for your manual or automated workflows, and the agent will remain connected. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-in-my-regular-browser#video-tutorial) Video Tutorial [PreviousRun Non-Incognitochevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-modes/run-non-incognito) [NextRun Settingschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Trigger Run via Webhook | ZeroWork triangle-exclamation * Before you can use webhooks to trigger TaskBot run on your desktop agent, you need to log in to your agent, as described here: [Log in to the Agent](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/log-in-to-the-agent) . * During the triggered run, your **agent must be active**. That means if you quit it or restarted your computer after which you didn't activate the agent, the run won't happen because there is no agent to run it. * During the triggered run, your computer **must be turned on and active**. You may want to adjust your sleep mode and battery settings to ensure that your computer doesn't turn off or switch to a sleep mode for the time that the TaskBot is scheduled to run. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#generate-webhook-link) Generate Webhook Link Go to your TaskBot builder page, open _TaskBot Settings_ and click on _Generate Webhook_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FNg9pdFnDjnnofczPAoso%252FScreenshot%25202024-05-10%2520at%252014.54.52.png%3Falt%3Dmedia%26token%3Dc0fd1265-7b65-4f7f-bcdd-e1cba324aab0&width=768&dpr=3&quality=100&sign=fb773616&sv=2) Once generated, you will be able to copy the link and use it to trigger TaskBot run programmatically. You can use this link in third-party applications such as Zapier, Make, Pabbly, etc. The webhook can be triggered with a POST or GET method. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FWrBSbRDfaIMQue3uA5M7%252FScreenshot%25202024-05-10%2520at%252014.57.52.png%3Falt%3Dmedia%26token%3D1a7335e5-f52e-4c99-8cfe-3b521f048352&width=768&dpr=3&quality=100&sign=df92a053&sv=2) Beware that anyone with this link can trigger TaskBot run on your account. If you ever shared this link with anyone and now want to remove their access, you can either deactivate your webhook link or generate a new one. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#deactivate-webhook-link) Deactivate Webhook Link Simply toggle _Webhook is active_ option off. If the webhook is not active, it cannot be triggered. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#generate-a-new-link) Generate a New Link To generate a new link, delete your current one by clicking on the trash bin icon and then click on _Generate Webhook_ button again. This action will generate a new link, and the old one will be permanently deleted. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#send-dynamic-data) Send Dynamic Data In a POST request, you can send dynamic data in the payload body. Query parameters are also supported (in both GET and POST requests). #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#in-built-variable-zw_webhook_data) In-built variable zw\_webhook\_data Your data from the request body is always saved in the variable called zw\_webhook\_data. You do not need to create this variable manually. Whenever you trigger your TaskBot by a webhook, the variable will be updated or, if not created yet, automatically created. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FmNgR4J5rJwOtMdLcjmLk%252FScreenshot%25202024-09-26%2520at%252016.09.22.png%3Falt%3Dmedia%26token%3D00e6a424-f0ff-4f60-994c-52065605c050&width=768&dpr=3&quality=100&sign=3cbadc6b&sv=2) The data is saved in stringified JSON format. **Tip**: You can access nested objects or arrays that were saved to zw\_webhook\_data in [Write JavaScript](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript) building block by using JSON.parse() method. Here is an example: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FAWQQNBmqJiHBpJqXqGPM%252FScreenshot%25202024-09-26%2520at%252016.19.10.png%3Falt%3Dmedia%26token%3D978bcb73-b923-4505-8990-afa8ec44d633&width=768&dpr=3&quality=100&sign=dae17aa2&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#match-specific-values-from-your-dynamic-data-to-variables) Match specific values from your dynamic data to variables You can also create variables, and the data in your webhook payload will be matched to those. In addition to matching, the whole payload will _still_ be saved to the aforementioned zw\_webhook\_data variable. **Example** Consider your TaskBot has these variables: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FWJaLbsXJtoy1IvcY2R1f%252FScreenshot%25202024-07-01%2520at%252016.45.36.png%3Falt%3Dmedia%26token%3Df62110cc-5576-431b-b326-cfec2fa5a6ac&width=768&dpr=3&quality=100&sign=e58641c&sv=2) You can add variable names and values as key-value pairs to your request body. For example, if you make your request via Postman (or any other API application), this is how it would look like: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FXFYoGFENUdD1FN5Nq8qC%252FScreenshot%25202024-09-10%2520at%252012.36.14.png%3Falt%3Dmedia%26token%3Deb455e17-6cb9-4233-a88a-78502c05156c&width=768&dpr=3&quality=100&sign=55fe688d&sv=2) After sending the webhook request as shown above, this would be the new state of your variables: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FjqQL5fZdlCqRphz48ykQ%252FScreenshot%25202024-09-26%2520at%252016.28.31.png%3Falt%3Dmedia%26token%3D7b7938e0-9782-4853-bff4-db5a73ce96cf&width=768&dpr=3&quality=100&sign=d6082&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#match-nested-objects-or-arrays-to-variables) Match nested objects or arrays to variables You can create variables as JSON paths to match nested objects or arrays (as well as execute JSON path supported queries on your payload). **Example** Consider this to be your webhook payload data: This is how you can create a variable for one of the nested values: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FAdf4Hq4tTomozDV3DZeu%252FScreenshot%25202024-09-26%2520at%252016.43.48.png%3Falt%3Dmedia%26token%3D7c42dee9-9565-4da8-a7bf-84b013875e28&width=768&dpr=3&quality=100&sign=45af9752&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#example-of-advanced-json-path-use) Example of advanced JSON path use JSON path operators (wildcard, filter, recursive descent) and query behavior are supported. Here is an example. Consider this to be your webhook payload data: To get an array of all cities, you can use the wildcard operator \* as in `cities[*].city`. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FdGZ2dOyiG2ZEeqbQzvfd%252FScreenshot%25202024-09-26%2520at%252016.49.51.png%3Falt%3Dmedia%26token%3D3434f8af-da24-441b-b6f9-2115480a3b7a&width=768&dpr=3&quality=100&sign=61bb0be2&sv=2) Similarly, you can use filter operators supported by JSON path to query specific data. Examples: * Filter for the city object where city is Berlin: `cities[?(@.city==="Berlin")]`. * Filter for the cities with population over 5M: `cities[?(@.population>5000000)]`. This will return an array of city objects of those cities where population is over 5M. #### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#notes) Notes * You do not need to include _all_ (or any at all) variables in your body request. Include only those variables that you need to match data to. * Matching is case-sensitive. For example, "Link" will be matched to "Link" and will not be matched to "LINK" or "link". * JSON path variable can be created with or without the dollar $ character. You can evaluate your JSON path here: [https://jsonpath.com/arrow-up-right](https://jsonpath.com/) . The resource can also help you validate your JSON path syntax. * If your JSON path is invalid or there is no match between some of the TaskBot variables and the webhook payload data, no error will be thrown. ### [hashtag](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#trigger-webhook-within-a-taskbot-run) Trigger Webhook within a TaskBot Run Sometimes you might want to trigger another TaskBot within a TaskBot run. For this, you can use _Send HTTP Request_ building block (see [APIs: Send HTTP Request](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request) ). See example set-up below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FVhhHBdLSdYc6A6AkmG30%252FScreenshot%25202024-09-10%2520at%252012.41.12.png%3Falt%3Dmedia%26token%3D48a9a54f-a056-491f-946d-3367f49a6598&width=768&dpr=3&quality=100&sign=cfa6250d&sv=2) [PreviousSchedulerchevron-left](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/scheduler) [NextProxieschevron-right](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/proxies) Last updated 1 year ago * [Generate Webhook Link](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#generate-webhook-link) * [Deactivate Webhook Link](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#deactivate-webhook-link) * [Generate a New Link](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#generate-a-new-link) * [Send Dynamic Data](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#send-dynamic-data) * [Trigger Webhook within a TaskBot Run](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/trigger-run-via-webhook#trigger-webhook-within-a-taskbot-run) sun-brightdesktopmoon Copy { "city": { "name": "Berlin", "country": "Germany", } } Copy { "cities": [\ {\ "city": "Berlin",\ "population": 3577000,\ "country": {\ "name": "Germany",\ "identifier": "DE"\ }\ },\ {\ "city": "London",\ "population": 9748000,\ "country": {\ "name": "United Kingdom",\ "identifier": "UK"\ }\ },\ {\ "city": "New York",\ "population": 9469232,\ "country": {\ "name": "United States",\ "identifier": "US"\ }\ }\ ] } sun-brightdesktopmoon --- # How to Build Custom Selectors | ZeroWork If copying selector does not produce reliable results, you need to build your own selector. We strongly recommend you to learn how to build your own selectors. Building custom selectors will allow you to create truly robust TaskBots that work reliably over time. Maybe you have tried other RPA or bot builder tools and are frustrated why bots break or do not work reliably over time. The answer is almost always this: You need more robust selectors, simply copying them is often not enough. And it's even more true if you build automations for social media. The great news is that you **do not need any coding skills** to learn how to do it! Here is what you need to learn in order to build your own selectors. Scroll below to find the video crash course as well. **Note**: As mentioned earlier, ZeroWork supports both CSS and XPath selectors, but in this guide we will focus only on CSS selectors. More details on XPath: [How to Use XPath in ZeroWork (advanced)](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-use-xpath-in-zerowork-advanced) . [Basic Concepts of Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors) [One Element Can Have Many Selector Expressionschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions) [Check if Selector Is Correct and Uniquechevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/check-if-selector-is-correct-and-unique) [Exact or Loose Matchchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match) [Hierarchychevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy) [Combine Filters with Standard CSS Logicchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic) [Lists: Incremental CSS Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) [Addressing Siblingschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/addressing-siblings) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors#selector-crash-course-complete-guide) Selector Crash Course: Complete Guide [PreviousCopy Selectorschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors) [NextBasic Concepts of Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # How to Use XPath in ZeroWork (advanced) | ZeroWork As mentioned previously, ZeroWork supports both CSS and XPath selectors. In this documentation, we are mostly focusing on CSS selectors only, as they are more beginner- and intermediate-friendly. We expect more advanced users to be already familiar with how to use XPath. TaskBots will automatically recognize an XPath selector, when it starts with double slash //. Example below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FOiBVuoQBy5XlpDq6NSOP%252FScreenshot%25202024-03-04%2520at%252014.20.34.png%3Falt%3Dmedia%26token%3D760a615e-786f-4f6e-b23b-92cf64d13685&width=768&dpr=3&quality=100&sign=350b4a5d&sv=2) Additionally, you can also explicitly state xpath like so: `xpath=//button`. To iterate over a list of incrementing XPath selectors, use the same syntax with loop\_index, as explained here: [How to Use Loop Index Syntax to Save Lists of Public Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#how-to-use-loop-index-syntax-to-save-lists-of-public-data) . Example below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FithU23qphRZqWZE8xN9p%252FScreenshot%25202024-03-04%2520at%252014.22.06.png%3Falt%3Dmedia%26token%3D69090080-73e6-49ac-af4f-5bbc12a087c8&width=768&dpr=3&quality=100&sign=e1b2a536&sv=2) [PreviousAddressing Siblingschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/addressing-siblings) [NextCSS Selectors Master Classchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/css-selectors-master-class) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # One Element Can Have Many Selector Expressions | ZeroWork A selector can be built in many different ways. You can include all attributes. You can include only one attribute or some of the attributes. You can include attributes but no value (in the rare cases where the attributes are so unique in themselves). You can add a hierarchy (you will learn what hierarchy is in one of the next sections [Hierarchy](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy) ). For example, the search button on Wikipedia can be expressed in many ways, and it will be addressed by any of the below: button\[class='pure-button pure-button-primary-progressive'\]\[type='submit'\] button\[type='submit'\] button\[class='pure-button pure-button-primary-progressive'\] button\[class\*='button'\]\[type='submit'\] button\[class\*='button'\] button\[class\]\[type\] Will these selectors really work and address the same button? Yes! circle-check #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions#one-element-many-ways-to-express-its-corresponding-css-selector) One element - many ways to express its corresponding CSS selector! So which should you choose? To get an answer to this question, read on 👇 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions#adhere-to-best-practices) Adhere to Best Practices * Try to create lean, short selectors. The more attributes your selectors contain, the more prone they are to fail in case something changes on the website. * Try to not use any 'cryptic' text within the value of the attributes such as random letter combinations. Instead, try to identify unique values inside the attributes' values. A unique value is often descriptive of what the element is. If there are no descriptive values and unique attributes at all, then it might be better to only use hierarchy (more about hierarchy here: [Hierarchy](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy) ) and discard all attributes and values. * The more strict your hierarchy is (using many times ">" within your selector), the more prone your selector is to fail in case some element is removed from that hierarchy. If you are not sure what hierarchy is, continue reading this guide and come back to review this page at the end. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions#examples) Examples Based on these rules, let's examine reliability of the above list of selectors. To be clear, all of the above selectors are valid and your TaskBot will run successfully with any of them. In this section, we are only evaluating how robust these selectors are **over time**. ❌ button\[class='pure-button pure-button-primary-progressive'\]\[type='submit'\] **Why not**: * Other selectors are shorter. Lean, short selectors tend to be more robust * The value _pure-button pure-button-primary-progressive_ appears more 'cryptic' and less descriptive compared to _submit_ or _button._ ❌ button\[class='pure-button pure-button-primary-progressive'\] **Why not**: * The value _pure-button pure-button-primary-progressive_ appears more 'cryptic' and less descriptive compared to _submit_ or _button._ ❌ button\[class\*='button'\] **Why not**: * This might be too generic because there can be many buttons with value _button_ in their class attribute on a page, so we should add an additional attribute or use a different attribute altogether to make this selector more unique, if possible. ❌ button\[class\]\[type\] **Why not**: * This might be too generic, too, because attributes _type_ and _class_ are very common, so we should add values to these attributes or add additional attributes. ✅ button\[class\*='button'\]\[type='submit'\] **Why yes**: * This selector uses two attributes with two concise, descriptive and well-identifiable values. ✅ button\[type='submit'\] **Why yes**: * While this selector might be a bit too generic and has some risk of not being unique, it's not common for a website to have multiple submit buttons on the same page, so this selector is a good choice, too. [PreviousBasic Concepts of Selectorschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors) [NextCheck if Selector Is Correct and Uniquechevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/check-if-selector-is-correct-and-unique) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Addressing Siblings | ZeroWork This is a more advanced concept and it's typically not needed frequently. So feel free to skip this section. As described in section [Hierarchy](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy) , elements can be defined by their hierarchy if they follow each other in a 'narrowing down' fashion. That means they can't be on the same level. If you need to address a tag which is on the same level but cannot or is not intended to be addressed in a list (list as described here [Lists: Incremental CSS Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) ), you can use tilde ~ for loose sibling (any of the following elements on that hierarchy level) and + for exact sibling (the next element on that hierarchy level). This might be confusing at a first glance, so you might want to check the video below for a more hands-on demonstration. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/addressing-siblings#video-tutorial-siblings) Video Tutorial: Siblings [PreviousLists: Incremental CSS Selectorschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) [NextHow to Use XPath in ZeroWork (advanced)chevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-use-xpath-in-zerowork-advanced) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Exact or Loose Match | ZeroWork Instead of = to define the value of the attribute, you can use \*=. The sign = means exact match and \*= means loose match. In the example of the Wikipedia's search button ([Basic Concepts of Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors) ), we created a selector that has an exact match. To remind you, this was the selector we've built: button\[class='pure-button pure-button-primary-progressive'\]\[type='submit'\] But if you use a loose match, the selector can look like this: button\[class\*='pure-button'\]\[type='submit'\] Note how exact value of _pure-button pure-button-primary-progressive_ was shortened to the loosely matching value _pure-button_. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match#video-tutorial-exact-versus-loose-match) **Video Tutorial: Exact versus Loose Match** ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match#example-exact-versus-loose-match) Example: Exact versus Loose Match [PreviousCheck if Selector Is Correct and Uniquechevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/check-if-selector-is-correct-and-unique) [NextHierarchychevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy) Last updated 1 year ago * [Video Tutorial: Exact versus Loose Match](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match#video-tutorial-exact-versus-loose-match) * [Example: Exact versus Loose Match](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match#example-exact-versus-loose-match) sun-brightdesktopmoon sun-brightdesktopmoon --- # Check if Selector Is Correct and Unique | ZeroWork Here is how you can check whether a selector is correct and unique before you run your TaskBot. Click on the _Console_ tab inside your _Inspect_ mode. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fwlo3bSijMCWgN2xKg0HQ%252FScreenshot%25202022-04-06%2520at%252021.00.44.png%3Falt%3Dmedia%26token%3D6e17732b-de81-49ca-b98f-ff63a1195d1f&width=768&dpr=3&quality=100&sign=f08a6f62&sv=2) Now enter the following command directly on the console: document.querySelectorAll("PASTE YOUR SELECTOR HERE") In the example of Wikipedia's search button, it can be, for example, this selector (but you can use any other from the list you saw in the previous chapter [One Element Can Have Many Selector Expressions](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions) ): document.querySelectorAll("button\[class\*='button'\]\[type='submit'\]") This is what it looks like in action: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Ft7aVct4DZYXqCaVO5pWR%252FScreenshot%25202022-04-06%2520at%252021.03.34.png%3Falt%3Dmedia%26token%3D7d499560-638d-4e71-bb6d-90ac3219873d&width=768&dpr=3&quality=100&sign=ec5d941c&sv=2) Once you hit _Enter_, you will see that there is an element shown: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FoLzpkUO4E27RzO0FwTEE%252FScreenshot%25202022-04-06%2520at%252021.03.34%2520copy.png%3Falt%3Dmedia%26token%3Da42c471b-2d33-48c6-bac5-2bce7a339826&width=768&dpr=3&quality=100&sign=a405b705&sv=2) Once you expand the shown element and hover over it, you will see the button highlighted on the left side that is identified by that selector. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FnWXqQOT0dSiJXnUKwH39%252FScreenshot%25202022-04-06%2520at%252021.06.34.png%3Falt%3Dmedia%26token%3D092998fb-34c9-4b14-8672-d1fc524c6f69&width=768&dpr=3&quality=100&sign=18b2a605&sv=2) If your selector is not unique enough, the result will show multiple selectors. This means you need to get back to work and build a more unique selector. **Exception**: Unless you are building a selector for a list (such as list of profiles, list of pages, etc.) - in this case keep reading this guide and be sure to pay attention in the section[Lists: Incremental CSS Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) . If the result is not showing anything, this means your selector is not working out or you have a typo inside it (for example, you used double quotes instead of single quotes). You need to try again, adjust it or build another one. When you build your own selectors, always first check them via _document.querySelectorAll_ directly on the website. This way you can avoid running your TaskBot every time you want to check validity of your custom built selector. It will save you a lot of time. circle-exclamation Note that you cannot check correctness of text= (see [Use Element's Text](https://docs.zerowork.io/using-zerowork/using-selectors/use-elements-text) ) with _document.querySelectorAll_ because this method is unique to ZeroWork. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/check-if-selector-is-correct-and-unique#video-tutorial-use-document.queryselectorall-to-check-selectors-correctness-and-uniqueness) **Video Tutorial: Use document.querySelectorAll to Check Selector's Correctness and Uniqueness** [PreviousOne Element Can Have Many Selector Expressionschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions) [NextExact or Loose Matchchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Combine Filters with Standard CSS Logic | ZeroWork You can combine ZeroWork's _text=_ method with the standard selector logic by using >> as a filter. As an imaginary example, you can define a selector like this: div > div\[role='main'\] > div div >> text="Like" circle-exclamation \>> can only be added **at the end of the selector**. ✅ This will work: div > div\[role='main'\] > div div >> text="Like" ❌ This will not work: div > div\[role='main'\] > div >> text="Like" > div ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic#video-tutorial-combine-text-with-standard-selector-logic) Video Tutorial: Combine text= with Standard Selector Logic ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic#example-save-email-addresses-from-facebook-pages-by-combining-text-with-standard-selector-logic) Example: Save Email Addresses from Facebook Pages by Combining text= with Standard Selector Logic [PreviousHierarchychevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy) [NextLists: Incremental CSS Selectorschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) Last updated 1 year ago * [Video Tutorial: Combine text= with Standard Selector Logic](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic#video-tutorial-combine-text-with-standard-selector-logic) * [Example: Save Email Addresses from Facebook Pages by Combining text= with Standard Selector Logic](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic#example-save-email-addresses-from-facebook-pages-by-combining-text-with-standard-selector-logic) sun-brightdesktopmoon sun-brightdesktopmoon --- # Basic Concepts of Selectors | ZeroWork Let's take the search button from the Wikipedia website as an example. For the record, for a website like Wikipedia it's fully sufficient to simply copy selectors, as described here: [Copy Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors) . Building custom selectors is only needed if you create TaskBots for "tricky" websites such as social media. We are just using Wikipedia as an example to explain the basic concepts and the way of building your own CSS selectors. Open your console by right-clicking on the search icon as shown below and then click on _Inspect_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FguurRfkDz1eX1njxOnyp%252FScreenshot%25202022-04-06%2520at%252020.21.14.png%3Falt%3Dmedia%26token%3Db2a8b793-9b51-4029-92a4-8e1bfbff6e66&width=768&dpr=3&quality=100&sign=47df35f&sv=2) Now let's zoom in on the highlighted element on the right: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FSo0YXDfN0rAJ47C1b03i%252FScreenshot%25202022-04-06%2520at%252020.34.27.png%3Falt%3Dmedia%26token%3Dc2950739-5b7e-4e82-82f0-b4d8c797666a&width=768&dpr=3&quality=100&sign=45c11ced&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#tag) **Tag** Every CSS selector has a tag. Examples can be _div_, _a_, _main_, _li_, etc. It's the first word that is marked purple (see picture above). For Wikipedia's search button, the tag is _**button**_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FpPVpLGp3TTqEMcEXXL9E%252FScreenshot%25202022-04-06%2520at%252020.44.40%2520copy%25202.png%3Falt%3Dmedia%26token%3D2b5f0012-4c39-49d8-906f-b3fd1d5879f9&width=768&dpr=3&quality=100&sign=7467cf68&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#attributes) **Attributes** Most CSS selectors have several attributes such as _class_, _id_, _aria-label_, etc. One selector can have one, many or no attributes. Attributes are marked brown (see picture above). For Wikipedia's search button, the attributes are _**class**_ and _**type.**_ ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FVN5NIhUV52b7q5I0MBVb%252FScreenshot%25202022-04-06%2520at%252020.44.40%2520copy.png%3Falt%3Dmedia%26token%3Dd58ebe5a-c785-4dc8-bdc2-dd28e3f37b4b&width=768&dpr=3&quality=100&sign=b38d7922&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#value) **Value** Inside the attributes there is a value. For Wikipedia's search button, the value inside of _**class**_ is _pure-button pure-button-primary-progressive_ and the value inside of _**type**_ is _submit_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FbklKad8J8RUHSgEkjw6V%252FScreenshot%25202022-04-06%2520at%252020.44.40.png%3Falt%3Dmedia%26token%3Ddd55c59a-16b5-4770-bed2-bd84a7929308&width=768&dpr=3&quality=100&sign=51c6a50c&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#building-a-selector) **Building a Selector** To build a selector, you need to adhere to this structure: tag\[attribute='value'\] Note that there is no space between tag and attribute in square brackets. Note that the value is wrapped in quotes. Or, if your element has several attributes, then the structure can be: tag\[attribute1='value'\]\[attribute2='value'\] So for Wikipedia's search button in the above example, the selector would look like this: button\[class='pure-button pure-button-primary-progressive'\]\[type='submit'\] ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#video-tutorial-basic-concepts) **Video Tutorial: Basic Concepts** [PreviousHow to Build Custom Selectorschevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors) [NextOne Element Can Have Many Selector Expressionschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/one-element-can-have-many-selector-expressions) Last updated 1 year ago * [Building a Selector](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#building-a-selector) * [Video Tutorial: Basic Concepts](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/basic-concepts-of-selectors#video-tutorial-basic-concepts) sun-brightdesktopmoon sun-brightdesktopmoon --- # Hierarchy | ZeroWork Understanding hierarchy is one of the most important steps when it comes to building custom selectors. Do not skip this section! Every web element on a website adheres to a hierarchy. See the hierarchy for the search button on the Wikipedia page: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FGKQwch3vr3QjjWz5t1gl%252FScreenshot%25202022-04-06%2520at%252020.44.40.png%3Falt%3Dmedia%26token%3D2bf158e0-a210-4f02-80d1-b60bb4a21fb0&width=768&dpr=3&quality=100&sign=88601e07&sv=2) For the search button on Wikipedia in the above example, the hierarchy would be: body > div > form > fieldset > button Note that some elements are on the same level (see picture below). This means these elements are items in a list and siblings to each other. They cannot be defined in a hierarchical way as shown in the example above (with >). They can be either defined as a list (you will learn about it later in chapter [Lists: Incremental CSS Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) ) or - which is a bit more advanced - as siblings (you will learn about it in the final chapter of this guide [Addressing Siblings](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/addressing-siblings) ). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FrkKl7HTtKD6FYn6gUl6T%252FScreenshot%25202022-04-06%2520at%252020.44.40.png%3Falt%3Dmedia%26token%3D5a5e7745-e3dd-42e5-9bc7-2b898ea19fe9&width=768&dpr=3&quality=100&sign=c13429f1&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#strict-and-loose-hierarchy) Strict and Loose Hierarchy #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#strict-hierarchy) Strict hierarchy Whenever you use >, the hierarchy is defined in a strict way - in the example above (_body > div > form > fieldset > button_), _body_ MUST be followed by _div_ and if not the selector will fail. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#loose-hierarchy) Loose hierarchy Alternatively, you can use space to define a loose hierarchy, for example: body button This means that _body_ is followed by _button_ somewhere below and it doesn't matter if there are other elements between _body_ and _button_. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#build-selectors-based-on-hierarchy) Build Selectors Based on Hierarchy In some cases, to build a selector, you may need to additionally define the hierarchy. You can simply define tags that follow each other, like this: **Strict hierarchy:** tag1 > tag2 > tag3 > tag4 > tag5 **Loose hierarchy:** tag1 tag3 tag5 (did you note how tag2 and tag4 are skipped?) **Combination of strict and loose hierarchy:** tag1 tag3 > tag4 (note how tag2 is skipped but tag4 strictly follows tag3) And for any tag inside the hierarchy you can add attributes like this: tag1\[attribute='value'\] > tag2\[attribute='value'\] tag1 > tag2\[attribute='value'\] tag1\[attribute='value'\] > tag2 For the example of the search button on Wikipedia, the list of selectors we built can be extended by these ones, and they will work just as well: **Strict hierarchy:** body > div > form > fieldset > button\[class\*='pure-button'\] **Loose hierarchy:** body form button\[class\*='pure-button'\] **Combination of strict and loose hierarchy:** body > div button\[class\*='pure-button'\] ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#video-tutorial-selector-hierarchy) Video Tutorial: Selector Hierarchy [PreviousExact or Loose Matchchevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/exact-or-loose-match) [NextCombine Filters with Standard CSS Logicchevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic) Last updated 1 year ago * [Strict and Loose Hierarchy](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#strict-and-loose-hierarchy) * [Build Selectors Based on Hierarchy](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#build-selectors-based-on-hierarchy) * [Video Tutorial: Selector Hierarchy](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/hierarchy#video-tutorial-selector-hierarchy) sun-brightdesktopmoon sun-brightdesktopmoon --- # Lists: Incremental CSS Selectors | ZeroWork This is another very crucial section that you need to understand in order to be able to build selectors. So do not skip this one! Selectors have incremental numbers in lists. For example, imagine that you want to store a complete list of hundreds of contacts from LinkedIn. In this case, the web elements (e.g., profile name, profile link, job position, etc.) inside of that list have an **incremental** selector. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#when-copying-selectors) When Copying Selectors Let's just copy the selectors of the profiles on LinkedIn’s search results. By copy, we mean this way of getting selectors: [Copy Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/copy-selectors) . In this case, the selector corresponds to the contact’s profile name (first and last name): li:nth-child(**1**) > div.abi-saved-contacts-row\_\_details > button\[type=”button”\] > div > div > span li:nth-child(**2**) > div.abi-saved-contacts-row\_\_details > button\[type=”button”\] > div > div > span As you can see, each CSS selector has a number that increments. For your convenience, we highlighted the incrementing number in red (see above). Now imagine that you want to save the entire list of these 100 contacts. To accomplish this, refer to the example in [Save Lists](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) and [How to Use Loop Index Syntax to Save Lists of Public Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#how-to-use-loop-index-syntax-to-save-lists-of-public-data) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#when-building-custom-selectors) When Building Custom Selectors Let's continue with the example where you want to save a list of profiles from LinkedIn. As you have already learned, all the selectors in such a list will be the same and have an incremental number (as described above). Now, however, you want to build your own custom selector. There are two ways of dealing with it. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#method-one-use-greater-than-greater-than-nth-number) Method one: Use _>> nth=__number_ Use an addition in the form of _**\>> nth=0**_ where 0 represents the incremental number, so it can be changed to _nth=1, nth=2_, etc., depending on which element in the list you want to address. Note that you cannot check correctness of it via _document.querySelectorAll_ because this method is unique to ZeroWork. Let's start with building the selector for name and surname on LinkedIn Sales Navigator (you can use LinkedIn free version instead -> you will just define a different selector compared to what you see below, but the steps are the same). You can see tag and attributes in the picture below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZXEuYeq8E8JnRZ4yPA8g%252FScreenshot%25202022-04-06%2520at%252021.35.31.png%3Falt%3Dmedia%26token%3D612865a6-e7fa-49f3-9923-47b117f71676&width=768&dpr=3&quality=100&sign=de49b351&sv=2) A selector that proved robust enough is: a\[data-anonymize='person-name'\] By entering it on the console and executing _document.querySelectorAll("a\[data-anonymize='person-name'\]")_, you will get 25 results which correspond to 25 profiles on the page. (You will get 10 on LinkedIn free version.) This is exactly what we are looking for - remember the selectors for the items of the list are the **same**, and this is why the result is not unique. You can now use _\>> nth=_ which would look like this: a\[data-anonymize='person-name'\] >> nth=0 0 corresponds to the first item in the list. (_\>>nth=_ is a zero based system, meaning that 0 corresponds to the first item, 1 corresponds to the second item, etc.). If you change 0 to 1, then you would be addressing the second item in this list: a\[data-anonymize='person-name'\] >> nth=1 If you want to address the whole list, you need to use {loop\_index,1}, which is specific to ZeroWork application, and you can learn more about it here: [Standard Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#how-save-a-list-not-just-one-profile) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#method-two-use-nth-child-number) Method two: Use _:nth-child(__number__)_ Another way is to add an addition to the incrementing element in the form of _**:nth-child(1)**_, where 1 represents the incremental number, so likewise it can be changed to _:nth-child(2), :nth-child(3),_ etc., depending on which element in the list you want to address. The difference from the first method is that you need to find out which tag in the hierarchy structure increments and thus represents the list. This makes this method more difficult but also more precise. Let's continue with the same example where the selector was this: a\[data-anonymize='person-name'\] Now, your next step is to analyze the elements in the hierarchy to find out which one represent an incremental list. You may need to expand and collapse different elements to get an overview. At some point, you will see the structure shown below. You can see the incremental element with _li_ as a tag, which corresponds to every card in the list. You can recognize it as list because all these _li_\-tags are listed on the same level and when you hover over them, the elements in your list are highlighted. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F7tVNTlvaCCYwii8kaytG%252FScreenshot%25202022-04-06%2520at%252021.34.09.png%3Falt%3Dmedia%26token%3D73257230-c1a2-4b94-ad48-82ae6b6a74b4&width=768&dpr=3&quality=100&sign=94030ab6&sv=2) Since the selector for name and surname is inside that element, you would need to place it after _li_ to reflect the hierarchy. The final selector for this list would be: li:nth-child(1) a\[data-anonymize='person-name'\] 1 corresponds to the first item in the list. Note that :nth-child() is **not** a zero based system, meaning that 1 corresponds to the first item, 2 corresponds to the second item, etc. If you change 1 to 2, then you would be addressing the second item in this list: li:nth-child(2) a\[data-anonymize='person-name'\] The way you can address the whole list is by using {loop\_index,1} again, as explained here: [Standard Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#how-save-a-list-not-just-one-profile) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#video-tutorial-define-selectors-for-lists) Video Tutorial: Define Selectors for Lists ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#example-identify-a-selector-for-a-list-of-questions-on-quora) Example: Identify a Selector for a List of Questions on Quora ### [hashtag](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#example-save-a-list-of-pages-from-facebook) Example: Save a List of Pages from Facebook [PreviousCombine Filters with Standard CSS Logicchevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic) [NextAddressing Siblingschevron-right](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/addressing-siblings) Last updated 1 year ago * [When Copying Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#when-copying-selectors) * [When Building Custom Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#when-building-custom-selectors) * [Video Tutorial: Define Selectors for Lists](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#video-tutorial-define-selectors-for-lists) * [Example: Identify a Selector for a List of Questions on Quora](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#example-identify-a-selector-for-a-list-of-questions-on-quora) * [Example: Save a List of Pages from Facebook](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors#example-save-a-list-of-pages-from-facebook) sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.69 | ZeroWork ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.69#highlights) 🌟 **Highlights** * **Major Google Sheets performance boost** Improved how data is sent to and retrieved from Google Sheets. Data processing is now significantly more reliable, faster and should eliminate most timeout errors. * **More reliable Google Sheets authentication** Overhauled the authentication flow with Google Sheets. This resolves rare but recurring false positive errors about missing or expired authentication. * **Real-time syncing for non-native tables in loops** You can now enable real-time syncing when using non-native tables (Google Sheets) inside loops. This is a major step forward for those running multiple TaskBots in parallel or using the same sheet across different applications. Enable this in "Additional options" in the Start Repeat building block. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.69#enhancements-new) 🆕 **Enhancements (new)** * Send HTTP Request now supports saving full objects and nested values directly — not just via nested paths. (Existing record path logic still works as before when targeting specific nested values.) * Remove Duplicates can now run on every loop iteration when using non-native tables (Google Sheets). Previously, it only ran once per loop. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.69#improvements) **✨ Improvements** * In Google Sheets, appended rows are now written into existing empty rows when available, instead of always inserting new ones. This prevents the sheet from growing too large and hitting limits on row insertion. * Added retry handling for taking screenshots. * Improved retry handling for syncing scheduled tasks. * Added handling for unidentified keys in the Keyboard Action building block. * Error messages for file downloads, Send HTTP Request, and Open Link have been improved for clarity. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.69#fixes) **🛠️ Fixes** * Removed a conflicting external library used for saving clipboard content — now handled internally by the desktop agent. * Importing a table via CSV or Google Sheets no longer fails due to duplicate column names — duplicates are now automatically removed. * Fixed an issue where duplicating a Check Web Element block and immediately moving it could prevent the Found and Not found branches from saving their new positions. * * * **Includes fixes for breaking changes introduced in 1.1.61:** * Resolved an issue where some data could not be saved using the Send HTTP Request building block. [PreviousVersion 1.1.68chevron-left](https://docs.zerowork.io/release-notes/version-1.1.68) [NextVersion 1.1.70chevron-right](https://docs.zerowork.io/release-notes/version-1.1.70) Last updated 8 months ago * [🌟 Highlights](https://docs.zerowork.io/release-notes/version-1.1.69#highlights) * [🆕 Enhancements (new)](https://docs.zerowork.io/release-notes/version-1.1.69#enhancements-new) * [✨ Improvements](https://docs.zerowork.io/release-notes/version-1.1.69#improvements) * [🛠️ Fixes](https://docs.zerowork.io/release-notes/version-1.1.69#fixes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.62 | ZeroWork **Includes fixes to the breaking changes introduced by 1.1.61:** * Rate limits reverted. * Character limit on selectors increased to 50,000 chars per selector. * Profile path check disabled, so that no error is generated for profile shortcuts. The validation was well-intended (entering a full profile path is more reliable) but introduced a breaking change. * Keyboard Action with multiple keys pressed in a loop errored. * The combination of enabling auto-scroll but having selectors that do not contain any loop\_index would lead to unexpected results. [PreviousVersion 1.1.61chevron-left](https://docs.zerowork.io/release-notes/version-1.1.61) [NextVersion 1.1.63chevron-right](https://docs.zerowork.io/release-notes/version-1.1.63) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Using Tables | ZeroWork [How to Add Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/how-to-add-tables) [Native Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/native-tables) [Google Sheetschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets) [Import Data from CSVchevron-right](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv) [Using Google Sheet vs. Native Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/using-google-sheet-vs.-native-tables) [Create Columnschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/create-columns) [Export Data as CSVchevron-right](https://docs.zerowork.io/using-zerowork/using-tables/export-data-as-csv) [Convert Native Table to a Google Sheetchevron-right](https://docs.zerowork.io/using-zerowork/using-tables/convert-native-table-to-a-google-sheet) [PreviousUsing Variableschevron-left](https://docs.zerowork.io/using-zerowork/using-variables) [NextHow to Add Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/how-to-add-tables) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.70 | ZeroWork ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.70#improvements) **✨ Improvements** * Added retry handling for critical internal and service-unavailable errors from Google Sheets. * Integrated the reload action (from the Keyboard Action building block) into the standard page navigation logic to improve reliability and handle page load timeouts. * Improved error messages in the **Take Screenshot** building block. * If a file URL rejects the download (with a status like 400), the error details from the request response are now included in the error report. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.70#fixes) **🛠️ Fixes** * Fixed an error that occurred when looping through a Google Sheet and requesting additional rows while the grid contained no more rows. * Fixed an issue where a `null` value returned from a nested record path in **Send HTTP Request** would raise an error — it now correctly saves `null` to the variable or column linked to the record path. * Resolved an authentication issue affecting some older Google Sheets integrations. * Fixed an issue where certain HTTP error statuses in Send HTTP Request could cause the TaskBot run to be recorded as ended with an "unknown" status in the run report. [PreviousVersion 1.1.69chevron-left](https://docs.zerowork.io/release-notes/version-1.1.69) [NextVersion 1.1.71chevron-right](https://docs.zerowork.io/release-notes/version-1.1.71) Last updated 8 months ago * [✨ Improvements](https://docs.zerowork.io/release-notes/version-1.1.70#improvements) * [🛠️ Fixes](https://docs.zerowork.io/release-notes/version-1.1.70#fixes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.64 | ZeroWork **Includes fixes for breaking changes introduced in 1.1.61:** * Closing a tab with the Close Tab building block no longer prevented new pages from being opened. * The Select Web Element building block stopped working with certain selectors. * In the Write JS building block, custom `appendIndex` values were ignored. * The Send HTTP Request block no longer automatically followed redirects (301, 302, 303). * File URLs in the Upload building block with redirects were no longer followed. * Added the option "Use human-like clicking" to the Click Web Element building block, as enabling human-like clicks globally caused issues on some websites (but not all). [PreviousVersion 1.1.63chevron-left](https://docs.zerowork.io/release-notes/version-1.1.63) [NextVersion 1.1.65chevron-right](https://docs.zerowork.io/release-notes/version-1.1.65) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.65 | ZeroWork **Includes fixes for breaking changes introduced in 1.1.61:** * The new scrolling algorithm, when used with "Continue until no element is found", caused errors if the page reloaded, such as during paginated loops. * Nested loops were sometimes incorrectly flagged as recursive in dynamic loop scenarios. This false positive is now resolved. * Improved redirect handling in the Send HTTP Request building block. * Fixed a rare issue where some error reports could not be saved. * In rare cases, ending a standard loop could trigger an error due to internal loop values not being properly reset. * Some pages were incorrectly identified as extension pages and excluded, preventing detection of the active page. * Terminating the regular browser run was no longer handled correctly. While likely not a breaking change, it occasionally left unnecessary browser connections open. * When using Write JavaScript to append data outside of a loop, followed shortly by starting a loop, the newly appended rows were ignored. **Includes other fixes:** * When running multiple TaskBots in non-incognito mode at the same time, a race condition could occur between sessions. This concurrency handling has been improved. [PreviousVersion 1.1.64chevron-left](https://docs.zerowork.io/release-notes/version-1.1.64) [NextVersion 1.1.66chevron-right](https://docs.zerowork.io/release-notes/version-1.1.66) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.67 | ZeroWork **Restores support for "Run in my regular browser" mode, which was broken by recent Chrome updates.** **Includes other fixes and improvements:** * Several error messages have been clarified or improved. * The default timeout for full-page screenshots has been increased. [PreviousVersion 1.1.66chevron-left](https://docs.zerowork.io/release-notes/version-1.1.66) [NextVersion 1.1.68chevron-right](https://docs.zerowork.io/release-notes/version-1.1.68) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.71 | ZeroWork ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.71#improvements) **✨ Improvements** * When copying specific building blocks using "Copy to another TaskBot", references to variables and sheet-connected tables (with matching table names) are now preserved instead of being removed. * Made behavior for `null` values in the **Send HTTP Request** building block consistent across both nested and non-nested paths. If a value is `null`, an empty string will now be saved. * Improved handling of Google Sheets service-unavailable errors. * Added more cases for automatic retry handling in the **Open Link** block. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.71#fixes) **🛠️ Fixes** * **Most important**: Fixed an issue where the agent would log out unexpectedly in cases where it should remain logged in. * Fixed the issue where, when two ZeroWork accounts were open in two different browsers at the same time on the same device, running TaskBot actions would appear in the running log dialogs of both accounts (although they were never persisted). * Fixed an error that occurred when deleting specific rows in native tables. * Fixed a bug where the newly integrated retry handling on the reload action (from the Keyboard Action block) was ignored in certain navigation scenarios. [PreviousVersion 1.1.70chevron-left](https://docs.zerowork.io/release-notes/version-1.1.70) [NextVersion 1.1.72 (upcoming)chevron-right](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming) Last updated 8 months ago * [✨ Improvements](https://docs.zerowork.io/release-notes/version-1.1.71#improvements) * [🛠️ Fixes](https://docs.zerowork.io/release-notes/version-1.1.71#fixes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Common Problems | ZeroWork [My TaskBot Does Not Start Runchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run) [When I Use Data from Table, No Data is Being Pulledchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled) [Website is Glitching and Flashingchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/website-is-glitching-and-flashing) [No Selector is Foundchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/no-selector-is-found) [My TaskBot Saves Some Data but Not Allchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-saves-some-data-but-not-all) [Data Is Saved in Wrong Formatchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/data-is-saved-in-wrong-format) [Website Requires SMS or Email Verificationchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/website-requires-sms-or-email-verification) [Keyboard Action Is Not Working As Expectedchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/keyboard-action-is-not-working-as-expected) [Check Web Element Identifies Selector as Found but Next Action Does Notchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/check-web-element-identifies-selector-as-found-but-next-action-does-not) [When Using Insert Data Block, First Letters Are Cut Offchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/when-using-insert-data-block-first-letters-are-cut-off) [Workflow Has More than One Starting Building Blockchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/workflow-has-more-than-one-starting-building-block) [TaskBot Does Not Automatically Scrollchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/taskbot-does-not-automatically-scroll) [PreviousUsing Run Reportschevron-left](https://docs.zerowork.io/using-zerowork/using-run-reports) [NextMy TaskBot Does Not Start Runchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run) Last updated 26 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Google Sheets | ZeroWork You can add a Google Sheet for your TaskBot to pull data from, update it or append new data to it. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#after-i-added-a-google-sheet-to-a-taskbot-can-i-create-new-columns) After I added a Google Sheet to a TaskBot, can I create new columns? Yes. Simply add new columns directly in your Google Sheet, and then click on _Refetch columns from Google Sheet_ on your TaskBot page, as shown here: [Adding New Columns to a Google Sheet](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#adding-new-columns-to-a-google-sheet) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#what-happens-to-the-column-references-in-building-blocks-if-i-edit-or-delete-some-of-the-column-name) What happens to the column references in building blocks if I edit or delete some of the column names in my Google Sheet? If you change column names or delete some of the columns in your Google Sheet, those table references that refer to them in your building blocks will no longer be valid. If you click on _Refetch columns from Google Sheet_, the columns that are no longer present in your Google Sheet will be removed automatically from all the building block references. If you rename or delete columns that are not referenced in any of your building blocks, then nothing happens and no action is needed. Column matching is not case-sensitive. This means that if you change the case of your column names in your Google Sheet (for example, from "column one" to "Column One"), this will have no impact on your references. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#how-does-zerowork-handle-sheet-usage-limits) How does ZeroWork handle Sheet usage limits? To avoid hitting Google Sheets usage limits, your TaskBot processes rows in batches — by default, it saves updates every 50 rows. For example, if your sheet has 500 rows and your TaskBot loops through each one, it will update the sheet 10 times during the run (once after every 50 rows). This significantly reduces the chance of triggering quota errors. You can adjust this batch size in the Additional options of the Start Repeat building block — for example, set it to 1 if you want the TaskBot to save data after every row. If a usage limit is exceeded during a TaskBot run, the TaskBot will retry several times automatically. If Google Sheets continues to return a rate limit error after multiple attempts, the TaskBot will stop and you’ll see an error message in your Run Reports (see [Using Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports) ). Usage limits are most likely to occur when you run multiple TaskBots in parallel that all use Google Sheets. Official Google Sheets documentation page on usage limits: [herearrow-up-right](https://developers.google.com/sheets/api/limits) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#what-if-i-accidentally-delete-a-google-sheet-that-one-of-my-taskbots-is-using) What if I (accidentally) delete a Google Sheet that one of my TaskBots is using? Your TaskBot will check if the Google Sheet link is valid at the start of its run. If it's not valid or your authentication session has expired, it will not proceed with the run and you will see an error message in your _Run Report_s. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#im-using-a-native-table.-what-happens-if-i-convert-it-to-a-google-sheet) I'm using a native table. What happens if I convert it to a Google Sheet? See [Convert Native Table to a Google Sheet](https://docs.zerowork.io/using-zerowork/using-tables/convert-native-table-to-a-google-sheet) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#when-taskbot-is-duplicated-table-is-also-duplicated.-how-does-it-impact-the-sheets) When TaskBot is duplicated, table is also duplicated. How does it impact the sheets? Let's go over an example. * You have TaskBot A with table id 123 pointing to Google Sheet A. * Then you duplicate your TaskBot A. Now TaskBot B is created with a **different** table id 456 **still pointing** to Google Sheet A. The Google Sheet is not re-created in your Google Drive. Both tables **point** to the same Sheet. Now you might want to do either of the two: * Keep the new TaskBot B’s table as it is. It will update/use data in the **same** sheet as TaskBot A. * Link TaskBot B to a different sheet. You can simply click on "Edit Google Sheet link" and add a new Google Sheet in your TaskBot B **without having to re-map any of the table references** in your building blocks. That's because the reference used is only the table id, the column names do not need to be re-mapped (unless the column names in your other Sheet are different and do not match to the column name references in the building blocks). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#something-went-wrong-with-my-authentication-to-google-sheets.-how-can-i-re-authenticate) Something went wrong with my authentication to Google Sheets. How can I re-authenticate? If you need to re-authenticate to your Google Sheets, you need to first remove its connection from your Google Account. Go to your Google account settings, click on _Data & Privacy_, scroll down to _Data from apps and services you use_, select _Third-party apps and services_ and find ZeroWork in that list. Once you click on ZeroWork, scroll down to the option called _Delete all connections you have with ZeroWork._ Now you can re-authenticate your connection to Google Sheets. [PreviousNative Tableschevron-left](https://docs.zerowork.io/using-zerowork/using-tables/native-tables) [NextImport Data from CSVchevron-right](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # How to Add Tables | ZeroWork There are three ways to create a table: * By creating a ZeroWork native table - more info here: [Native Tables](https://docs.zerowork.io/using-zerowork/using-tables/native-tables) . * By adding a Google Sheet link - more info here: [Google Sheets](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets) . * By uploading a CSV file - data and columns will be imported. Simply upload a CSV file and table columns and rows will be created based on it. More info here: [Import Data from CSV](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv) . The table that will be created from your CSV file is ZeroWork native table, more info on native tables here: [Native Tables](https://docs.zerowork.io/using-zerowork/using-tables/native-tables) . Can't decide if you should use a native table or a Google Sheet? Here is a comparison: [Using Google Sheet vs. Native Tables](https://docs.zerowork.io/using-zerowork/using-tables/using-google-sheet-vs.-native-tables) . [PreviousUsing Tableschevron-left](https://docs.zerowork.io/using-zerowork/using-tables) [NextNative Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/native-tables) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.63 | ZeroWork **Includes fixes for breaking changes introduced in 1.1.61:** * Long texts in the **Insert Text or Data** block could cause timeouts. This is now fixed. * Dates were recorded in the wrong timezone. This is now fixed. **Minor improvements:** * Improved logging for condition blocks. * Improved path-following logic when **Start Condition** or **Check Web Element** is deactivated. These building blocks can have multiple paths, and previously, the chosen path was sometimes suboptimal or unexpected — especially after recent run flow optimizations. This could lead to unintended behavior, which is now fixed. [PreviousVersion 1.1.62chevron-left](https://docs.zerowork.io/release-notes/version-1.1.62) [NextVersion 1.1.64chevron-right](https://docs.zerowork.io/release-notes/version-1.1.64) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.66 | ZeroWork **Includes fixes for breaking changes introduced in 1.1.61:** * The **Start Repeat** building block now includes a new option: **Count elements matching selector**. This was deprecated in 1.1.61, but some TaskBots heavily relied on it, and the **Continue until no element is found** option wasn't a suitable replacement in some cases. It's now restored as an additional option. * Launching in **regular browser mode** has been improved, and a retry mechanism was added for more reliable startup. **Includes other fixes and improvements:** * Several error messages have been clarified or improved. * The character limit for selectors shown in logs has been increased. * Fields such as **Label** in the **Log** building block and **Start from** in **Start Repeat** did not update table or variable references when a column was renamed or removed. This is now fixed. [PreviousVersion 1.1.65chevron-left](https://docs.zerowork.io/release-notes/version-1.1.65) [NextVersion 1.1.67chevron-right](https://docs.zerowork.io/release-notes/version-1.1.67) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.68 | ZeroWork ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.68#enhancements-new) 🆕 **Enhancements (new)** * Agent version is now included in error reports (both in the UI and notifications). * Added a new option in the File Options for the Take Screenshot and Save File building blocks to customize the maximum time that the TaskBot should wait for the file to fully download. The default is 5 minutes for _S_ave File and 2 minutes for Take Screenshot. If the file isn't downloaded within that time, an error will be raised. * You can now set midnight as the end time in the scheduler's time range option. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.68#improvements) **✨ Improvements** * Added automatic retry on 502 errors and aborted response streams. * The Open Link building block now automatically retries on certain network errors (e.g., tunnel connection failures with flaky proxies). * The scheduler in the desktop agent now has a more robust retry mechanism. For example, if syncing scheduled tasks fails due to an internet connection failure, it will retry more persistently. * When copying building blocks to another TaskBot, table references are now preserved if both TaskBots share the referenced table. (However, this does not yet apply to variables with the same name.) * The Write JS block now cleans up its context only after the delay period defined in the "min" and "max" fields has finished, giving more time for non-awaited async code to finish. * Notification settings are no longer duplicated when a TaskBot is duplicated. * Improved handling of parallel webhook triggers, covering more edge cases to prevent duplicate run triggers. * Improved handling in the Open Link building block for rare timing cases where a page crashes or closes just before reuse. The building block now reliably detects the closed state and starts a new context as needed in such cases. * Improved concurrency control when multiple TaskBots try to initiate non-incognito browser runs simultaneously. * Several error messages have been improved for clarity. ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.68#fixes) **🛠️ Fixes** * When a Check Web Element building block was deactivated and later used as a new start point via "Start run from here," the related Found and Not Found building blocks stayed deactivated. * In version 1.1.61, the Save File block introduced file-awaiting logic, but this did not apply to the option "From download action". Now fixed: Files are awaited for both options "From download action" and "From file URL". * Fixed a rare case where a run could be displayed with an unknown or non-terminated state in the TaskBot run reports if the start-run request succeeded but an unexpected error occurred after that yet before the run state was initialized. * * * **Includes fixes for breaking changes introduced in 1.1.61:** * Rarely the agent would log out despite regular TaskBot runs. [PreviousVersion 1.1.67chevron-left](https://docs.zerowork.io/release-notes/version-1.1.67) [NextVersion 1.1.69chevron-right](https://docs.zerowork.io/release-notes/version-1.1.69) Last updated 9 months ago * [🆕 Enhancements (new)](https://docs.zerowork.io/release-notes/version-1.1.68#enhancements-new) * [✨ Improvements](https://docs.zerowork.io/release-notes/version-1.1.68#improvements) * [🛠️ Fixes](https://docs.zerowork.io/release-notes/version-1.1.68#fixes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Convert Native Table to a Google Sheet | ZeroWork There is an option _Convert to a Google Sheet_ available in _More Actions_ of your native tables. **This action is not reversible**. Once your table converts to a Google Sheet, you cannot convert it back to a native table. You might wonder what happens to the existing table references in your building blocks if you convert your table to a Google Sheet. The good news is that the table references can stay unchanged since the table id does not change on converting the table to a Google Sheet. You only need to ensure that the column names are the same. Case-sensitivity does not matter: If the column is named "column one" in your native table and "COLUMN One" in your Google Sheet, this will not break any references in the building blocks. If some of the column names that building blocks refer to are not the same, simply rename the column names either in your Google Sheet or in your native table **before** converting. Otherwise those columns that are not present in your Google Sheet will be removed and all the references to them in your building blocks will be automatically removed, too. Beware that all rows in your native table will be **permanently deleted** once your table is converted to a Google Sheet. You can secure your data by using the export option ([Export Data as CSV](https://docs.zerowork.io/using-zerowork/using-tables/export-data-as-csv) ) before converting. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FJjMYdDDSQB1KtHVZK64o%252FScreenshot%25202024-06-02%2520at%252022.12.57.png%3Falt%3Dmedia%26token%3D098b5f5c-c0fd-46ad-8aa7-fed813c87727&width=768&dpr=3&quality=100&sign=9d8abbc0&sv=2) [PreviousExport Data as CSVchevron-left](https://docs.zerowork.io/using-zerowork/using-tables/export-data-as-csv) [NextUsing Run Reportschevron-right](https://docs.zerowork.io/using-zerowork/using-run-reports) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Using Google Sheet vs. Native Tables | ZeroWork Native Tables Google Sheets Reliability ✅ Data handling is more seamlessly streamlined with TaskBot runs. ❌ Google Sheet server overload issues are outside of ZeroWork control. Editing column names ✅ All building block references to the edited column in all TaskBots are **re-mapped automatically**. ❌ All building block references in all TaskBots need to be **re-mapped manually**. Data sharing ❌ Cannot be shared with users outside of ZeroWork (but can be exported as CSV). ✅ Share data with anyone. Data display ❌ Simple paginated view of 50 rows per page. ✅ Large variety of filtering, sorting and data visualization options. Number of maximum cells per table/sheet 1,500,000 10,000,000 Maximum characters per cell 50,000 50,000 [PreviousImport Data from CSVchevron-left](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv) [NextCreate Columnschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/create-columns) Last updated 3 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Using Variables | ZeroWork Variables are for saving or updating data that you temporarily need during your TaskBot run. Since _Variables_ don't adhere to any appending or looping logic, it's a powerful, robust and flexible way to save or update any data that you **temporarily** need in order to advance in your workflow without having to worry about loop set-up. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-variables#when-to-use-tables-and-when-to-use-variables) When to Use Tables and When to Use Variables #### [hashtag](https://docs.zerowork.io/using-zerowork/using-variables#example-use-variable-to-limit-number-of-dms-sent-per-run) Example: Use variable to limit number of DMs sent per run To understand the differences between tables and variables, let's go over an example. Imagine you want to send an automated DM to a list of profiles. However, you want to limit the number of profiles that you reach out to per day or per run. Let's say, you want your TaskBot to never send more than 30 DMs per run. **Step 1: Initial table set-up** Let's assume your list of profiles is stored in the table called "Profile links", as shown below. (See [How to Add Tables](https://docs.zerowork.io/using-zerowork/using-tables/how-to-add-tables) ). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuyjVxZJCZVZ2A0IKCL6r%252FScreenshot%25202023-11-21%2520at%252010.42.06.png%3Falt%3Dmedia%26token%3De454db40-65f9-4255-898f-2c80b850fdc6&width=768&dpr=3&quality=100&sign=48600843&sv=2) **Step 2: Initial TaskBot set-up** To start sending DMs, you would build a TaskBot that first opens the website where DMs can be sent, then loops through the rows in your table, inserts text into DM input and clicks on "Send" button. The TaskBot set-up would look like this: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fw3qLOm6BkONs7sDZ1gY5%252FScreenshot%25202023-11-21%2520at%252010.46.18.png%3Falt%3Dmedia%26token%3D16a4e3dd-4acd-4272-963c-3365e6b1055d&width=768&dpr=3&quality=100&sign=cd6c8aa&sv=2) Here is the set-up of the _Start Repeat_ building block (see [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) ). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FrqbSCz2mv4mhLeuABjYT%252FScreenshot%25202023-11-21%2520at%252010.50.31.png%3Falt%3Dmedia%26token%3D8dfa0a80-b0a0-4471-bbf7-132befa9733b&width=768&dpr=3&quality=100&sign=a84e92dc&sv=2) **Step 3: Creating a variable** Now, let's add the limit. To ensure that TaskBot doesn't send more than 30 DMs, we need a counter which should increment by 1 each time TaskBot sends a DM. This is a great example where you need a variable. A table would not be an appropriate choice for this use case because we don't need 30 rows with a counter number (as in 1, 2, 3, 4, 5, etc.), instead we need a **single** value that **dynamically** increments during the TaskBot run. First, we need to create a variable, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fd4tAyhjtS2xB6qllivQw%252FScreenshot%25202023-11-21%2520at%252010.55.47.png%3Falt%3Dmedia%26token%3D1c52c8d1-a921-4a67-9ad4-60c2750906e2&width=768&dpr=3&quality=100&sign=15ebd8b5&sv=2) Let's call the new variable "DM counter". You can leave the variable value empty or you can enter "0" (as the count should start with 0). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FO1LmadMCIp64LLwLOtWy%252FScreenshot%25202023-11-21%2520at%252010.57.11.png%3Falt%3Dmedia%26token%3D7b6ed383-f3ff-4c1b-83a8-8deff2531f00&width=768&dpr=3&quality=100&sign=c62ff808&sv=2) **Step 4: Updating the counter during TaskBot run** Let's now add the logic to update the variable during the TaskBot run. To update "DM counter", use the building block [Number Operations](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations) . ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F9uMh2n1jzIBE6ouHcYCv%252FScreenshot%25202025-01-02%2520at%252007.38.57.png%3Falt%3Dmedia%26token%3D3f640a31-a3e5-4574-b150-0955de302b48&width=768&dpr=3&quality=100&sign=ed90736d&sv=2) This is the set-up of the _Number Operations_ building block that adds 1 in every loop iteration (and every loop iteration sends a DM): ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fa0YFV0Noi4xeYJRqJngr%252FScreenshot%25202025-01-02%2520at%252007.40.56.png%3Falt%3Dmedia%26token%3Daafdab27-44a8-4f4e-8083-b5990fc2ad3c&width=768&dpr=3&quality=100&sign=671a8829&sv=2) **Step 5: Setting up a condition to check the counter** The last piece that is missing is a condition that checks if the counter is less than 30. This is how to add that: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FoUpaE3rgRZJWTsqWhH0B%252FScreenshot%25202025-01-02%2520at%252007.45.05.png%3Falt%3Dmedia%26token%3Dd9b20864-f541-4985-8609-777264e547a4&width=768&dpr=3&quality=100&sign=36959c09&sv=2) Conditions are set using _Start Condition_ and _Set Condition_ building blocks (see [Start Condition and Set Condition](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition) ). Here is the set-up of the _Set Condition_: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FGMumtiyjjOijYHRjiok5%252FScreenshot%25202023-11-21%2520at%252011.07.22.png%3Falt%3Dmedia%26token%3D4ba9c3b7-46e2-48ec-bbff-10dea53d1abf&width=768&dpr=3&quality=100&sign=aa47276c&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-variables#video-tutorial) Video Tutorial [PreviousDelay Times between the Building Blockschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks) [NextUsing Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables) Last updated 1 year ago * [When to Use Tables and When to Use Variables](https://docs.zerowork.io/using-zerowork/using-variables#when-to-use-tables-and-when-to-use-variables) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-variables#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Keyboard Action Is Not Working As Expected | ZeroWork If you use keyboard commands and they are not producing the effect you need, here are some common problems and how to solve them: * Increase delays, as keyboard commands may take longer to take effect. 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) . Ensure to increase the delay in the **preceding** building block, so that there is enough time for the website to load after the previous action. * If you have multiple keys in the Keyboard Action building block and you need them to be hit sequentially (as opposed to a shortcut), separate each key into a separate building block and add some delay between the building blocks. For example, if you need your TaskBot to hit _Tab_ twice, it is better to have two separate building blocks. ❌ **Might work but not recommended:** Hitting _Tab_ twice in one 'go' might be interpreted as a shortcut. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FYaB9cviPrfRHUBWwynb3%252FScreenshot%25202024-04-01%2520at%252012.53.35.png%3Falt%3Dmedia%26token%3D058267d9-e3b6-4e32-b872-b41fe59348d5&width=768&dpr=3&quality=100&sign=6b922065&sv=2) ✅ **Better:** Two separate _Keyboard Action_ building blocks, each hitting _Tab_ once. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F5daFCrMJ0igKKrWlYiB0%252FScreenshot%25202024-04-01%2520at%252012.56.45.png%3Falt%3Dmedia%26token%3D1ca0bf7b-cf4e-4742-a0cf-e1f8f09b0644&width=768&dpr=3&quality=100&sign=88dad6d2&sv=2) * For shortcuts, order matters! For example, to select a piece of text with _Shift_ + _A_, you need to adhere to the order of the keys. ❌ **Won't work - wrong order** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FoSZkP6ASdiW9f8agejdH%252FScreenshot%25202024-04-01%2520at%252013.00.08.png%3Falt%3Dmedia%26token%3D05e35dcc-6190-4d28-8856-8ed92529bf2f&width=768&dpr=3&quality=100&sign=c1ba5bda&sv=2) **✅ Works - order is correct** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FwAhQwQp6rUSMR4aQkr4O%252FScreenshot%25202024-04-01%2520at%252013.00.51.png%3Falt%3Dmedia%26token%3D1eeb3dc6-6865-4df7-a5aa-d5c1bb2f9002&width=768&dpr=3&quality=100&sign=b92a0261&sv=2) * Using native browser commands. ZeroWork can operate within the website context, but not within the native browser commands. So, say, if you want to hit CTRL/CMD+P (to print something), CTRL/CMD+F (to search for something), CTRL/CMD+S (to save website as html) or use a browser shortcut command to maximize a window, that won't work. * Use [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) with a selector instead of keyboard commands. Selectors are generally more reliable than keyboard commands. [PreviousWebsite Requires SMS or Email Verificationchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/website-requires-sms-or-email-verification) [NextCheck Web Element Identifies Selector as Found but Next Action Does Notchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/check-web-element-identifies-selector-as-found-but-next-action-does-not) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Data Is Saved in Wrong Format | ZeroWork Use [Format Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data) to manipulate the format of your data before or after saving it. See example set-up here:[Example: Standardize different formats](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations/example-standardize-different-formats#example-standardize-different-formats) . [PreviousMy TaskBot Saves Some Data but Not Allchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-saves-some-data-but-not-all) [NextWebsite Requires SMS or Email Verificationchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/website-requires-sms-or-email-verification) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Website is Glitching and Flashing | ZeroWork This happens when the TaskBot cannot find a selector. This means your selector is most likely not valid. Here are some steps to address it: [No Selector is Found](https://docs.zerowork.io/using-zerowork/common-problems/no-selector-is-found) . [PreviousWhen I Use Data from Table, No Data is Being Pulledchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled) [NextNo Selector is Foundchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/no-selector-is-found) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Native Tables | ZeroWork ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#create-a-new-native-table) Create a New Native Table Below is an example of how to create a native table. You will be able to edit columns or create new columns after table creation, too. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FJUIkUAkzDH8B8F9tNvWB%252FScreenshot%25202024-10-12%2520at%252011.21.00.png%3Falt%3Dmedia%26token%3Db16a602e-4d1f-47d3-bf2c-7e24b257e93f&width=768&dpr=3&quality=100&sign=d86b0e40&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#what-happens-if-i-edit-column-names-in-native-tables-that-are-referenced-in-the-building-blocks) What happens if I edit column names in native tables that are referenced in the building blocks? All building block references to the column name that you changed will be **automatically** changed, so you do not need to do any re-mapping. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#what-happens-if-i-delete-columns-in-native-tables-that-are-referenced-in-the-building-blocks-what-if) What happens if I delete columns in native tables that are referenced in the building blocks? What if I remove the native table from the TaskBot or delete it completely? All building block references will be automatically removed from your building blocks. **Note**: Write JavaScript building block will retain its setRef() and getRef() methods, but the deleted column name in the arguments will be automatically changed to "INVALID". #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#what-happens-if-i-convert-a-native-table-to-a-google-sheet) What happens if I convert a native table to a Google Sheet? See [Convert Native Table to a Google Sheet](https://docs.zerowork.io/using-zerowork/using-tables/convert-native-table-to-a-google-sheet) . [PreviousHow to Add Tableschevron-left](https://docs.zerowork.io/using-zerowork/using-tables/how-to-add-tables) [NextGoogle Sheetschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets) Last updated 1 year ago * [Create a New Native Table](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#create-a-new-native-table) * [FAQ](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Export Data as CSV | ZeroWork By clicking on _More Actions_ on your TaskBot page, you can select the option to export your data as a CSV file. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FPvaxkR9TzH5YE88AhSCp%252FScreenshot%25202024-06-01%2520at%252021.53.41.png%3Falt%3Dmedia%26token%3Df667bb31-b100-4f78-84b2-a0f3bfcc71e8&width=768&dpr=3&quality=100&sign=fd828e17&sv=2) This option is also accessible from your table view. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FoIcVR6olQkbikBnlajdz%252FScreenshot%25202024-04-01%2520at%252013.16.27.png%3Falt%3Dmedia%26token%3D65b93f1e-c7b6-415e-9c79-a2c39e2bcb04&width=768&dpr=3&quality=100&sign=81e417ad&sv=2) And you can also access it from the tables list page [https://creator.zerowork.io/datagroupsarrow-up-right](https://creator.zerowork.io/datagroups) . ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F5NmIKTxdJjwfs1r3Oy5e%252FScreenshot%25202024-06-01%2520at%252021.55.52.png%3Falt%3Dmedia%26token%3D832d2e85-bb6a-4c2a-b28e-7bb29c1e8c3e&width=768&dpr=3&quality=100&sign=e1534f8f&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/export-data-as-csv#how-to-export-data-as-a-csv-file-from-a-google-sheet) How to Export Data as a CSV File from a Google Sheet? Google Sheet allows you to export data as a CSV file, too. Simply click on _File -> Download -> Comma Separated Values (.csv)_ inside your Google Sheet, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F4xXp08f3bLftxait9dEf%252FScreenshot%25202024-06-01%2520at%252021.57.39%2520%283%29.png%3Falt%3Dmedia%26token%3D4d0530bf-55d1-4c24-a145-d2bd805e76c8&width=768&dpr=3&quality=100&sign=5df9f30c&sv=2) [PreviousCreate Columnschevron-left](https://docs.zerowork.io/using-zerowork/using-tables/create-columns) [NextConvert Native Table to a Google Sheetchevron-right](https://docs.zerowork.io/using-zerowork/using-tables/convert-native-table-to-a-google-sheet) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # When Using Insert Data Block, First Letters Are Cut Off | ZeroWork Consider the following example: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FGNSpHLH5XAVjEuEhTsgK%252FScreenshot%25202024-04-05%2520at%252015.20.42.png%3Falt%3Dmedia%26token%3Dc9e16164-d17c-43fe-8be8-77be1f34691e&width=768&dpr=3&quality=100&sign=93a4a17d&sv=2) The text was supposed to be "Hello Kevin, ...". However, the first two letters were cut off. The reason this is happening is because you didn't add sufficient delay to the preceding building block _**before**_ inserting. Your delay is so short that TaskBot starts typing before the input field is fully loaded. Simply add more delay in the **preceding** building block like shown here: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FlKE7StP0EjupwMPaGb29%252FScreenshot%25202024-04-05%2520at%252015.27.52.png%3Falt%3Dmedia%26token%3Da1f6a8f0-772b-4cef-9118-2d37a79f6c57&width=768&dpr=3&quality=100&sign=3a70935b&sv=2) [PreviousCheck Web Element Identifies Selector as Found but Next Action Does Notchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/check-web-element-identifies-selector-as-found-but-next-action-does-not) [NextWorkflow Has More than One Starting Building Blockchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/workflow-has-more-than-one-starting-building-block) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Import Data from CSV | ZeroWork You can either create a new table from scratch that is created based on CSV data or, import CSV data to an existing native table. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#create-a-new-table-from-a-csv-file) Create a New Table from a CSV File A native table (see [Native Tables](https://docs.zerowork.io/using-zerowork/using-tables/native-tables) ) will be created based on the columns inside the CSV file. Upon creation, the data from that CSV file will be imported. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fg7EnDnzLKHQgTKqvyAPG%252FScreenshot%25202024-06-01%2520at%252021.40.39.png%3Falt%3Dmedia%26token%3D7a85cd21-671a-4808-8b9a-ca975476cd13&width=768&dpr=3&quality=100&sign=6082d257&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#update-existing-native-table-with-csv) Update Existing Native Table with CSV You can manually update your table by importing data from a CSV file. This option is accessible in _More Actions_ on your TaskBot page_._ ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F1aivSlsiSpyv1MlAnb0H%252FScreenshot%25202024-06-01%2520at%252021.42.39.png%3Falt%3Dmedia%26token%3D80af5601-293d-4677-884b-bb09914be2b0&width=768&dpr=3&quality=100&sign=f616e559&sv=2) It is also accessible on the tables list page [https://creator.zerowork.io/datagroupsarrow-up-right](https://creator.zerowork.io/datagroups) as well as inside the table itself in _More Actions._ ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FLsePLFZ3dc1jeI2fp1Iz%252FScreenshot%25202024-04-01%2520at%252013.21.08.png%3Falt%3Dmedia%26token%3D3d5b2b63-78d7-47a3-ab5a-48b703a1b3c3&width=768&dpr=3&quality=100&sign=3987842e&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#column-matching) Column matching Whenever you import data from a CSV file to an existing table, make sure that the column names in CSV match the column names in your table. If some columns are not matching, the table will still be updated but non-matching columns will be left out (ignored). Sequence of columns in CSV versus your table does not matter. Name of the file name versus table name does not matter either. Column matching is **not** case-sensitive. The data is always appended, unless you check this checkbox. 👇 #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#checkbox-overwrite-current-data) Checkbox "overwrite current data" By checking this checkbox, the current data in your table will be overwritten by the data from CSV. The existing data in your table will be **permanently** deleted. If you want to secure your data before overwriting it, you can simply [Export Data as CSV](https://docs.zerowork.io/using-zerowork/using-tables/export-data-as-csv) first. If left unchecked, per default, the data would be appended. This means that the data in your table would be "merged" with the new data from your CSV. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#how-to-import-data-from-a-csv-file-to-a-google-sheet) How to Import Data from a CSV File to a Google Sheet? Google Sheet allows you to import data from a CSV file, too. Simply click on _File -> Import_ inside your Google Sheet. If you are not sure how to do this, check this guide where you'll find some screenshots: [External Link - How to Import CSV to a Google Sheetarrow-up-right](https://spreadsheetpoint.com/how-to-import-csv-to-google-sheets/) . [PreviousGoogle Sheetschevron-left](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets) [NextUsing Google Sheet vs. Native Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-tables/using-google-sheet-vs.-native-tables) Last updated 1 year ago * [Create a New Table from a CSV File](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#create-a-new-table-from-a-csv-file) * [Update Existing Native Table with CSV](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#update-existing-native-table-with-csv) * [How to Import Data from a CSV File to a Google Sheet?](https://docs.zerowork.io/using-zerowork/using-tables/import-data-from-csv#how-to-import-data-from-a-csv-file-to-a-google-sheet) sun-brightdesktopmoon sun-brightdesktopmoon --- # Create Columns | ZeroWork ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#adding-new-columns-to-a-google-sheet) Adding New Columns to a Google Sheet First, add a new column directly in your Google Sheet. Then click on _Refresh columns from a Google Sheet_ on your TaskBot page. This can be done in a table dropdown, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FqSaakxKhp0KAB5QmTwwy%252FScreenshot%25202024-06-01%2520at%252023.17.27.png%3Falt%3Dmedia%26token%3Da0d935dd-7c19-4780-93f6-a5cd02c5faf1&width=768&dpr=3&quality=100&sign=b7b8294&sv=2) Or, it can be done within a table column reference selection, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuGC3kDNPkkurfCGzuVuD%252FScreenshot%25202024-06-01%2520at%252023.18.33.png%3Falt%3Dmedia%26token%3D75f3571d-87c9-4704-934d-b69816834738&width=768&dpr=3&quality=100&sign=9fa11a1&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#adding-new-columns-to-a-native-table) Adding New Columns to a Native Table On your table page, click on _plus icon_ to create a new column. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Ft0JrR08WHB2ic8eJYz7U%252FScreenshot%25202023-11-21%2520at%252011.29.55.png%3Falt%3Dmedia%26token%3D07b73df1-d484-48a8-ac0d-4732f8990519&width=768&dpr=3&quality=100&sign=36d9c3f9&sv=2) The new column will be created with an auto-generated name such as "New Col 1" or "New Col 2". By clicking on the column, you can rename it. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#what-happens-if-i-edit-or-delete-column-names-that-are-referenced-in-the-building-blocks) What happens if I edit or delete column names that are referenced in the building blocks? In native tables: * [What happens if I edit column names in native tables that are referenced in the building blocks?](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#what-happens-if-i-edit-column-names-in-native-tables-that-are-referenced-in-the-building-blocks) * [What happens if I delete columns in native tables that are referenced in the building blocks? What if I remove the native table from the TaskBot or delete it completely?](https://docs.zerowork.io/using-zerowork/using-tables/native-tables#what-happens-if-i-delete-columns-in-native-tables-that-are-referenced-in-the-building-blocks-what-if) In Google Sheets: * [Google Sheets](https://docs.zerowork.io/using-zerowork/using-tables/google-sheets#what-happens-to-the-column-references-in-building-blocks-if-i-edit-some-of-the-column-names-in-my-go) [PreviousUsing Google Sheet vs. Native Tableschevron-left](https://docs.zerowork.io/using-zerowork/using-tables/using-google-sheet-vs.-native-tables) [NextExport Data as CSVchevron-right](https://docs.zerowork.io/using-zerowork/using-tables/export-data-as-csv) Last updated 1 year ago * [Adding New Columns to a Google Sheet](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#adding-new-columns-to-a-google-sheet) * [Adding New Columns to a Native Table](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#adding-new-columns-to-a-native-table) * [FAQ](https://docs.zerowork.io/using-zerowork/using-tables/create-columns#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Using Run Reports | ZeroWork Run Reports display all the actions that the TaskBot took during its run. These reports are essential for troubleshooting failed runs. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-run-reports#where-to-find-run-reports) Where to Find Run Reports 1. On the TaskBots list page ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FdOtyZZP3Z4kCZgSdu45D%252FScreenshot%25202024-04-05%2520at%252015.50.40.png%3Falt%3Dmedia%26token%3Da0c7dc7f-1502-4e92-acfe-5015ad77493c&width=768&dpr=3&quality=100&sign=75489751&sv=2) 1. Inside the TaskBot builder page ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FPa1tDX6hs06D5h72zaEy%252FScreenshot%25202024-04-05%2520at%252015.51.52.png%3Falt%3Dmedia%26token%3Da83e6db8-c526-4b70-b192-473935dba4d8&width=768&dpr=3&quality=100&sign=bab5375&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-run-reports#how-run-reports-are-displayed) How Run Reports Are Displayed Reports provide detailed information about the TaskBot's run, including timestamps, statuses, and actions taken. Here's an example of how they appear: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FIy69MtpnVxIflleeZF5d%252FScreenshot%25202024-04-05%2520at%252015.54.03.png%3Falt%3Dmedia%26token%3D6a1deff4-8455-4978-af3c-f099352d6c72&width=768&dpr=3&quality=100&sign=c9d236cc&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-run-reports#tip-for-easier-troubleshooting) Tip for Easier Troubleshooting * Click **View Logs** to access the logs of the run. * Use the **Side View** feature to position the logs next to your TaskBot workflow for easy comparison. * Click **View Building Block** to zoom in on the block you're inspecting. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FGSfoGYVz2M52JLRHxCEk%252FScreenshot%25202024-05-28%2520at%252013.25.00.png%3Falt%3Dmedia%26token%3D09c9e37d-e170-4f30-82a3-a6d2fb8d5773&width=768&dpr=3&quality=100&sign=c4580832&sv=2) Here is an example: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FlLr0ETnOI8PORzwRPnul%252FScreenshot%25202024-05-28%2520at%252013.22.36.png%3Falt%3Dmedia%26token%3D2cf914c7-a4c6-4f05-9c07-4945b7f9e813&width=768&dpr=3&quality=100&sign=8f2b9bef&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-run-reports#notifications) Notifications You can set up notifications to be sent via **email**, **Slack**, or **custom** **webhook**. Your notifications will always include error reports. **Notification Types** * **Email**: Add recipient email addresses. Here's an example: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FinsAFJplpZ0iNEEMYTW4%252FScreenshot%25202024-11-15%2520at%252008.43.33.png%3Falt%3Dmedia%26token%3D93dd4dfd-9abf-4535-afba-81002a98cfbf&width=768&dpr=3&quality=100&sign=26f53e9a&sv=2) * **Slack**: Provide your Slack webhook URL. Learn how to get it [**here**arrow-up-right](https://api.slack.com/messaging/webhooks) . Here's an example: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FxOh9nxiEMeRpEFKME3Ci%252FScreenshot%25202024-11-15%2520at%252008.45.10.png%3Falt%3Dmedia%26token%3D3dba71a2-f25c-4fc2-9a8c-b52357004990&width=768&dpr=3&quality=100&sign=6cc644f7&sv=2) * **Webhook**: Add a custom webhook URL to receive POST notifications. Here’s an example of the JSON structure sent via webhook: [PreviousConvert Native Table to a Google Sheetchevron-left](https://docs.zerowork.io/using-zerowork/using-tables/convert-native-table-to-a-google-sheet) [NextCommon Problemschevron-right](https://docs.zerowork.io/using-zerowork/common-problems) Last updated 8 months ago * [Where to Find Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports#where-to-find-run-reports) * [How Run Reports Are Displayed](https://docs.zerowork.io/using-zerowork/using-run-reports#how-run-reports-are-displayed) * [Tip for Easier Troubleshooting](https://docs.zerowork.io/using-zerowork/using-run-reports#tip-for-easier-troubleshooting) * [Notifications](https://docs.zerowork.io/using-zerowork/using-run-reports#notifications) sun-brightdesktopmoon Copy { "agent_version": "1.1.69", "taskbot_id": 1, "taskbot_name": "Your TaskBot name", "taskbot_url": "https://creator.zerowork.io/workflows/1", "run_status": "success" | "fail" | "warning" | "unknown" | "manually_stopped", "run_type": "webhook" | "scheduled" | "immediate", "run_duration": "2.1 hours", "run_errors": [\ {\ "id": 1,\ "timestamp": "2024-10-06T13:01:43.755052-04:00",\ "error_message": "Some error message",\ "counter": 5,\ "screenshot": "",\ "building_block": {\ "id": "54254235",\ "name": "Your Custom Block Name",\ "type": "Update Data"\ }\ },\ {\ "id": 2,\ "timestamp": "2024-10-06T13:01:45.755052-04:00",\ "error_message": "Some other error message",\ "counter": 1,\ "screenshot": "",\ "building_block": {}\ },\ ] } sun-brightdesktopmoon --- # My TaskBot Does Not Start Run | ZeroWork ### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run#common-causes) Common Causes 1. Not having the latest version of the agent. How to check if you have the latest version: [How to Check and Update Your Agent](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent) . You can install the latest version here: [https://creator.zerowork.io/download-agentarrow-up-right](https://creator.zerowork.io/download-agent) . 2. Expecting to see a user interface. The agent has no user interface. This is normal and intended. The agent just 'sits' on your toolbar on top right on Mac or bottom right on Windows. The actual building of the TaskBots takes place at [https://creator.zerowork.io/arrow-up-right](https://creator.zerowork.io/) . 3. Not noticing that the TaskBot ran. As soon as you click on the **Run** button to launch your TaskBot, a Chrome browser window pops up where the TaskBot runs. You have to click on it if it doesn't open automatically in front of you. And then you will see all the steps of your workflow happening in front of your eyes; otherwise, the TaskBot is probably running behind your other browser windows. You might want to switch on the "Stay on page" option for your first few runs because the run might take just a second or two, potentially going unnoticed ([Stay on Page after Run](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/stay-on-page-after-run) ). 4. Not having Chrome installed on your device. While you don’t need to use Chrome for building or launching TaskBots—you can do so from any browser—Chrome must be installed because TaskBots rely on it to run. 5. If you use **creator.zerowork.io** in a browser other than Chrome, you might need to disable shields or blocking settings in your browser. For example, in Brave, you may need to disable "Shields" in the settings. This is because the TaskBot builder sends requests to a local resource—the agent in this case—when you click the **Run** button. Some browsers, like Brave, may interpret these requests as non-secure and block them. 6. If you get the error "You need to first install agent (..)", this means that your agent is either not installed (see [Install the Agent](https://docs.zerowork.io/install-the-agent) ) or is not active. The most common issue that it is not active is because you need to double click on your agent to ensure it is activated and added to your toolbar (see [Install the Agent](https://docs.zerowork.io/install-the-agent#step-3-double-click-to-open-the-agent) ). Another common reason is initiating **Run** from a browser other than Chrome, which may block the request to the agent. To resolve this, refer to point 5 above. 7. Agent actually runs, it just runs with errors (for example, because you workflow set-up might be invalid). Open your run reports and check for errors. This is how you can access run reports inside the TaskBot that you are trying to run: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FR3PpFgob9koc310VPpmW%252FScreenshot%25202024-02-18%2520at%252015.05.16.png%3Falt%3Dmedia%26token%3Dadaaa712-07cf-4478-9b55-13e9c3b56410&width=768&dpr=3&quality=100&sign=595fc037&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run#installation-related-causes) Installation-Related Causes * VPN interference. You might need to turn off your VPN when running TaskBots. * Firewall interference. You might need to turn off your firewall when running TaskBots. * Antivirus program interference. You might need to change to a different antivirus program or turn it off when running TaskBots. * Browser security settings—to resolve this, refer to point 5 above. * Enhanced security settings on your Windows device. While this is typically not needed, you might need to switch off reputation-based protection. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F7Q1S3dWvOucDB8VH51DB%252Fimage.png%3Falt%3Dmedia%26token%3D65157ae4-8d85-488a-aa07-8482c2b0d7a4&width=768&dpr=3&quality=100&sign=fa942081&sv=2) [PreviousCommon Problemschevron-left](https://docs.zerowork.io/using-zerowork/common-problems) [NextWhen I Use Data from Table, No Data is Being Pulledchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled) Last updated 1 year ago * [Common Causes](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run#common-causes) * [Installation-Related Causes](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run#installation-related-causes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Click Web Element | ZeroWork This action clicks on the web element (e.g. button). For TaskBot to know which element to target, you need to provide a selector (CSS or XPath). Learn about selectors here: [Using Selectors](https://docs.zerowork.io/using-zerowork/using-selectors) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element#video-tutorial) Video Tutorial [PreviousBrowser Alertchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/browser-alert) [NextCheck Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # My TaskBot Saves Some Data but Not All | ZeroWork If your TaskBot saves some results and does not save some others, most likely the problem is misconfiguration of the loop logic. 1. Your TaskBot saves only one result per page but it should save all results from every page? This sounds like a missing nested loop, see here: [Nested Loops - Handle Pagination](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination) . 2. If your TaskBot only saves the first 10-20 results from the list, the problem may be the endless scroll. This is when some websites load results only when the user has scrolled down. ZeroWork handles this out of the box but in some cases your TaskBot may need you to set up some additional logic by using space or arrow down with a [Keyboard Action](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) block. Contact support to report the website where scrolling is not triggered automatically ([Support](https://docs.zerowork.io/support/getting-support) ). See also [TaskBot Does Not Automatically Scroll](https://docs.zerowork.io/using-zerowork/common-problems/taskbot-does-not-automatically-scroll) . 3. Your TaskBot saves data to just one row? Perhaps you forgot to set up a loop - without a loop, TaskBot will always save data only to one row - see how to set up a loop here: [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) . [PreviousNo Selector is Foundchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/no-selector-is-found) [NextData Is Saved in Wrong Formatchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/data-is-saved-in-wrong-format) Last updated 10 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # TaskBot Does Not Automatically Scroll | ZeroWork It's possible that your website or scrollable container is so unique that out-of-the-box scrolling does not work. In this case, you need to build your own scrolling logic by, for example, incorporating Arrow Down or Space keys in [Keyboard Action](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) building block. [PreviousWorkflow Has More than One Starting Building Blockchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/workflow-has-more-than-one-starting-building-block) [NextGetting Supportchevron-right](https://docs.zerowork.io/support/getting-support) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Using Building Blocks | ZeroWork [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#id-1.-dynamic-inputs) 1\. Dynamic Inputs --------------------------------------------------------------------------------------------------------------------- All building block input fields support: * References to variables and tables — "Hello {id: 123, name: "Profile name"} * Code in inputs — "This is my secret password stored only locally: ${await zw.deviceStorage.get("password")}" _**(Code in inputs is available in version 1.1.72, not yet live.)**_ * Spintax to randomize input — "{ Hi | Hey | Howdy }! How { are you | are things going }?"  [Dynamic Inputschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs) * * * [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#id-2.-building-blocks) 2\. Building Blocks ----------------------------------------------------------------------------------------------------------------------- Below are the documentation pages for all building blocks in ZeroWork. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#browser) Browser [Open Linkchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link) [Save Page URLchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-page-url) [Switch or Close Tabchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) [Go Back or Forwardchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/go-back-or-forward) [Switch Framechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame) [Browser Alertchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/browser-alert) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#web-interaction) Web Interaction [Click Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) [Check Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) [Save Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element) [Insert Text or Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data) [Hover Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/hover-web-element) [Select Web Dropdownchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/select-web-dropdown) [Keyboard Actionchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#logic) Logic [Start Condition and Set Conditionchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition) [Start Repeatchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) [After Repeatchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat) [Break Repeatchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/break-repeat) [Try-Catchchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/try-catch) [Raise Errorchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/raise-error) [Abort Runchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/abort-run) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#data) Data [Update Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data) [Number Operationschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations) [Format Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data) [Split Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data) [Apply Regexchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex) [Remove Duplicateschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates) [Delete Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#external) External [Ask ChatGPTchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt) [Send Notificationchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification) [APIs: Send HTTP Requestchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request) [Write JavaScriptchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#files) Files [Save Filechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file) [Upload Filechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#tools) Tools [Delaychevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) [Record Datechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/record-date) [Take Screenshotchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/take-screenshot) [Save from Clipboardchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-from-clipboard) [Logchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/log) * * * [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks#id-3.-building-block-options) 3\. Building Block Options ------------------------------------------------------------------------------------------------------------------------------------- Learn about options like deactivating building blocks, skipping a loop, auto-aligning blocks, and selecting multiple blocks. [Building Block Optionschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options) [PreviousCSS Selectors Master Classchevron-left](https://docs.zerowork.io/using-zerowork/using-selectors/css-selectors-master-class) [NextDynamic Inputschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs) Last updated 4 months ago * [1\. Dynamic Inputs](https://docs.zerowork.io/using-zerowork/using-building-blocks#id-1.-dynamic-inputs) * [2\. Building Blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks#id-2.-building-blocks) * [Browser](https://docs.zerowork.io/using-zerowork/using-building-blocks#browser) * [Web Interaction](https://docs.zerowork.io/using-zerowork/using-building-blocks#web-interaction) * [Logic](https://docs.zerowork.io/using-zerowork/using-building-blocks#logic) * [Data](https://docs.zerowork.io/using-zerowork/using-building-blocks#data) * [External](https://docs.zerowork.io/using-zerowork/using-building-blocks#external) * [Files](https://docs.zerowork.io/using-zerowork/using-building-blocks#files) * [Tools](https://docs.zerowork.io/using-zerowork/using-building-blocks#tools) * [3\. Building Block Options](https://docs.zerowork.io/using-zerowork/using-building-blocks#id-3.-building-block-options) sun-brightdesktopmoon sun-brightdesktopmoon --- # When I Use Data from Table, No Data is Being Pulled | ZeroWork Whenever you use data from tables as source, you need to use the building block [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) with the loop type [Dynamic Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/dynamic-loop) to make your TaskBot loop through the rows in your table. Alternatively, add a reference to a variable, as variables can be used in any set-up with or without loops. Consider these three set-ups: ❌ **Won't work: Referencing a table column without loop** The workflow is set up to open a link and then perform a click action. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fdt43ZBEbbrXCZ3j9Q3nD%252FScreenshot%25202023-11-22%2520at%252016.01.40.png%3Falt%3Dmedia%26token%3Da3ac22cf-b42f-4a88-8034-b0a90bf46b00&width=768&dpr=3&quality=100&sign=c69fb3c4&sv=2) The link in _Open Link_ building block refers to a table reference. This won't work because a loop that iterates over the rows is missing. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FLasfgwDSy6C6eSNbhCf7%252FScreenshot%25202023-11-22%2520at%252016.06.37.png%3Falt%3Dmedia%26token%3Dd1932652-2361-4e1c-a837-5cab09ce70ff&width=768&dpr=3&quality=100&sign=d59cbee3&sv=2) ✅ **Works: TaskBot loops through the table** Workflow set-up now contains a loop. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FbiD3AiS2YInF1tHE7fy5%252FScreenshot%25202023-11-22%2520at%252016.02.52.png%3Falt%3Dmedia%26token%3D10ab93a4-7e4c-4571-be95-66795ed95f50&width=768&dpr=3&quality=100&sign=593f8efd&sv=2) The loop type is dynamic in order to iterate over table's rows. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F8QHLSzj03T1AIg1wOUxD%252FScreenshot%25202023-11-22%2520at%252016.03.08.png%3Falt%3Dmedia%26token%3Dc0a50401-2384-492c-81d6-66ab20e7ad7c&width=768&dpr=3&quality=100&sign=9bdbe507&sv=2) ✅ **Works: Referencing a variable without loop** This is the same set-up as in the 1st case. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FcmIJlF9SPzPBzUN8XnPe%252FScreenshot%25202023-11-22%2520at%252016.07.22.png%3Falt%3Dmedia%26token%3D9404d19c-6400-4d0a-b048-1d4080fcb022&width=768&dpr=3&quality=100&sign=658ee9fa&sv=2) But the reference is now taken from variables, not from the table. This is correct and will work. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FudHXKJKVfOKQMKpKOGCA%252FScreenshot%25202023-11-22%2520at%252016.05.24.png%3Falt%3Dmedia%26token%3D74b53484-9b71-4536-95c7-2ee3e45145bc&width=768&dpr=3&quality=100&sign=d81ad531&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled#but-i-just-want-to-use-the-first-row-of-the-table-i-dont-need-to-iterate-over-all-rows) But I just want to use the first row of the table, I don't need to iterate over all rows If you don't need to loop through all rows but just want to use the first row from your table (perhaps because you just want to test something), simply enter 1 to the repetition limit: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FIVtIWrAQVeROFA8FGxGP%252FScreenshot%25202023-11-22%2520at%252016.10.57.png%3Falt%3Dmedia%26token%3D4c95c1e9-94af-4b60-a361-8ea90eadad7e&width=768&dpr=3&quality=100&sign=6ac1e5a&sv=2) [PreviousMy TaskBot Does Not Start Runchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run) [NextWebsite is Glitching and Flashingchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/website-is-glitching-and-flashing) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Workflow Has More than One Starting Building Block | ZeroWork This means that either you have more than one disconnected starting building blocks or some of the building blocks are not connected properly. #### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/workflow-has-more-than-one-starting-building-block#example-non-connected-loose-building-block) Example: Non-Connected Loose Building Block ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FVjhrgTCQMUwuXUOdDpmg%252FScreenshot%25202024-06-01%2520at%252023.05.31.png%3Falt%3Dmedia%26token%3D10615ddf-d674-4693-bbde-8bc451388586&width=768&dpr=3&quality=100&sign=48698bf1&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/workflow-has-more-than-one-starting-building-block#example-building-blocks-are-connected-backwards) Example: Building Blocks Are Connected Backwards Consider the following set-up. The building blocks can only be connected top to bottom or left to right. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FkxI1OPoumlj8rZNBMW3l%252FScreenshot%25202024-06-02%2520at%252009.30.28.png%3Falt%3Dmedia%26token%3D1226aae8-84d7-461f-9724-a825dd1e8a7f&width=768&dpr=3&quality=100&sign=81db73a9&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/workflow-has-more-than-one-starting-building-block#how-to-identify-the-failing-building-blocks) How to Identify the Failing Building Blocks **Option 1** Typically, you will see an error message like this: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FwnT72nhgWzwQ5rWVjHM9%252FCapture_decran_2024-05-22_a_13.41.15.png%3Falt%3Dmedia%26token%3D0572b31d-14e8-4f02-911e-fe83396e6dc1&width=768&dpr=3&quality=100&sign=35a96d98&sv=2) Now you can simply search for these building block ids in order to find the ones that are set up incorrectly: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZwbXLRKHma0hngapTrsi%252FScreenshot%25202024-06-01%2520at%252023.11.47%2520%283%29.png%3Falt%3Dmedia%26token%3Dc74160d9-137b-451b-b377-d1f279dae580&width=768&dpr=3&quality=100&sign=77f172b5&sv=2) **Option 2** Use the auto-line feature (see [Auto-Align](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align) ) to align the workflow from left to right or top to bottom. This will place any loose or incorrectly connected building blocks into view. It's recommended to first duplicate your TaskBot as a back-up copy before you click on auto-align because this operation might transform the flow of your building blocks into a visual view you do not like. [PreviousWhen Using Insert Data Block, First Letters Are Cut Offchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/when-using-insert-data-block-first-letters-are-cut-off) [NextTaskBot Does Not Automatically Scrollchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/taskbot-does-not-automatically-scroll) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Website Requires SMS or Email Verification | ZeroWork To handle this edge case, use [Check Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) to first check if there is a verification pop-up. If there is one, then add a long delay and enter the code manually while the TaskBot is idle during the delay time. Adding the code manually will only work if your TaskBot is not running in the background ([Run in Background](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/run-settings/run-in-background) ). If it's running in the background, you have no possibility to access the window in which the TaskBot is operating - in this case, the best way to handle this is to terminate the run and send yourself a notification ([Send Notification](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification) ). [PreviousData Is Saved in Wrong Formatchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/data-is-saved-in-wrong-format) [NextKeyboard Action Is Not Working As Expectedchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/keyboard-action-is-not-working-as-expected) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # No Selector is Found | ZeroWork The selector (CSS or XPath) is not found usually because one of the following problems occurred: 1. In many cases, you may need to add delay time between building blocks (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) ). Sometimes your TaskBot needs to have the results loaded first before it can search for a selector. Try increasing the delay time before the building block with the failed selector. Note: The delay should be increased NOT on the failing block but on the building block that precedes it! 2. A common reason is that the selector that you copied may dynamically change. This means parts of the selector contain values that change dynamically every time the website is loaded. This happens especially often on social media platforms. To reliably solve this issue, build your own selectors following this guide [How to Build Custom Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors) . 3. If you use [Check Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) which _finds_ the element but the next action - such as click - does _not_ find the element, please see this page: [Check Web Element Identifies Selector as Found but Next Action Does Not](https://docs.zerowork.io/using-zerowork/common-problems/check-web-element-identifies-selector-as-found-but-next-action-does-not) . circle-info Read how to check in browser if your selector is correct: [Check if Selector Is Correct and Unique](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/check-if-selector-is-correct-and-unique) . ### [hashtag](https://docs.zerowork.io/using-zerowork/common-problems/no-selector-is-found#additional-resources) Additional Resources * Intro to selectors: [https://youtu.be/WqcougM5SsAarrow-up-right](https://youtu.be/WqcougM5SsA) * Complete video guide about selectors (selector crash course): [https://youtu.be/UXx7ZwiSk5karrow-up-right](https://youtu.be/UXx7ZwiSk5k) * Complete written guide about selectors: [Using Selectors](https://docs.zerowork.io/using-zerowork/using-selectors) CSS Master Class: [PreviousWebsite is Glitching and Flashingchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/website-is-glitching-and-flashing) [NextMy TaskBot Saves Some Data but Not Allchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-saves-some-data-but-not-all) Last updated 27 days ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Check Web Element Identifies Selector as Found but Next Action Does Not | ZeroWork If [Check Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) building blocks determines selector as found but the next action (which is [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) , [Hover Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/hover-web-element) , [Save Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element) , etc.) does not, there are mainly two things to consider. 1. Increase selector timeout in the building block that fails by clicking on _Advanced selector settings_ (see screenshot below). Note that the timeout setting is different from the delay time. Timeout includes the total selector finding and processing time. Some websites might have a ready selector but have non-standard js processing, so that, for example, the click event itself takes longer. Increase the timeout to 30-60 seconds. It doesn't affect the run speed because unlike delay times, the timeout is abandoned as soon as the selector is found. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F8EEAp1P50TzxbZ6vUSIv%252FScreenshot%25202024-11-11%2520at%252014.13.12.png%3Falt%3Dmedia%26token%3D9c1f4543-a50b-4406-87b4-819e4a930a0a&width=768&dpr=3&quality=100&sign=65b8ed&sv=2) 1. Some actions - especially click and hover - sometimes require a visible selector, so your _Check Web Element_ building block might be finding a selector, but the following building block cannot perform the action required because the element is not in view. To solve this, try these steps: * First, check the option _Must be visible on screen_ in Check Web Element building block. Run your TaskBot with that option checked. If result is **not** found, then you know that the selector is not visible, so you need to undertake steps to make the selector visible, so that the next action can be performed. * To make your selector visible, in most cases you need to scroll to it. First, test this assumption by adding a longer delay to _Check Web Element_ (note: delay and not timeout this time) to allow manual interaction. Give it, for example, 30 seconds. During those 30 seconds, scroll **manually** to the element to get it into view and thus make it visible. Then let the TaskBot continue its run and see if the action now works. If it works, then solution is simple - you just need to add some scrolling (use [Keyboard Action](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) building block for that) to ensure you get your web element into visible view before clicking/hovering/saving it. [PreviousKeyboard Action Is Not Working As Expectedchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/keyboard-action-is-not-working-as-expected) [NextWhen Using Insert Data Block, First Letters Are Cut Offchevron-right](https://docs.zerowork.io/using-zerowork/common-problems/when-using-insert-data-block-first-letters-are-cut-off) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Getting Support | ZeroWork ### [hashtag](https://docs.zerowork.io/support/getting-support#start-here-common-fixes-and-essentials) 🧰 Start Here: Common Fixes & Essentials #### [hashtag](https://docs.zerowork.io/support/getting-support#check-your-agent-version) ✅ Check your agent version Many issues are resolved simply by updating the agent. → [**How to Check and Update Your Agent**](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/how-to-check-and-update-your-agent) #### [hashtag](https://docs.zerowork.io/support/getting-support#watch-the-crash-courses) 🎓 Watch the crash courses * [**Beginner Crash Course**](https://docs.zerowork.io/crash-course) — Covers the basics of building and running TaskBots. * [**Selector Crash Course**arrow-up-right](https://www.youtube.com/playlist?list=PL7X7ThrPNPJCVC6Df3M_d7tqeRQWPmF2r) — Essential if you work with challenging anti-bot websites such as social media, Amazon, or search engines. Automating these reliably requires a basic understanding of custom selectors, so we strongly recommend watching this before asking for help. #### [hashtag](https://docs.zerowork.io/support/getting-support#explore-the-docs) 📚 Explore the docs * [Common problems](https://docs.zerowork.io/using-zerowork/common-problems) * [Using Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports) (how to troubleshoot TaskBots) * [Selectors](https://docs.zerowork.io/using-zerowork/using-selectors) * [Building blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks) * [Tables](https://docs.zerowork.io/using-zerowork/using-tables) * [Variables](https://docs.zerowork.io/using-zerowork/using-variables) * [Loops](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) #### [hashtag](https://docs.zerowork.io/support/getting-support#agent-not-launching) 🧭 Agent not launching? → [My TaskBot does not start run](https://docs.zerowork.io/using-zerowork/common-problems/my-taskbot-does-not-start-run) * * * ### [hashtag](https://docs.zerowork.io/support/getting-support#report-a-technical-error-broken-feature-or-unexpected-error) 🛠️ Report a Technical Error (Broken Feature or Unexpected Error) If you've found a bug — like a broken feature or unexpected error — submit it via: * Our [**Discord group**arrow-up-right](https://discord.com/invite/JkkCNmVBeg) : #report-a-bug channel * Or use the form: [**Bug Report Form**arrow-up-right](https://share-eu1.hsforms.com/1jz7b5QsgQLWXxvtMuVYedAfex5d) > ❗️Bug reports must include reproducible steps. * * * ### [hashtag](https://docs.zerowork.io/support/getting-support#business-plan-support) 👩🏽‍💼 Business Plan Support If you're on the Business Plan, you have access to priority email support. → [Submit a Business Plan Support Requestarrow-up-right](https://share-eu1.hsforms.com/1kdUHd0uhSC-EbgTsPIsIUgfex5d) **⏱ Response time:** Requests may take up to 2 business days to be processed. * * * ### [hashtag](https://docs.zerowork.io/support/getting-support#ask-the-community-fast--free) 🧠 Ask the Community (Fast + Free) In our community, most users get help same day — often within hours. Join our Discord and post in the #community-help forum with your question and describe what you’ve tried. You’ll also get access to: * Ready-to-use free TaskBot templates in the **#subflow-library** * Cheatsheets, tips, and selector help * Active volunteers who love solving tough automation problems > 🙌 The community is built on give and take. Got help? Pay it forward and help others! * * * ### [hashtag](https://docs.zerowork.io/support/getting-support#hire-a-zerowork-expert) 💼 Hire a ZeroWork Expert For 1-on-1 support with your automation, complex selectors, or specific use case: → [**Hire a vetted ZeroWork expert**arrow-up-right](https://www.zerowork.io/hire-an-expert) _(Note: ZeroWork takes no commission.)_ * * * ### [hashtag](https://docs.zerowork.io/support/getting-support#billing-or-account-changes) 💳 Billing or Account Changes For billing-related questions or to update the email address linked to your account, please contact: **[\[email protected\]](https://docs.zerowork.io/cdn-cgi/l/email-protection) **. [PreviousTaskBot Does Not Automatically Scrollchevron-left](https://docs.zerowork.io/using-zerowork/common-problems/taskbot-does-not-automatically-scroll) [NextVersion 1.1.61chevron-right](https://docs.zerowork.io/release-notes/version-1.1.61) Last updated 8 months ago * [🧰 Start Here: Common Fixes & Essentials](https://docs.zerowork.io/support/getting-support#start-here-common-fixes-and-essentials) * [🛠️ Report a Technical Error (Broken Feature or Unexpected Error)](https://docs.zerowork.io/support/getting-support#report-a-technical-error-broken-feature-or-unexpected-error) * [👩🏽‍💼 Business Plan Support](https://docs.zerowork.io/support/getting-support#business-plan-support) * [🧠 Ask the Community (Fast + Free)](https://docs.zerowork.io/support/getting-support#ask-the-community-fast--free) * [💼 Hire a ZeroWork Expert](https://docs.zerowork.io/support/getting-support#hire-a-zerowork-expert) * [💳 Billing or Account Changes](https://docs.zerowork.io/support/getting-support#billing-or-account-changes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.61 | ZeroWork This update marks a major leap forward in performance, reliability, and flexibility for TaskBots. It’s one of our biggest and most exciting releases yet! Here are some of the major highlights: * **Overhauled data processing and TaskBot architecture** for faster, more reliable runs, especially on large workflows. * **Take screenshots** directly from your TaskBots. * **Navigate directly to any building block** from logs, error reports, or run dialogs. * **Set a custom starting building block** with the new "Start run from here" option. * **Highly robust scrolling behavior** even on complex, virtualized lists. * **Improved anti-bot detection prevention** on actions for clicks and scrolls. * **More flexible and powerful looping**, including custom iteration tracking. * **Custom error handling** is now possible with **Try-Catch** and **Raise Error** building blocks. * **Else condition** added to condition blocks for smoother conditional flows. ...and so much more! Dive into the full notes below. 👇 * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#new-building-blocks) 🔥 New Building Blocks * **📸 Take Screenshot** Capture full pages, specific web elements, or visible areas and save them locally. The saved path can be added to variables or table columns, making it easy to upload screenshots later with the [Upload File](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file) building block, if needed. * **🔀 Try-Catch, After Try-Catch and On Catch Error** Wrap any building block or sequence of building blocks inside a Try-Catch. If an error occurs, the run will continue along a separate failure path (On Catch Error), letting you define exactly how to handle errors. * **⚠️ Raise Error** Raise your own custom errors within a TaskBot run. Perfect for generating custom error reports or triggering custom error handling flows through Try-Catch blocks. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#new-options-in-existing-building-blocks) ✨ New Options in Existing Building Blocks * **Set Condition**: New **Else** condition path added, along with "is a valid number" and "is not a valid number". * **Number Operations**: Added **Remainder %** operation. * **Save Web Element**: New option **Skip if no element is found**, allowing the run to continue without errors if elements are occasionally missing, especially useful when the Auto-scroll option is enabled in loops. * **Log**: Now supports **tag** and **type** (success, warning, fail) for more organized logging. * **Split Data**: Now supports **negative numbers** in position fields to split from the end of text. * **Ask ChatGPT**: Added support for the newly added models. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#improved-taskbot-run-behavior) ⚡ Improved TaskBot Run Behavior * **Improved Anti-Bot Detection:** Improved actions like click and scroll to bypass stricter anti-bot detections on sites like social media platforms. * **File Handling**: The Save File building block now waits for download completion before the TaskBot run is continued. There is now also auto-retry in place when a file download from a URL times out. * **More Robust Save Web Element**: There is now additional handling in place in case the web element is found but its content was not yet loaded by a website. * **Spintax Limit Increased**: From 100 to 5,000 expressions thanks to optimized handling. * **Improved Send HTTP Request Building Block**: * Added auto-retry on 429 (rate limit) and network timeouts. * When no matching columns are found between the response keys and the target table, no data is saved instead of throwing an error. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#looping-improvements) 🔁 Looping Improvements * **Custom Continuation**: The Start Repeat building block now supports a custom "Start from" input. * **Improved Continue at Latest Iteration**: More reliable tracking of the last row or iteration. * **Auto-Scroll Overhaul**: Highly robust and human-like scrolling, even in quirky or virtualized lists. Auto-scrolling is now also supported when the _Continue until no element is found_ option is enabled. * **Loop Index Flexibility**: * Use multiple `{loop_index}` inside a selector. (Prior to 1.1.61, only one was accepted per selector.) * Add loop IDs like `{loop_index_123}` when accessing loop index of a parent loop. Perfect for looping through web tables, where the parent loop goes through rows and the child loop through columns — with selectors able to access both parent and child loop indices. * The starting point in the `{loop_index}` syntax is now optional. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#performance-and-architecture) 🚀 Performance and Architecture * **New TaskBot Run Architecture**: TaskBot run flow and all building blocks have been overhauled for faster and more reliable processing. * **Data Processing Overhaul**: * TaskBots now handle reading and writing dynamically based on the amount of data, reducing the risk of timeouts when handling large amounts of data. * Future integrations (like Airtable and custom SQL storage) are now easier and faster to add. * **Faster TaskBot Building**: Adding new building blocks to the canvas is now 10x faster. Moving blocks, deleting selected blocks, and adding connections between blocks is faster, too. * **Stable Stop Logic**: Race conditions between Run and Stop that in rare cases could cause duplicated data are now fully eliminated. * **Database Upgrade**: Larger, faster database to handle growing usage. * **Export Improvements**: Faster log exports. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#better-building-and-troubleshooting-experience) 🛠️ Better Building and Troubleshooting Experience * **Start Run from Here**: Right-click any building block and run starting from there — no need to deactivate anything! * **View Building Block**: Navigate directly to the building block from logs, errors, or notifications. Works even if another TaskBot is open. * **Log Enhancements**: * Cleaner, categorized logs with titles, categories, and visually separated building block IDs. * Improved error reports with a more readable format and related documentation links. * **Note:** These improvements apply only to new logs and error reports; the existing ones remain unchanged. * **Better Commenting**: * Save TaskBot descriptions and building block comments with `CMD+S` / `CTRL+S`. * The editing experience is now organized in a smoother flow. * **Better Search in Logs**: Improved search functionality inside TaskBot run logs. * **Unique TaskBot Names**: Duplicate names no longer allowed to avoid confusion. * **Persistent Input on Validation Errors**: Inputs (like building block comments, TaskBot descriptions, TaskBot names, and variable names) are preserved if a validation error occurs. * **Improved Deactivation Handling**: Smarter path selection if conditions or paths are deactivated. * **Smoother Duplicating:** When duplicating building blocks, it is now more seamless to move and position the newly created blocks. * **Warning Tag for Unsaved Changes:** When you have unsaved changes inside a building block, a tag now appears to warn you. It’s non-intrusive — you can still close the dialog without saving if you want — but it gives a clear visual reminder in case you forgot to save. * **Better Validation Before Starting a Run:** New validations help prevent invalid setups. But also validation is now more flexible: for example, if multiple connections are deactivated (or only one is active), the run is still allowed, making it easier to test multiple paths. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#minor-ui-improvements) 🖌️ Minor UI Improvements * Proper Mac key labels (CMD/Option) in the Keyboard building block. * Cleaner text field scrollbars. * Improved drag-and-drop styling for building blocks. * Send Notification emails now include a standard footer. * TaskBot descriptions support line breaks. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#bug-fixes) 🐛 Bug Fixes * Fixed performance lag caused by text field re-renders due to a bug with autosize calculations. * Fixed an issue where the Abort building block did not properly abort when used inside nested loops. * Fixed sheet reference parsing when column names included line breaks. * Fixed all known unicode-related issues. * Fixed JSON path filtering in webhook dynamic data. * Fixed tab switching issues with the Switch or Close Tab building block. * Fixed incorrect log numbering in TaskBot run reports. * Fixed UI cache sync issues for TaskBot name and description. * Fixed a bug where webhook payload size was limited incorrectly. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#security-updates) 🔒 Security Updates * Improved email sanitization for the Send Notification building block. * Strengthened data ownership validation on all endpoints. * Added internal monitoring for suspicious requests. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#changed-behavior) ⚠️ Changed Behavior * "Create file column" moved under "More options" in native tables. * Updated variables are now sent only at the end of the run (not after each loop end). No impact on how TaskBots run. * Error report screenshots now retained only for 14 days. * Log limit reduced to 5,000 log messages per TaskBot run. * It is no longer possible to search for timestamps inside the log in the TaskBot run reports. * Per-minute rate limit added to the Send Notification building block. * Maximum of 10 email addresses allowed per TaskBot for run notifications. Existing setups with more than 10 emails will continue to work — no breaking changes. * Dynamic loops no longer apply implicit filtering. TaskBots now always iterate through all rows in a table. This does not break existing runs (conditions still apply). * "None" input is no longer available in Continue at latest iteration. TaskBots using "none" will keep working — no breaking changes. To skip the loop, simply set the repetition limit or number of repetitions to 0. * Character limit added to messages in `await log()` inside the Write JS building block. If the logged message exceeds the limit, it will still be logged but in truncated format. * Custom error handling removed from Ask ChatGPT. TaskBots that used custom handling will still work — no breaking changes — but it’s recommended to move error handling to Try-Catch building blocks. * "Stay on page after run" option now respected for scheduled and webhook runs. If toggled on, the browser will stay open after the run finishes. (Previously, the setting was ignored if it was a scheduled or webhook run.) Be aware that browsers could now remain idle if this option is unintentionally left enabled. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.61#potential-breaking-changes) 🚨 Potential Breaking Changes * Save Page URL and Save from Clipboard building blocks no longer have built-in delay options. If you relied on the old delay behavior, you may need to add a separate Delay block. * In Start Repeat, the option "Auto-detect the number of available elements" is now renamed to "Continue until no element is found," and the lead selector is no longer required. For most TaskBots, nothing will break — but if you relied on a specific lead selector (especially when selectors inside the loop are **unrelated** to it), you could end up with more or fewer loop iterations than before. * In Save Web Element, the "Stop if no element is found" option is replaced by "Skip if no element is found." Existing TaskBots will not break — the new behavior matches the previous setting automatically — but if you were relying on it to force early termination, you may need to adjust your logic. Otherwise, it could now result in an infinite loop if no elements are found. * Auto-scroll is now triggered by default in all loop setups (except dynamic loops that iterate over tables). Scrolling behavior has been significantly improved, but if you previously implemented custom scrolling (for example, with a Write Javascript building block), you should double-check your setup. You can disable Auto-scroll in the Start Repeat building block if needed. * In Set Condition, "Longer than" and "Shorter than" now only accept number of characters as input. Previously, it was possible to compare the character count of two texts. * Input validation during TaskBot runs is now stricter. Previously, invalid inputs could potentially pass silently. If needed, you can add Try-Catch blocks to handle these cases gracefully. [PreviousGetting Supportchevron-left](https://docs.zerowork.io/support/getting-support) [NextVersion 1.1.62chevron-right](https://docs.zerowork.io/release-notes/version-1.1.62) Last updated 9 months ago * [🔥 New Building Blocks](https://docs.zerowork.io/release-notes/version-1.1.61#new-building-blocks) * [✨ New Options in Existing Building Blocks](https://docs.zerowork.io/release-notes/version-1.1.61#new-options-in-existing-building-blocks) * [⚡ Improved TaskBot Run Behavior](https://docs.zerowork.io/release-notes/version-1.1.61#improved-taskbot-run-behavior) * [🔁 Looping Improvements](https://docs.zerowork.io/release-notes/version-1.1.61#looping-improvements) * [🚀 Performance and Architecture](https://docs.zerowork.io/release-notes/version-1.1.61#performance-and-architecture) * [🛠️ Better Building and Troubleshooting Experience](https://docs.zerowork.io/release-notes/version-1.1.61#better-building-and-troubleshooting-experience) * [🖌️ Minor UI Improvements](https://docs.zerowork.io/release-notes/version-1.1.61#minor-ui-improvements) * [🐛 Bug Fixes](https://docs.zerowork.io/release-notes/version-1.1.61#bug-fixes) * [🔒 Security Updates](https://docs.zerowork.io/release-notes/version-1.1.61#security-updates) * [⚠️ Changed Behavior](https://docs.zerowork.io/release-notes/version-1.1.61#changed-behavior) * [🚨 Potential Breaking Changes](https://docs.zerowork.io/release-notes/version-1.1.61#potential-breaking-changes) sun-brightdesktopmoon sun-brightdesktopmoon --- # Select Web Dropdown | ZeroWork This action selects an option in dropdown. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/select-web-dropdown#selector-of-dropdown-element) Selector of Dropdown Element Correct dropdown selector (CSS or XPath) is critical for this option to work. Your dropdown selector must have tag `select`. For dropdowns with selector tags that are not `select` (for example, `div` or `span`) use [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) . Not all dropdowns will have `select` as their tag. Different websites implement different ways of displaying and handling dropdowns. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/select-web-dropdown#example-valid-dropdown) ✅ Example - valid dropdown Works here because this dropdown has `select` as its tag. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fze4GqiWtPOxARFdsWtuG%252FScreenshot%25202023-05-01%2520at%252015.04.21.png%3Falt%3Dmedia%26token%3De75c24c0-fbed-458b-9aed-86762fec2c3a&width=768&dpr=3&quality=100&sign=742c5dda&sv=2) For this scenario, you can set up your input this way: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F4if6vVOjS5S9hAf56H9l%252FScreenshot%25202024-07-05%2520at%252020.23.41.png%3Falt%3Dmedia%26token%3Dcbd81d22-c63f-4c64-a78e-96c798ddc941&width=768&dpr=3&quality=100&sign=fee1469f&sv=2) Alternatively, you can use variable or table reference, like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FaDaWehKnHrGUPGwORERd%252FScreenshot%25202024-07-05%2520at%252020.23.49.png%3Falt%3Dmedia%26token%3Dcc3e5d47-24e6-4f2b-948b-d686c2e9ebe3&width=768&dpr=3&quality=100&sign=dda5c650&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/select-web-dropdown#example-invalid-dropdown) ❌ Example - invalid dropdown Won't work because this dropdown does not have `select` as its tag. In this case, 'dropdown' appears visually as a dropdown, but its selector is tagged as a button, so in reality it is a button styled as a dropdown, and you should use [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) . ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F7d2K2FElB2QG5tv3Ro0b%252FScreenshot%25202023-05-01%2520at%252015.08.56.png%3Falt%3Dmedia%26token%3D53ad063b-05c8-4bdb-9810-c6b0e9d900f5&width=768&dpr=3&quality=100&sign=9313d8a6&sv=2) [PreviousHover Web Elementchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/hover-web-element) [NextKeyboard Actionchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Dynamic Inputs | ZeroWork All building block input fields accept dynamic inputs. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs#references-to-variables-and-tables) **References to Variables and Tables** **Example** * "Hello {id: 123, name: "Profile name"}, I wanted to reach out because...." [References to Variables and Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/references-to-variables-and-tables) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs#code-in-inputs) Code in Inputs _**Code in inputs**_ _**is available in version 1.1.72 (not yet live).**_ Use `${...}` for an expression and `$${...}` for a code block. Expressions insert the result of the expression. Code blocks run full code and must `return` a value to insert. **Examples** * **Using** `**${...}**` **(expression)** "This is my secret password stored locally: ${await zw.deviceStorage.get("password")}" * **Using** `**$${...}**` **(code block)** "This is my more elaborate input: $${ import axios from "axios"; // any import auto-installs locally const res = await axios.get("https://mydomain.com/my/api/url"); return res.data; }." [Code in Inputschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs#spintax) **Spintax** Helps vary content on sites with anti-spam measures that check message or email uniqueness. **Example** * "{ Hi | Hey | Howdy }! How { are you | are things going }?" [Spintaxchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/spintax) [PreviousUsing Building Blockschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks) [NextReferences to Variables and Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/references-to-variables-and-tables) Last updated 4 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Version 1.1.72 (upcoming) | ZeroWork This update is a big step forward in **anti-detection**, **multi-account** automation, and developer power with the **new Write JS** `**zw**` **API**. It also brings **code in no-code inputs**, **sticky browser profiles**, and finer control over how browsers launch. Here are some of the major highlights: * **Anti-detection Power Mode** TaskBots stay indistinguishable from human users and are not detected by Cloudflare and similar checks. * **Sticky browser profiles & multi-account management** Create multiple sticky profiles and share a single session across TaskBots per profile. No special multi-account browsers needed. * **Write JS — new** `**zw**` **APIs** Packages, state, device storage, browser control, metadata, better logging, and more. * **New building blocks** Launch Browser and Quit Browser. * **More powerful browser launch options** Preload scripts, add custom launch args, set the viewport, and launch with other Chromium-based browsers such as Brave. * **Code in no-code inputs** Combine text with `${…}` expressions or `$${…}` code. Example: “Just adding a random number ${Math.random()}”. ...and much more! Dive into the full notes below. 👇 * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#anti-detection-power-mode) 🛡️ Anti-Detection Power Mode Power Mode is a major upgrade for undetectable automation. * **Consistently undetected** by Cloudflare, anti-bot systems, and sites with strong in-house protections (including Google services like Gmail). * **Headless that doesn’t look headless.** In Power Mode, background runs remain indistinguishable from human activity. * Enable in **TaskBot run settings**, the new **Launch Browser** block, or via `**zw.browserContext.launch()**` **in Write JS**. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#sticky-browser-profiles) 👤 Sticky Browser Profiles **Goodbye special browsers.** With Power Mode plus sticky profiles, you can automate accounts without GoLogin, Multilogin, or Incognition. Sticky browser profiles make multi-account automation safer and simpler. * **One account, one session — across TaskBots.** Reuse the same sticky profile (cookies, storage, fingerprints) so multiple TaskBots working on the same account appear as a single, continuous session. * **Multi-account ready.** Create a dedicated sticky profile per account with separate proxies and cookies for clean isolation and easier organization. * **Clone your regular browser profile.** A practical replacement for “Run in my regular browser.” Clone your existing profile once, then use it as a sticky profile. You can re-clone or clear it any time. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#write-js-new-zw-apis) 📦 Write JS — New `zw` APIs A major expansion of what you can do in Write JS. * **Packages.** Install/import npm packages. Reference: [Imports and Package Management (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming) * **Local & global state.** Store values per run or across runs. Reference: [Local and Global State (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming) * **Device storage.** Persist small key–value secrets locally across reinstalls (never sent to ZeroWork servers). Reference: [Device Storage (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming) * **Utilities.** Console-style logging that accepts multiple values, plus a **live-only** temp log that isn’t sent to ZeroWork servers or saved to persistent reports. Reference: [Utilities (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming) * **Browser control.** Launch, re-launch, manage, and quit contexts and pages. Reference: [Browser Context (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming) * **Metadata.** Read TaskBot and Desktop Agent details. Reference: [Metadata (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming) **✅ No breaking changes.** Existing `log()`, `delay()`, `setRef()`, and `getRef()` (without the `zw.` prefix) still work. We recommend the new convention `zw.*` (e.g., `zw.getRef()`), but your current code will continue to run. Existing `activePage` and `taskbotContext` will also continue to work, although they're now discouraged — prefer `zw.browserContext.getActivePage()` and `zw.browserContext.getContext()`. Full reference: [Write JavaScript (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming) * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#new-building-blocks) 🧩 New Building Blocks * **Launch Browser.** Start a browser context with custom launch options directly from a building block. * **Quit Browser.** Cleanly close the active browser when needed, including mid-run. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#more-powerful-browser-launch-options) 🚀 More Powerful Browser Launch Options More control in TaskBot run settings, the Launch Browser block, and `zw.browserContext.launch()` in Write JS. * **Add custom scripts.** Inject scripts before any page loads. * **Use external Chromium-based browsers** **(Brave, Chrome, Chromium).** _Note: Some forks deviate from Chromium and may not work, e.g., Opera._ * **Use custom launch args (advanced)**. * ⚠️ Changing timezones, geolocation, locale, user agents, or similar can harm anti-detection. Use only if you know what you’re doing. Always test first in incognito mode before applying custom args to sticky browser profiles. * **Window control.** Disable maximizing and set a specific viewport. * **Even more options via the APIs.** Record a full-run video (handy for scheduled/webhook runs), run from Firefox, add permissions, and more. Details: [Browser Context (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming) * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#code-input-in-no-code-blocks) ⌨️ Code Input in No-Code Blocks Combine code and no-code in any text field within no-code building blocks. * **Template expressions** with `${…}` and **code blocks** with `$${…}` let you resolve values directly in inputs. * Great for pulling secrets from device storage, formatting values, or doing quick API lookups—without adding a separate Write JS block. More details: [Code in Inputs](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs) * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#new-features-and-improvements) ✨ New Features and Improvements * **New option “Don’t press Enter on line breaks”.** The Insert Text or Data building block can now preserve line breaks — useful in messengers where line breaks otherwise split one message into multiple separate messages. * **Access to GPT-5 series and GPT-4.1.** GPT-5, GPT-5 mini, GPT-5 nano, and GPT-4.1 are now available in the Ask ChatGPT building block. * **Prettier JSON logs.** JSON is now neatly indented in both running and persistent logs (especially useful for Write JS output). * **More flexible logging.** `log()`/`zw.log()` now accept direct values (like `console.log`). Structured messages with tag/status still work. * **Longer live logs.** Custom log messages (from the Log block and `log()` in Write JS) are **not truncated** in the **running** view. (They still truncate when saved to **persistent** Run Reports.) * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#optimizations) ⚙️ Optimizations * **Faster, more reliable stop logic.** Improved overall TaskBot stop behavior, including aborting non-writing requests mid-request when you click Stop, resulting in faster termination. * **Smarter duplicate-run handling.** Reduces accidental double starts with unknown run status. * **Fewer DNS hiccups.** Added TTL caching to smooth local DNS resolution, resulting in fewer handshake failures and timeouts. * **More robust TaskBot start.** Overhauled the start logic for resilience and reliability. * **Cloud-run groundwork.** Internal preparations for upcoming cloud execution. * **Data sanitization on writes from custom code.** Values saved via Write JS are normalized to valid Unicode (no mid-emoji slicing, even if your code slices or scrapes imperfect data). * **Stale browser contexts.** Improved reliability by recreating contexts (where possible) and adding heartbeats. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#fixes) 🐛 Fixes * Rare **Google Sheets** auth flow issue that prompted unnecessary manual re-authentication — fixed. * **Autosize** rendering bug that caused brief input lag in the canvas UI under certain circumstances — fixed. * **Spintax** with empty brackets (e.g., `{ A | B | {} }`) — now resolves correctly. * Agent crash on a **single value larger than 400-500 MB** (e.g., big file buffers) — replaced with preload validation to avoid a full agent crash. * **Back/forward retry bug** — if loading failed, the retry could send extra forward/back actions. Fixed. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#changed-behavior-non-breaking) 🔧 Changed Behavior (non-breaking) * **More forgiving async handling** for Write JS in the browser. Non-awaited async code continues running after the block finishes, while the TaskBot proceeds to the next block. * **Recommendation:** still `await` your async code for most reliable results. * Parallel runs are now allowed for the common two-device setup. You can now start a manual run while a scheduled or webhook run of that same TaskBot is already running on another device. * * * ### [hashtag](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#potential-breaking-changes) 🚨 Breaking Changes * **Run in my regular browser** is no longer supported due to the latest Chrome v140 updates. You may not have noticed issues yet if you haven’t updated your Chrome browser. ✅ **Replacement:** Use **Clone from my regular browser profile** plus a **sticky browser profile**. * The **Upload File** building block now enforces a **390 MB** limit. Previously, files up to about 500 MB could sometimes work; with validation, these are now blocked. This safety limit prevents Desktop Agent crashes caused by a single upload over roughly 400 to 500 MB. 💡 _This limit does_ _**not**_ _apply to downloads — you can still download files of any size, including multi-gigabyte files._ * The Power Mode blocks IP-leak vectors to prevent real-IP exposure when using proxies. **Side effect:** browser-based screen sharing (Zoom, Google Meet, etc.) may not work when automated in Power Mode. ✅ _Workaround:_ Disable Power Mode for those workflows. [PreviousVersion 1.1.71chevron-left](https://docs.zerowork.io/release-notes/version-1.1.71) Last updated 4 months ago * [🛡️ Anti-Detection Power Mode](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#anti-detection-power-mode) * [👤 Sticky Browser Profiles](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#sticky-browser-profiles) * [📦 Write JS — New zw APIs](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#write-js-new-zw-apis) * [🧩 New Building Blocks](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#new-building-blocks) * [🚀 More Powerful Browser Launch Options](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#more-powerful-browser-launch-options) * [⌨️ Code Input in No-Code Blocks](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#code-input-in-no-code-blocks) * [✨ New Features and Improvements](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#new-features-and-improvements) * [⚙️ Optimizations](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#optimizations) * [🐛 Fixes](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#fixes) * [🔧 Changed Behavior (non-breaking)](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#changed-behavior-non-breaking) * [🚨 Breaking Changes](https://docs.zerowork.io/release-notes/version-1.1.72-upcoming#potential-breaking-changes) sun-brightdesktopmoon sun-brightdesktopmoon --- # References to Variables and Tables | ZeroWork Click on the **V (for variables)** or **T (for tables)** at the top right of your building block to add a reference to a table or variable. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fi6MjFUtQpoqfVKBMMtly%252Fimage%2520%283%29.png%3Falt%3Dmedia%26token%3Dc19ccf96-2754-4a1d-825c-d7dc3d9bb9a7&width=768&dpr=3&quality=100&sign=f77a1002&sv=2) [PreviousDynamic Inputschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs) [NextCode in Inputschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs) Last updated 4 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Go Back or Forward | ZeroWork The **Go Back or Forward** building block allows your TaskBot to navigate browser history by moving backward or forward. If there is no page to go back or forward to, the action will be non-consequential and TaskBot will continue to the next action. [PreviousSwitch or Close Tabchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) [NextSwitch Framechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Hover Web Element | ZeroWork This action hovers on a web element. **Example** Occasionally, some elements are only shown if hovered. For example, on Facebook Group posts the time of the posting is easier to access on the element that is shown on hover. Here is an example of a post where the date is shown when you hover on it. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fyy7WV5r18CpB1LUci9dc%252FScreenshot%25202024-03-21%2520at%252009.55.03%2520%283%29.png%3Falt%3Dmedia%26token%3D93c96f31-c9e0-4d20-aa28-475a232a8ceb&width=768&dpr=3&quality=100&sign=878f3a41&sv=2) In this scenario, you can use this building block to first hover on the post in order to trigger date display and then use _Save Web Element_ building block to save the date from the element that is displayed on hover action, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FwzY68VVIdPE2oHXlELQG%252FScreenshot%25202024-03-21%2520at%252010.02.22.png%3Falt%3Dmedia%26token%3D13471d95-3dc2-4b74-8ec2-cb8cb131d062&width=768&dpr=3&quality=100&sign=1b7953a2&sv=2) You need to enter a CSS or XPath selector of the web element as input. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FLoSITide2jL07k9HKCfh%252FScreenshot%25202024-03-21%2520at%252009.53.35.png%3Falt%3Dmedia%26token%3D2099f86b-5726-4afa-b7c5-a2bf6fae4e9e&width=768&dpr=3&quality=100&sign=d3b61b37&sv=2) [PreviousInsert Text or Datachevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data) [NextSelect Web Dropdownchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/select-web-dropdown) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Save Page URL | ZeroWork This action saves the url of the page that your TaskBot is currently visiting. For example, you can create a variable where currently visited url is saved to. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FTmT4LEeuBXwjKZReAjHt%252FScreenshot%25202024-01-12%2520at%252014.15.53.png%3Falt%3Dmedia%26token%3D25c8aaba-22f8-455e-adb7-46d23b640c67&width=768&dpr=3&quality=100&sign=de691bc7&sv=2) [PreviousOpen Linkchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link) [NextSwitch or Close Tabchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Check Web Element | ZeroWork This action checks if a selector (CSS or XPath) can be found or not. A great example how to use it can be found here: [Send Notification](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification#example-check-if-cookies-expired-or-are-missing) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element#video-tutorial) Video Tutorial [PreviousClick Web Elementchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) [NextSave Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Code in Inputs | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Use `${...}` for an expression and `$${...}` for a code block. Expressions insert their result. Code blocks run full code and must `return` a value to insert. All code runs locally on your device. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs#using-usd-...-expression) **Using** `**${...}**` **(expression)** **Examples** * "This is my secret password stored locally: ${`await zw.deviceStorage.get("password")`}" * "This is my random number: ${`Math.random()`}" * "This is my formatted input ${`"{id: 1234, name: Country Code}".trim().toUpperCase()`} ⚠️ **Note**: table/variable references like `{id: 1234, name: Country Code}` are **not** code; they’re replaced with their values. If you need that value **as a string** inside code, wrap it in quotes (as above) or read it with `zw.getRef`: ${`(await zw.getRef({ ref_id: 1234, name: "Country Code" })).trim().toUpperCase()`}". * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs#using-usdusd-...-code-block) **Using** `**$${...}**` **(code block)** **Examples:** * "This is a value returned from an API: $${ Copy import axios from "axios"; // any import auto-installs locally const res = await axios.get("https://mydomain.com/my/api/url"); return res.data; }." * "This is my input with more complex formatting: $${ Copy const fullAddress = await zw.getRef(ref_id: 1234, name: "Address" }); const splitValues = fullAddress.split("country code: "); const countryCode = splitValues[1]; if (!countryCode) { await zw.log({ message: "no country code", status: "warning" }); return "unknown"; } return countryCode.toUpperCase().trim(); }." * * * ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FaSu7OqvZI8jT0OEi1CV6%252Fimage%2520%285%29.png%3Falt%3Dmedia%26token%3D267171eb-c3b6-4cd8-bb15-1c5119e8446c&width=768&dpr=3&quality=100&sign=f374ddb1&sv=2) [PreviousReferences to Variables and Tableschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/references-to-variables-and-tables) [NextSpintaxchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/spintax) Last updated 1 month ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Save Web Element | ZeroWork This action saves public data to a table. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element#use-cases) Use Cases Typically, there are two main categories when data is saved: Saving lists and enriching existing data. **Examples of saving lists** * Save a list of profiles from LinkedIn to a table (to contact them later or to move them to your CRM) * Save FB group members * Save a list of products in a certain category on Amazon to analyze competitors' prices and new products See workflow set-up example here: [Save Lists](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) . **Examples of enriching existing data** * Have an existing list of LinkedIn profiles and visit every profile to save additional information such as about section, current job position, email address, etc. * Have an existing list of Amazon products and visit every product page to save description, price and latest customer review. See workflow set-up example here: [Enrich Existing Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data) . [PreviousCheck Web Elementchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) [NextSave Listschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Switch or Close Tab | ZeroWork The **Switch or Close Tab** building block allows you to: * Switch to a specific tab using different criteria. * Close a tab. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab#options) **Options** * **Latest tab**: Switch to the last tab on the farthest right. * **Previous tab**: Switch to the tab directly to the left of the current tab. * **Next tab**: Switch to the tab directly to the right of the current tab. * **Tab URL matching**: Match a tab based on its URL or part of it. If there are multiple matching tabs, the first one will be picked. Examples: * A full URL (e.g., `google.com`). * A partial URL (e.g., `/subpage`). * For advanced matching: A regular expression entered between slashes with or without a flag (e.g., `/^https:\/\/google\.com$/i` or `/^https:\/\/google\.com$/`). If your regular expression is invalid, no error will be thrown and TaskBot will assume it is a non-regex value. To ensure that your expression is correct, use regex validator beforehand (e.g. [https://regex101.com/arrow-up-right](https://regex101.com/) ). * **Tab number**: Switch to a tab by its position in the browser. For example: * **Tab number 1**: First tab on the farthest left. * **Tab number 2**: Second tab from the left, and so on. circle-info Be cautious with options other than _Tab URL matching._ TaskBot determines the order of tabs based on their creation time. If you manually rearrange tabs during the TaskBot's run, the tab number may no longer match the visual order displayed in the browser. circle-exclamation When using the _Run in my regular browser_ run mode, the order of the tabs cannot be guaranteed due to parallel TaskBot runs within the same context, as well as the presence of your own tabs. Prefer using the **Tab URL Matching** option instead. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab#actions) **Actions** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab#id-1.-switch-to-tab) **1\. Switch to Tab** Switch to a tab based on the criteria described above. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab#id-2.-close-tab) **2\. Close Tab** Close a specific tab based on the criteria described above. **What happens if a currently active tab is closed?** If you close the currently active tab: * The next tab to the right will become active. * If no tabs exist on the right, the next tab to the left becomes active. * If no tabs remain, the browser application will close. If the tab that is closed is _not_ active, the active tab will remain as it is. If this default behavior does not meet your needs, you can add another **Switch or Close Tab** building block to define which tab should become active. If the browser application closes because all tabs are closed, TaskBot will continue running. However, if subsequent actions require a browser (such as a Click Web Element building block), TaskBot will stop, generate an error, and report the run as failed. To prevent this, you can add an Open Link building block to re-launch the browser. [PreviousSave Page URLchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-page-url) [NextGo Back or Forwardchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/go-back-or-forward) Last updated 1 year ago * [Options](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab#options) * [Actions](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-or-close-tab#actions) sun-brightdesktopmoon sun-brightdesktopmoon --- # Insert Text or Data | ZeroWork The **Insert Text or Data** building block inserts text into an input field on a website. It is useful for filling out forms, entering search queries, or automating text input tasks. For example, you can enter some text as follows: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FgaJBVV2VGu19JZLk5KeL%252FScreenshot%25202023-11-22%2520at%252018.04.30.png%3Falt%3Dmedia%26token%3Dbfc16c36-2721-4f6a-9037-96412a037833&width=768&dpr=3&quality=100&sign=52272065&sv=2) By adding the [Open Link](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link) building block to open wikipedia.org (as an example) and connecting it to the **Insert Text or Data** building block, you can see how the TaskBot inserts the text into the search field: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FoDnAqrgHLYBGAOdDhmPO%252FScreenshot%25202024-12-30%2520at%252007.45.43.png%3Falt%3Dmedia%26token%3D65de23d7-345f-4036-9b16-6936bc53ef92&width=768&dpr=3&quality=100&sign=ac296db0&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#options) Options #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#using-a-variable-or-table-reference) Using a variable or table reference By clicking on **V** (variable) or **T** (table) at the top right, you can add references to dynamic data. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F8Z3FNUwUbpA8uWkDSUmV%252FScreenshot%25202023-11-22%2520at%252018.05.26.png%3Falt%3Dmedia%26token%3Df4adff22-e662-4fde-bfb2-821e0cc84f27&width=768&dpr=3&quality=100&sign=8ca8e625&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#insert-instantly-without-typing-delay) **Insert instantly without typing delay** The _Insert instantly without typing delay_ toggle allows you to paste text instantly without simulating typing. * When this option is **enabled**, the typing speed is instant and the text is immediately pasted into the input field. * When this option is **disabled**, the text will be typed character by character at the specified speed. The selector is then optional. If no selector is provided, the text is inserted wherever the mouse cursor is positioned. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#using-spintax) Using spintax Spintax lets you vary the content of your text dynamically. Learn more here: [Spintax](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/spintax) . ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FXFxsEQ5gv3tGoMevCLlA%252FScreenshot%25202023-11-22%2520at%252018.07.38.png%3Falt%3Dmedia%26token%3D9ea7ccab-b839-4936-9571-a51ea9dac21c&width=768&dpr=3&quality=100&sign=dd2ba748&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#selector) Selector The behavior of the selector depends on the _Insert instantly without typing delay_ setting: * **When enabled**: A selector (CSS or XPath) is required to specify the input field for pasting text. * **When disabled**: The selector is optional. If no selector is provided, the text will be inserted wherever the mouse cursor is currently positioned. Some websites automatically place the mouse cursor in the desired input field (e.g., search engines like Google, DuckDuckGo, or Wikipedia). For instance, when you open Wikipedia, the cursor is automatically in the search field, allowing text to be typed directly without needing a selector. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#encrypt-content) Encrypt Content In some cases, you might prefer logging in to the website/app that you want to automate with your credentials instead of cookies (as described here: [Cookies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) ). In such cases, you may need to use the Insert Text or Data building block to enter your username and password. If you do so, it is important to encrypt your password to protect your access. Once encrypted and saved, the content cannot be viewed or edited. To modify it, you must remove the encrypted entry and re-enter your content. We do not store plain text copies of encrypted content. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fhxt8vkajQ7AHKIpQLRIp%252FScreenshot%25202024-06-08%2520at%252017.44.36.png%3Falt%3Dmedia%26token%3D168c0e85-b099-43e9-bb16-cd1626b74c7c&width=768&dpr=3&quality=100&sign=8ea879a9&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#faq) FAQ **Can I Use the Mouse Cursor Instead of a Selector?** Yes, but only when the option _Insert instantly without typing delay_ is **disabled**. In this case, the text is inserted wherever the mouse cursor is currently positioned. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#when-i-use-a-table-reference-no-data-is-inserted-although-there-is-data-in-the-table) When I use a table reference, no data is inserted, although there is data in the table. This happens when no dynamic loop is set up to pull rows from the table. Please see the solution here: [When I Use Data from Table, No Data is Being Pulled](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled) . * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#video-tutorials) Video Tutorials See a video tutorial on using **Insert Text or Data** for an automated social media post: [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element#video-tutorial) . See another video tutorial on sending a personalized outreach message:[APIs: Send HTTP Request](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#video-tutorial-connect-your-taskbot-with-open.ai) . [PreviousEnrich Existing Datachevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data) [NextHover Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/hover-web-element) Last updated 1 year ago * [Options](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#options) * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#faq) * [Video Tutorials](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data#video-tutorials) sun-brightdesktopmoon sun-brightdesktopmoon --- # Spintax | ZeroWork Spintax lets you randomly vary content. This is helpful on sites with anti-spam measures that check message or email uniqueness. For example, you can insert your content like this: **{hi|hello|hey|howdy}** TaskBot will randomly pick any of the provided options. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FTDb7B5Js8tqjDkk9waOC%252FScreenshot%25202023-11-22%2520at%252018.19.48.png%3Falt%3Dmedia%26token%3D9f96d3e1-8bcd-4155-9231-7307f8bbe10b&width=768&dpr=3&quality=100&sign=fc607e0d&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/spintax#in-which-building-blocks-can-i-use-spintax) In which building blocks can I use spintax? You can enter spintax into any input fields in **all** building blocks, except for the following exceptions. These are the input fields that do **not** accept spintax: * body, header key and header value in [APIs: Send HTTP Request](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request) building block * selector input * regular expressions in [Apply Regex](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex) * words to remove in the _Format Data_ building block on action [Remove Words](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words) . * js code input in [Write JavaScript](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript) [PreviousCode in Inputschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs) [NextOpen Linkchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link) Last updated 4 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Shorten Content Length | ZeroWork This action shortens the content length. **Example of shortening text to 20 characters:** "This text needs to be drastically shortened" ⟶ "This text needs to b" #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/shorten-content-length#use-case-example) Use Case Example To save your token expenditure when using the [Ask ChatGPT](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt) building block, you can first shorten the content used for the prompt. See TaskBot set-up here: [Example set-up](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#example-set-up) . [PreviousRemove Wordschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words) [NextSplit Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Switch Frame | ZeroWork The **Switch Frame** building block is here to help you interact with web pages that use iframes. But first, let's understand what an iframe is and why you might need to switch to one. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#what-is-an-iframe) What is an iframe? An iframe (short for inline frame) is a window within a web page that essentially embeds a different page within the main page. Many websites use iframes to load parts of their content separately, like forms, ads, or other embedded content. The challenge with iframes is that they act as a separate browsing context, meaning you can’t interact with the elements inside an iframe directly unless you "switch" into it. In the example below, you can see a different website embedded into a web page. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FsFXjPiwZHLccG1CHTnfi%252FScreenshot%25202024-10-28%2520at%252006.06.08.png%3Falt%3Dmedia%26token%3Daefaf9d7-46ba-480b-a32d-0cdccb79affe&width=768&dpr=3&quality=100&sign=301ef18&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#how-to-use-the-switch-frame-building-block) How to Use the Switch Frame Building Block 1. Identify the selector of the iframe. (More about selectors: [Using Selectors](https://docs.zerowork.io/using-zerowork/using-selectors) .) 2. Select "iframe" in the dropdown and enter your selector. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuILl1RncOqo7lKSgNpKc%252FScreenshot%25202024-10-28%2520at%252006.09.06.png%3Falt%3Dmedia%26token%3D923a456f-4d80-4055-909a-c513d53657c5&width=768&dpr=3&quality=100&sign=3d3c0927&sv=2) Once you've specified the iframe, TaskBot will enter that context. From now on, all following building blocks will operate within this iframe until you tell TaskBot to switch back. circle-info **Tip!** It's recommended to increase selector timeout in the building blocks that rely on selectors (such as _Save Web Element_, _Hover Web Element_, etc.) whenever those actions take place within an iframe. You can find the timeout input field in _Selector Options_ directly in those building blocks. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#returning-to-the-main-page) Returning to the Main Page To go back to working on the main page, add another **Switch Frame** block and select "Main frame" in the dropdown. This action makes TaskBot exit the iframe and resume actions on the main page. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F57T6cUFwQTxgFxfFCdf0%252FScreenshot%25202024-10-28%2520at%252006.10.58.png%3Falt%3Dmedia%26token%3Ddc737823-109d-4640-8d7f-858223d1c9ae&width=768&dpr=3&quality=100&sign=9b6fc483&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#nested-iframes) Nested iframes Some web pages contain iframes inside other iframes. If you need to interact with elements within these layers, you can add several **Switch Frame** building blocks in sequence to navigate to the nested structure. TaskBot will follow each iframe level you define, so you can reach even deeply embedded content. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FEHrS5V8XfjVA25K3Vl5J%252FScreenshot%25202024-11-19%2520at%252018.26.37.png%3Falt%3Dmedia%26token%3D4a6e3732-1e5f-45cf-b0dd-445d80aafb4c&width=768&dpr=3&quality=100&sign=a21a2034&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#what-happens-if-the-iframe-is-removed-or-changed-while-taskbot-is-running) **What happens if the iframe is removed or changed while TaskBot is running?** If TaskBot cannot find the iframe, it will issue an error and stop. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#what-happens-if-i-use-the-open-link-building-block-to-open-a-new-website-or-the-switch-tab-or-close) What happens if I use the _Open Link_ building block to open a new website, or the _Switch Tab_ or _Close Tab_ building block to activate another tab? The frame setup will be cleared, as if you had used the _Select Main Frame_ action right before the new tab becomes active. _(This handling is available in the upcoming agent 1.1.56.)_ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#how-do-i-get-a-selector-for-the-iframe-or-for-the-element-inside-it) How do I get a selector for the iframe or for the element inside it? Usual ways to obtain selectors continue to work within an iframe. **You do not need any special way to find a selector within an iframe or for the iframe itself**. For example, if you use a selector picker extension to get selectors, just keep using it. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#troubleshooting-taskbot-cant-click-or-perform-some-other-action-the-element-in-the-iframe) Troubleshooting: TaskBot can't click (or perform some other action) the element in the iframe! The reasons why the element cannot be identified can vary: * You have not identified the right iframe selector, so your TaskBot is in the wrong iframe. * Your iframe selector is correct but it is inside another iframe. (See "Nested iframes" example in the section above.) * You have not identified the right click web element selector. * Add a **longer selector timeout when performing actions on elements within iframes**. (You can find timeout in Selector Options inside those building blocks.) [PreviousGo Back or Forwardchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/go-back-or-forward) [NextBrowser Alertchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/browser-alert) Last updated 1 year ago * [What is an iframe?](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#what-is-an-iframe) * [How to Use the Switch Frame Building Block](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#how-to-use-the-switch-frame-building-block) * [Returning to the Main Page](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#returning-to-the-main-page) * [Nested iframes](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#nested-iframes) * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Before (Date) & After (Date) | ZeroWork This condition checks if a calendar date is smaller or greater than a comparison date. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date#days-shift) Days shift This is a shift added to the date that you enter in the field _Enter days shift_. It can be a positive or negative number. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date#example-3-days-shift) Example: 3 days shift Image that you entered the comparison date as 10th of July and 3 days shift, as shown below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FqkYMPw0vZBhVOPYOaZQL%252FScreenshot%25202024-04-03%2520at%252014.11.46.png%3Falt%3Dmedia%26token%3Da408833a-374a-42ef-8858-3e44c4560c5e&width=768&dpr=3&quality=100&sign=f813cb0f&sv=2) This set-up will convert the comparison date from 10th of July to 13th of July (07/13/2023). **On** _**After**_**:** The condition will be met if the reference date (the one entered in _Start Condition_ building block) is 14th or any day after 14th, which is later than 13th. **On** _**Before**_**:** The condition will be met if the reference date (the one entered in _Start Condition_ building block) is 12th or any day before 12th, which is earlier than 13th. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date#example-2-days-shift) Example: -2 days shift Negative numbers are accepted, too. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FTIoIxfYubAOVsmI8dLIY%252FScreenshot%25202024-04-03%2520at%252014.13.09.png%3Falt%3Dmedia%26token%3D27ed3062-1fd1-4cc6-b476-a0166945d412&width=768&dpr=3&quality=100&sign=3279c019&sv=2) This set-up will convert the comparison date from 10th of July to 8th of July (07/08/2023). **On** _**After**_**:** The condition will be met if the reference date (the one entered in _Start Condition_ building block) is 9th or any day after 9th, which is later than 8th. **On** _**Before**_**:** The condition will be met if the reference date (the one entered in _Start Condition_ building block) is 7th or any day before 7th, which is earlier than 8th. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date#date-format) Date format The date format between the comparison date and the reference date must be consistent, otherwise the comparison would be error-prone. You can change the date format in the date settings as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F0WELnvqZUV3OnFKCFugz%252FScreenshot%25202024-04-03%2520at%252014.15.41.png%3Falt%3Dmedia%26token%3D8ef36bd1-8cdc-462c-a752-c8de5475439d&width=768&dpr=3&quality=100&sign=228b7e76&sv=2) [PreviousContains & Does Not Containchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/contains-and-does-not-contain) [NextStart Repeatchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Open Link | ZeroWork This action opens a link in a Chrome window. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#example-input) Example input ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fxx8sV07vZs5yYq4kidv5%252FScreenshot%25202023-11-22%2520at%252016.13.46.png%3Falt%3Dmedia%26token%3D9157dcde-3429-4a1a-99c5-e34029fc66ce&width=768&dpr=3&quality=100&sign=84225b1a&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#using-a-variable-or-table-reference) Using a variable or table reference ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F4qT4LPeUXMG7JkIWa94l%252FScreenshot%25202023-11-22%2520at%252016.15.02.png%3Falt%3Dmedia%26token%3De253cb93-69c2-4db1-a336-61bfca86fd72&width=768&dpr=3&quality=100&sign=c4ae159c&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#open-in-new-tab) Open in New Tab To open the website in a new tab, simply check the checkbox shown below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FBhdJuXithN1PfLUaDMXa%252FScreenshot%25202024-06-18%2520at%252021.13.43.png%3Falt%3Dmedia%26token%3D9d52ff5f-dca5-4e99-8e2c-60709c1d9613&width=768&dpr=3&quality=100&sign=d3c9a571&sv=2) Note that when new tab is opened, the tab stays in the background. This is normal. The TaskBot makes a new tab active but it doesn't bring it to the front. This doesn't impede TaskBot run and doesn't impede it from operating in that new tab. If this is inconvenient for you because this impedes you from watching TaskBot perform its actions, either click manually on the tab that the TaskBot switched to or add _Switch or Close Tab_ building block to close the tabs that are inactive. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#website-network-errors) Website Network Errors Whenever your TaskBot cannot reach a website url, it will stop its run and issue an error report that you can check in your TaskBot run reports (see [Using Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports) ). The issue is usually that the website is not available, is taking too long to load, your internet connection is too slow or your proxy settings are not valid. In the error message, you will find the error code that your TaskBot received. Since there are over 200 network error codes, it would go beyond the scope of this documentation page to explain each. However, there are many publicly available resources online such as blog articles and Chrome help docs that provide information about each specific error. So if a particular error happens to you frequently, it could be helpful to google that specific error code and read about possible solutions. You might find that the error is happening due to your specific VPN, antivirus or router set-up. You can find the complete list of network error codes here: chrome://network-errors/. This is how the error code is displayed in your error report: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FtOhgyAjqfq50p730gkck%252FScreenshot%25202024-10-15%2520at%252012.06.31.png%3Falt%3Dmedia%26token%3Dde2da518-1d6a-431e-af35-baf5ced8b13f&width=768&dpr=3&quality=100&sign=2fe915c4&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#how-do-i-make-taskbot-log-in-to-my-account-when-it-opens-a-website) How do I make TaskBot log in to my account when it opens a website? Please see [Cookies](https://docs.zerowork.io/using-zerowork/general-run-schedule-share-webhooks/cookies) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#when-i-use-a-table-reference-i-get-an-error-that-there-was-no-url) When I use a table reference, I get an error that there was no url. Please see [When I Use Data from Table, No Data is Being Pulled](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#video-tutorial) Video Tutorial [PreviousSpintaxchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/spintax) [NextSave Page URLchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-page-url) Last updated 1 year ago * [Open in New Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#open-in-new-tab) * [Website Network Errors](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#website-network-errors) * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#faq) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/open-link#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Delete Data | ZeroWork This action removes individual rows or all data in your table. Below you will learn more about the two available options. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#delete-all-rows) Delete All Rows All data is permanently removed. It's a useful option if you regularly run your TaskBot to collect data and want to overwrite old data with newly collected data on every run. Simply place _Delete Data_ building block at the beginning of your workflow before any loops start. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#delete-one-row) **Delete One Row** This option is useful for the case when you want to delete only if a certain condition is met. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#example-remove-disqualified-leads-if-lead-qualification-status-does-not-equal-qualified) Example: Remove disqualified leads if lead qualification status does not equal "qualified" Imagine you collected a list of leads. Your TaskBot updated the column "Qualification" in the table by checking for certain keywords. (There is an example set-up for auto-qualifying leads here: [Update Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#example-1-mark-leads-as-qualified-if-certain-conditions-are-fulfilled) .) Now every lead that is qualified is marked with the word "Qualified" in the table. Your goal is to delete all the disqualified leads. This is the workflow set-up: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FgWlZqGm3rk5UlRvCav5b%252FScreenshot%25202023-11-21%2520at%252014.46.07.png%3Falt%3Dmedia%26token%3D58e72496-92ad-4fe9-b0c0-5a93a233fc34&width=768&dpr=3&quality=100&sign=b445c215&sv=2) The loop is set up to iterate over rows (see [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) ). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FJMBd02t6kMAqQA2Q5TBk%252FScreenshot%25202023-11-21%2520at%252014.47.11.png%3Falt%3Dmedia%26token%3Dbd8d6513-6a84-4988-ac32-567cb635caa5&width=768&dpr=3&quality=100&sign=4f8e616e&sv=2) _Start Condition_ building block sets the column "Qualification" as the reference. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FW4FUTYLVqfELPsoAfhQG%252FScreenshot%25202023-11-21%2520at%252014.48.46.png%3Falt%3Dmedia%26token%3D58a4b389-0ecf-4c15-8f32-a1c3decc19dd&width=768&dpr=3&quality=100&sign=dc542b75&sv=2) Condition in _Set Condition_ is set to filter out the qualified leads. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZcfLjvkkxF3FAbRDcA6b%252FScreenshot%25202023-11-21%2520at%252014.47.46.png%3Falt%3Dmedia%26token%3D829b3c6b-3648-4464-bf6d-85cc2f78824c&width=768&dpr=3&quality=100&sign=b1978d13&sv=2) The last building block in this sequence is _Delete Data_ and it deletes one row during each loop iteration, as long as the above condition was fulfilled. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FBPBckqjj3dGzhoQYTSpg%252FScreenshot%25202023-11-21%2520at%252014.52.23.png%3Falt%3Dmedia%26token%3Dcfc62db1-7432-4c18-b098-ded2279a5861&width=768&dpr=3&quality=100&sign=29ddc9c8&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#video-tutorial) Video Tutorial [PreviousRemove Duplicateschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates) [NextAsk ChatGPTchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt) Last updated 1 year ago * [Delete All Rows](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#delete-all-rows) * [Delete One Row](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#delete-one-row) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Abort Run | ZeroWork The **Abort Run** building block stops the TaskBot run immediately. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/abort-run#example) **Example** It could be useful to abort TaskBot run if a certain condition is met (or not met). For example, if certain critical data is not found or does not exist, you can add **Abort Run** to terminate your TaskBot run. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FLIpjbhLjSYTHM48yV0BB%252FScreenshot%25202024-12-30%2520at%252011.01.43.png%3Falt%3Dmedia%26token%3D873990ea-d5fd-4a9a-8220-38a048637906&width=768&dpr=3&quality=100&sign=e8dbb7fb&sv=2) [PreviousRaise Errorchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/raise-error) [NextUpdate Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Actions <, ≤, >, ≥ | ZeroWork This condition checks if your data is smaller or greater than (or equal) a certain value. For example, you can compare number of followers, prices, degrees, etc. If you need to compare calendar dates, use [Before (Date) & After (Date)](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date) . [PreviousActions = & ≠chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/actions-and) [NextData Found & Data not Foundchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/data-found-and-data-not-found) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Browser Alert | ZeroWork The **Browser Alert** building block is for handling native browser dialogs like prompts, confirms, alerts, and beforeunload (page exit) confirmations. Per default, TaskBot dismisses these dialogs automatically by clicking **Cancel**. Use this block if TaskBot needs to **accept** the alert. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/browser-alert#prompt-text-optional) **Prompt text (optional)** If the browser dialog is a **prompt** requiring input, enter the response text as shown in the screenshot below. This field is ignored for browser dialogs of type alert, confirm or beforeunload (page exit). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FFpePa16EZyyHAy4QppFy%252FScreenshot%25202024-11-10%2520at%252007.23.42.png%3Falt%3Dmedia%26token%3Dec64a848-eca5-48f5-8626-9b88515956bf&width=768&dpr=3&quality=100&sign=715a62e&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/browser-alert#placement) **Placement** Simply place the **Browser Alert** building block after the action that triggers the dialog. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FYiXMhNDh1qnYZEnLRDk7%252FScreenshot%25202024-11-10%2520at%252007.28.12.png%3Falt%3Dmedia%26token%3De2d87a65-9a81-488a-90bf-5b4eb960fdb1&width=768&dpr=3&quality=100&sign=12926fda&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/browser-alert#run-behavior) **Run behavior**: * If a browser alert appears, TaskBot will accept it and continue. * If no alert is present, TaskBot takes no action and proceeds without interruption. [PreviousSwitch Framechevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/switch-frame) [NextClick Web Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Break Repeat | ZeroWork This action aborts the current loop. This is used if, for example, the loop should be exited once certain conditions are met. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/break-repeat#example-break-loop-if-there-are-no-more-profile-search-results) **Example**: Break loop if there are no more profile search results Imagine that you don't know how many pages with search results there are on some page. Once there are no results, the website shows some text like "There are no search results anymore". You can use [Check Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/check-web-element) to check if such text is shown. Then you can set up a condition that if that condition is met, then your TaskBot should stop the loop. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fn6A0FOdVmt0ZsYVHnriA%252FScreenshot%25202023-11-21%2520at%252016.51.52.png%3Falt%3Dmedia%26token%3D42f50fd9-3a5d-4fc2-81e5-d13d3504543a&width=768&dpr=3&quality=100&sign=74adeffe&sv=2) Another example is described here: Break loop if status request is unsuccessful [Save Status Response](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#save-status-response) . See a **video tutorial** where Break Repeat is used to exit the loop once a daily DM limit is reached: [Example: Use variable to limit number of DMs sent per run](https://docs.zerowork.io/using-zerowork/using-variables#example-use-variable-to-limit-number-of-dms-sent-per-run) . [PreviousAfter Repeatchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat) [NextTry-Catchchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/try-catch) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Contains & Does Not Contain | ZeroWork This condition checks if your data contains or does not contain certain keywords. Separate multiple keywords by comma. Here is a workflow set-up example: [Example 1: Mark leads as qualified if their description contains certain keywords](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#example-1-mark-leads-as-qualified-if-their-description-contains-certain-keywords) (link includes a video tutorial) [PreviousData Found & Data not Foundchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/data-found-and-data-not-found) [NextBefore (Date) & After (Date)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Raise Error | ZeroWork _This page is upcoming. Stay tuned!_ [PreviousTry-Catchchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/try-catch) [NextAbort Runchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/abort-run) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Actions = & ≠ | ZeroWork This condition checks if your data is equal or not equal to a certain value. Here are workflow set-up examples that use this condition: * Break loop on condition that status request is unsuccessful, see example here: [Save Status Response](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#save-status-response) * [Example: Set profile visit status to "visited" and avoid visiting same profile links by checking if status equals "visited"](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data#example-set-profile-visit-status-to-visited-and-avoid-visiting-same-profile-links-by-checking-if-sta) (link includes a video tutorial) * [Example: Remove disqualified leads if lead qualification status does not equal "qualified"](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#example-remove-disqualified-leads-if-lead-qualification-status-does-not-equal-qualified) (link includes a video tutorial) [PreviousStart Condition and Set Conditionchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition) [NextActions <, ≤, >, ≥chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/actions-less-than-greater-than) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Try-Catch | ZeroWork You can add any building block — or a sequence of multiple building blocks — after the **Start Try-Catch** block. All of these blocks will be part of the Try-Catch scope. If an error happens inside this scope, the TaskBot will immediately continue along the **On Catch Error** path, where you can define how to handle the error. After either the success path or the error path is completed, the TaskBot will continue along the **After Try-Catch** path. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZR7AHdkgISuhCDFlYun7%252FCleanShot%25202025-04-27%2520at%252008.54.16.png%3Falt%3Dmedia%26token%3De6d9aec4-c7bc-4b48-9ea8-ffbe56464de0&width=768&dpr=3&quality=100&sign=2112a2b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/try-catch#examples) Examples 1. If any error (no differentiation) occurs inside a loop, break the loop and continue after the loop. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FiXJQoLiT4UQBQQzYzO8s%252FCleanShot_2025-04-29_at_07.13.25.png%3Falt%3Dmedia%26token%3D6da87a39-6204-4c2c-ba55-b4be6433de73&width=768&dpr=3&quality=100&sign=1b8f1f17&sv=2) 1. Different try-catch scopes with different error handling strategies for different building blocks. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FQIsLunUOiXQaBFyJiQWw%252FCleanShot_2025-04-29_at_07.14.35.png%3Falt%3Dmedia%26token%3Dc6cbc631-8eba-4b61-a9ef-31731129be23&width=768&dpr=3&quality=100&sign=6f56c41e&sv=2) 1. Record the error message and handle the error differently depending on the error. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FAlnWuqoNPBS4PdWopVmA%252FCleanShot_2025-04-29_at_07.28.30.png%3Falt%3Dmedia%26token%3D698b2c08-5bbc-45f0-8fbf-88412459ddda&width=768&dpr=3&quality=100&sign=62dd701b&sv=2) circle-exclamation If the TaskBot can’t start its run at all, the error won’t be caught — even if you wrap the entire workflow in a try-catch block. This usually happens for one of two reasons: * Outdated agent version * Invalid TaskBot set-up [PreviousBreak Repeatchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/break-repeat) [NextRaise Errorchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/raise-error) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Remove Duplicates | ZeroWork This action removes all the rows that are duplicate. circle-exclamation It is best practice to always specify a column, unless you have a very special case. Specifying a column will make your TaskBot run faster. Notes: Files in _file_ columns will be ignored when searching for duplicates. The TaskBot will remove **the latest (the newest) rows** and preserve previous rows per default. If you want to reverse this behavior, then check the checkbox _Preserve newest rows_ (note that this option is only available in native tables and not available for Google Sheets). ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates#do-not-place-inside-loops) Do Not Place Inside Loops This is a batch operation. This means that all table rows - no matter how many there are - are fetched and the duplicate removal is applied to the whole table. Hence, it does not make sense to use this on every loop iteration. circle-exclamation If you place this building block inside a loop, duplicates will only be removed once. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates#video-tutorial) Video Tutorial [PreviousApply Regexchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex) [NextDelete Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data) Last updated 1 year ago * [Do Not Place Inside Loops](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates#do-not-place-inside-loops) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Continue until No Element Is Found | ZeroWork When enabled, the loop will continue running until no matching web element is found on the page. This is useful for working with lists of unknown or dynamic length, such as social feeds. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found#how-it-works) **How it works** If any of the web actions (such as Save Web Element, Click Web Element, Hover Web Element, etc.) returns a selector not found error, the loop will end. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found#repetition-limit-is-recommended) Repetition limit is recommended If your list is long or possible _truly_ endless (e.g. a scroll feed), the loop may run for a very long time before reaching the bottom. In these cases, we strongly recommend also setting a repetition limit to prevent long-running or stuck TaskBots. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found#warning) ⚠ Warning If you enable this option and your loop does not include any web element actions (e.g., Save Web Element, Click Web Element, etc.), the loop will never end. Make sure there is at least one building block that interacts with web elements on the page. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found#skipping-selector-not-found-error) Skipping selector not found error If you are using the Save Web Element building block with the option Skip if no element is found enabled, or if the action is wrapped in a try-catch scope (by using the Start Try-Catch building block), your preference to skip the error will be respected, so the loop won't end when an element is missing. In such cases, the loop will end only when the scrolling area has reached the end and no further elements can be identified after several attempts. However, if you disable the Auto-scroll option, the loop may run indefinitely — in this setup, TaskBot cannot detect the end of the scrolling area and will assume you are handling scrolling and loop exit manually. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found#recommendation) **Recommendation** Leave untoggled if you know how many elements there are on the page. It is more reliable to provide a definite number of repetitions as opposed to using dynamic auto-detection. For example, if you scrape a list of profiles and you know there are always ten profiles per page, then do not toggle this option, simply enter 10 in the number of repetitions field below. [PreviousDynamic Loopchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/dynamic-loop) [NextAuto-Scrollchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-scroll) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Data Found & Data not Found | ZeroWork This condition checks if your data is empty or not. The most common use case for _Data found_ or _Data not Found_ is to handle edge cases. For example, you can set up this condition to ensure that TaskBot skips those rows that do not contain data in certain columns. [PreviousActions <, ≤, >, ≥chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/actions-less-than-greater-than) [NextContains & Does Not Containchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/contains-and-does-not-contain) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Dynamic Loop | ZeroWork Dynamic loop is used to iterate over existing rows in a table. **Suitable for** * Updating existing data - example: visiting profile links from a table and adding profile details such as "About Me" section to the existing rows or updating their qualification status based on certain conditions. * Performing actions on existing data - example: visiting profile links from a table and auto-sending outreach messages. **Key characteristics** * Iterates over existing rows until it consumes all rows. * If you don't want to iterate over all rows but need to access, for example, only one row, enter 1 to the optional repetition limit (or any other number that you need). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/dynamic-loop#example-set-up) Example set-up See [Enrich Existing Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data) (link includes a video tutorial). [PreviousStandard Loopchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop) [NextContinue until No Element Is Foundchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Start Condition and Set Condition | ZeroWork _Start Condition_ sets the reference that should be used for comparison. _Set Condition_ sets the condition. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition#actions) Actions [Actions = & ≠chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/actions-and) [Actions <, ≤, >, ≥chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/actions-less-than-greater-than) [Data Found & Data not Foundchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/data-found-and-data-not-found) [Contains & Does Not Containchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/contains-and-does-not-contain) [Before (Date) & After (Date)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition#adding-multiple-conditions) Adding Multiple Conditions You can add multiple conditions by simply adding multiple _Set Condition_ building blocks to the _Start Condition_ building block, like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FH0WbTvb9Z75bp4aqAnCQ%252FScreenshot%25202024-05-27%2520at%252010.09.53.png%3Falt%3Dmedia%26token%3D3100d272-88d3-4834-a233-c5ddba55b019&width=768&dpr=3&quality=100&sign=b0f21a0b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition#chaining-conditions) Chaining Conditions You can chain multiple _Start_ and _Set Condition_ building block pairs, like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fb4VskASd1rcxkASIBa3y%252FScreenshot%25202024-05-27%2520at%252012.20.44.png%3Falt%3Dmedia%26token%3D278ce55d-43e4-4b91-9f74-87b2b13b1480&width=768&dpr=3&quality=100&sign=3a833c4e&sv=2) Also, as you can see above, you can add one _Set Condition_ building block for just **one** condition or multiple blocks for multiple conditions. [PreviousKeyboard Actionchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) [NextActions = & ≠chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/actions-and) Last updated 1 year ago * [Actions](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition#actions) * [Adding Multiple Conditions](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition#adding-multiple-conditions) * [Chaining Conditions](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition#chaining-conditions) sun-brightdesktopmoon sun-brightdesktopmoon --- # Example: Standardize different formats | ZeroWork Imagine your TaskBots saves number of followers to your table. However, the platform of your choice displays the number of followers in a format like "7k" (which stands for 7000). And this can lead to problems if, for example, you want to use that number for numeric comparisons to qualify only those leads that have a certain amount of followers. To solve this problem, follow the steps below. * **Step 1**: Use [Format Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data) with action [Remove Words](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words) to remove "k". ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FXSBb5MFEzwoQe05RhdKp%252FScreenshot%25202023-11-21%2520at%252016.03.17.png%3Falt%3Dmedia%26token%3Dbf334bff-1c40-4890-874e-ab13b224b9e1&width=768&dpr=3&quality=100&sign=27bbe3c4&sv=2) * **Step 2**: Use _Number Operations_ building block with action _Multiply_ to multiply by 1000. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FhXwld4P70NPUa0fbdPjg%252FScreenshot%25202025-01-02%2520at%252009.09.39.png%3Falt%3Dmedia%26token%3D2d6cd79e-49df-47c7-8e1c-816d3ccf70da&width=768&dpr=3&quality=100&sign=7d1a6957&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations/example-standardize-different-formats#video-tutorial) Video Tutorial [PreviousNumber Operationschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations) [NextFormat Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Standard Loop | ZeroWork Standard loop is used to append new rows to your table. **Suitable for** * Saving new data - example: scraping a list of profiles from a public website. * Performing static actions - example: repeatedly pressing keyboard tab key. **Key characteristics** * Creates new rows in your table. Creates means appends. * Can manipulate the data in the rows that are appended during the loop. For example, you can add building blocks like _Format Data_ to transform the format of the data that you are saving. Whatever actions your TaskBot takes during a loop iteration, they will all be applied to the same to-be-appended row. * Ignores any existing data in your tables. If you need to refer to the existing data, use variables, which are loop-independent (or, if applicable, select dynamic loop type, see [Dynamic Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/dynamic-loop) ). * Automatically scrolls if the data is displayed in an endless scroll (unless you select auto-detect option, see here: [Continue until No Element Is Found](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found) !). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#example-set-up) Example set-up See [Save Lists](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) (link includes video tutorial). ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#how-to-use-loop-index-syntax-to-save-lists-of-public-data) How to Use Loop Index Syntax to Save Lists of Public Data Once you review the example above (here is the same link again: [Save Lists](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) ), you will see that the list selector contains **{loop\_index}**, so that TaskBot can iterate over items in the list. Selectors of items in a list contain a number by which they increment, as described here: [Lists: Incremental CSS Selectors](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/lists-incremental-css-selectors) . In place of that number, you need to insert **{loop\_index}**. Same principle applies both to CSS and XPath selectors. Here is how to do that. **Step 1**: Simply copy two to three selectors from the list you want to save. As an example, consider these are the first three selectors from the list that you copied. Original: * **1st result in the list:** main#main li:nth-child(**1**) > div.abi-saved-contacts-row\_\_details > button\[type='button'\] > div > div > span * **2nd result in the list:** main#main li:nth-child(**2**) > div.abi-saved-contacts-row\_\_details > button\[type='button'\] > div > div > span * **3rd result in the list:** main#main li:nth-child(**3**) > div.abi-saved-contacts-row\_\_details > button\[type='button'\] > div > div > span Notice how all the selectors in the list will display an incremental number (highlighted in red above). **Step 2**: Substitute the incremental number by loop index. main#main li:nth-child(**{loop\_index}**) > div.abi-saved-contacts-row\_\_details > button\[type='button'\] > div > div > span #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#alternative-way-if-you-dont-know-where-exactly-the-increment-takes-place) Alternative way if you don't know where exactly the increment takes place: main#main li~**:nth-child(1)**~ > div.abi-saved-contacts-row\_\_details > button\[type='button'\] > div > div > span **>> nth={loop\_index}** In this case, we are using a filter (>>), as described here: [Combine Filters with Standard CSS Logic](https://docs.zerowork.io/using-zerowork/using-selectors/how-to-build-custom-selectors/combine-filters-with-standard-css-logic) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#starting-point) Starting point Optionally, you can specify your starting point like this: **{loop\_index,2}** where 2 means that the count should start from the 2nd element. Note that the :nth-child() method starts count from 1, whereas the >> nth= method starts count from 0 (0 corresponds to the 1st element in the list, 1 to the 2nd, etc.). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#special-case-skip-items) Special case: Skip items In rare cases, a list might skip some numbers. For example, consider this list: * **1st result in the list:** main#main li:nth-child(**1**) > div.abi-saved-contacts-row\_\_details > button\[type=“button“\] > div > div > span * **2nd result in the list:** main#main li:nth-child(**3**) > div.abi-saved-contacts-row\_\_details > button\[type=“button“\] > div > div > span * **3rd result in the list:** main#main li:nth-child(**5**) > div.abi-saved-contacts-row\_\_details > button\[type=“button“\] > div > div > span In this case, you can use this syntax: **{loop\_index,1,2}**, where the additional number (in this case it's 2) means that two elements should be always skipped when incrementing the loop index. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#advanced-use-referencing-the-loop-index-of-a-parent-loop) Advanced use: Referencing the loop index of a parent loop You can add a loop ID like this: **{loop\_index\_123}**, where 123 corresponds to the ID of the Start Repeat building block. This is useful when you need to reference the loop index of a parent loop. A common use case is when looping through web tables: the parent loop iterates over rows, and the child loop iterates over columns — allowing selectors to access both the parent and child loop indices. [PreviousStart Repeatchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) [NextDynamic Loopchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/dynamic-loop) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Record Date | ZeroWork This action generates a calendar date or time based on your specifications and saves it to a table or variable. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/record-date#example-send-an-auto-follow-up-after-some-days) **Example**: Send an auto-follow-up after some days Imagine you have built a TaskBot that sends automated messages to a list of contacts on LinkedIn. You may want your TaskBot to save the date on which it sent those messages to your table, so that you can set up a follow-up message by using [Start Condition and Set Condition](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition) -> action [Before (Date) & After (Date)](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date) which would then check when your contact received the first message. The result of your table would look like this: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FjiPwPPbXcyR8HiPCe8HN%252FScreenshot%25202023-11-22%2520at%252016.41.52.png%3Falt%3Dmedia%26token%3D742a8c3d-486b-4f1e-bb08-00c7e2e47f0d&width=768&dpr=3&quality=100&sign=434de3ff&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/record-date#video-tutorial) Video Tutorial [PreviousDelaychevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) [NextTake Screenshotchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/take-screenshot) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Keyboard Action | ZeroWork This action hits the keys of a keyboard. The keys can be, for example, Enter, backspace, ->, <-, individual letters or shortcuts such as CMD+C/CTRL+C. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-1-use-keyboard-shortcuts) **Tip 1: Use Keyboard Shortcuts** Check available shortcuts for your application. By using these shortcuts, you will be able to save a lot of time and skip many building blocks. Useful resources: * [Facebook shortcutsarrow-up-right](https://www.webfx.com/blog/social-media/facebook-cheat-sheet-of-keyboard-shortcuts/) * [Slack shortcutsarrow-up-right](https://slack.com/help/articles/201374536-Slack-keyboard-shortcuts) * [Instagram shortcutsarrow-up-right](https://greasyfork.org/en/scripts/374589-instagram-keyboard-shortcuts) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-2-use-tab) Tip 2: Use Tab In pretty much every application, you can tab your way through to virtually any element. Using tab can be especially useful when you need to fill out forms. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FvxXzuvXlSaLBoQuF6XfB%252FScreenshot%25202023-11-21%2520at%252012.08.27.png%3Falt%3Dmedia%26token%3D86332a93-f724-4845-a0e5-b452180b9a33&width=768&dpr=3&quality=100&sign=22897f93&sv=2) Try it out yourself! Go to [https://www.wikipedia.org/arrow-up-right](https://www.wikipedia.org/) and start pressing _Tab._ You will see how you can navigate through the options this way. Next, try pressing _Enter_ when an option is in focus after tabbing to it - you will see that the element in focus opens. Now, for example, you can count how many tabs you need to get to the option "Wiktionary" - as of today, we needed to press _Tab_ 9 times and then press _Enter_. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-3-use-shift--tab) Tip 3: Use Shift + Tab With Tab you can navigate your way forward and with _Shift + Tab_ you can navigate your way _**backwards**_. Order matters, so be sure to first add _Shift_ and then _Tab_ (as opposed to _Tab_, then _Shift_). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuvXKo4RRYgdreDPQcaqa%252FScreenshot%25202024-03-02%2520at%252013.53.34.png%3Falt%3Dmedia%26token%3D0af77e67-97a3-44e8-95d6-152fc692a2d1&width=768&dpr=3&quality=100&sign=5b39974a&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-4-use-escape) Tip 4: Use Escape Is there a pop-up asking something or a chatbot that pops up and disrupts your TaskBot or a dropdown that needs to be closed before your TaskBot can proceed? Very often, the solution to this problem is to let your TaskBot hit the key _Escape_. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Flfsv7UQdxbvOv7dFYITW%252FScreenshot%25202024-02-18%2520at%252015.10.29.png%3Falt%3Dmedia%26token%3D47a3d7c2-5ef8-4504-afe7-a22472dd3099&width=768&dpr=3&quality=100&sign=2a46552b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-5-reload-page) Tip 5: Reload Page You can use CMD + R (Mac) / CTRL + R (Windows) to reload the page. Note that CMD and CTRL are displayed as Meta in our application. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fo5WLdrg4dQf5BKbhM7WN%252FScreenshot%25202024-02-18%2520at%252015.10.57.png%3Falt%3Dmedia%26token%3D3ed192e6-5cd3-41c0-8622-08fea7a46bff&width=768&dpr=3&quality=100&sign=2c348d8b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#browser-native-commands) Browser Native Commands ZeroWork can operate within the website context, but not within the native browser commands. So, say, if you want to hit CTRL/CMD+P (to print something), CTRL/CMD+F (to search for something), CMD+S (to save website as html) or use a browser shortcut command to maximize a window, that won't work. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#troubleshooting) Troubleshooting If you think Keyboard Action building block is not working as expected, please review this page with common issues: [Keyboard Action Is Not Working As Expected](https://docs.zerowork.io/using-zerowork/common-problems/keyboard-action-is-not-working-as-expected) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#video-tutorial) Video Tutorial [PreviousSelect Web Dropdownchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/select-web-dropdown) [NextStart Condition and Set Conditionchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition) Last updated 1 year ago * [Tip 1: Use Keyboard Shortcuts](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-1-use-keyboard-shortcuts) * [Tip 2: Use Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-2-use-tab) * [Tip 3: Use Shift + Tab](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-3-use-shift--tab) * [Tip 4: Use Escape](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-4-use-escape) * [Tip 5: Reload Page](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#tip-5-reload-page) * [Browser Native Commands](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#browser-native-commands) * [Troubleshooting](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#troubleshooting) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Format Data | ZeroWork The **Format Data** building block allows you to format text. If the value to apply the format action on is empty, the TaskBot will take no action and continue its run. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data#actions) Actions * **Remove word** See sub-page [Remove Words](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words) . * **Replace text** Example: "Hello world" (replace "world" with "universe") ⟶ "Hello universe" * **Shorten content length** See sub-page [Shorten Content Length](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/shorten-content-length) . * **Convert to lower case** Example: "HELLO WORLD" ⟶ "hello world" * **Convert to upper case** Example: "hello world" ⟶ "HELLO WORLD" * **Capitalize first letters** Example: "Hello world" ⟶ "Hello World" * **Normalize URL** Examples: * www.wikipedia.org ⟶ [https://www.wikipedia.org/arrow-up-right](https://www.wikipedia.org/) * wikipedia.org ⟶ [https://www.wikipedia.org/arrow-up-right](https://www.wikipedia.org/) * wikipedia ⟶ error is generated "The URL is not a valid URL and cannot be normalized." * **Trim white spaces** Example: " Hello world " ⟶ "Hello World" * **Remove line breaks** Example: * "Hello world" ⟶ "Hello World" * **Remove smileys** Example: "Hello world 🌎" ⟶ "Hello World " [PreviousExample: Standardize different formatschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations/example-standardize-different-formats) [NextRemove Wordschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words) Last updated 11 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Start Repeat | ZeroWork This is how you can set up a loop to either iterate over rows in your table, save a list of scraped data or repeat some other actions. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#start-and-end-of-the-loop) Start and End of the Loop Loop starts right after _Start Repeat_ building block. This means all building blocks that follow _Start Repeat_ will repeat for the number of loop iterations. Loop ends with the last building block. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fz1ZgeJ75LI85tmcN4k9x%252FScreenshot%25202023-11-23%2520at%252008.47.15.png%3Falt%3Dmedia%26token%3D24973d94-b386-47e6-bda6-1199a7e5a0e3&width=768&dpr=3&quality=100&sign=13428308&sv=2) If you want to make your TaskBot do some actions **after** the loop end, use the building block [After Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#loop-types) Loop Types There are two loop types. Standard loop saves new data by appending new rows to your table. Dynamic loop iterates over existing rows in your table. More details and examples here: * [Standard Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop) * [Dynamic Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/dynamic-loop) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#options) Options Your TaskBot can continue where it left off in the previous run. Learn more about it here: * [Auto-Continue from Last Row or Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element) In a standard loop type, your TaskBot can auto-detect the number of elements in a given list. Learn more about it here: * [Continue until No Element Is Found](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#nested-loops) Nested Loops Nested loops are primarily used to paginate through results. Learn more about it here: * [Nested Loops - Handle Pagination](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination) [PreviousBefore (Date) & After (Date)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition/before-date-and-after-date) [NextStandard Loopchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop) Last updated 1 year ago * [Start and End of the Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#start-and-end-of-the-loop) * [Loop Types](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#loop-types) * [Options](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#options) * [Nested Loops](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat#nested-loops) sun-brightdesktopmoon sun-brightdesktopmoon --- # Save Lists | ZeroWork **Example: Save list of profiles from LinkedIn search results** In this example, let's assume we want to save 10 profiles from a page. Here is the workflow set-up: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F4IE8m74OHtCmBCLU4YCj%252FScreenshot%25202023-11-22%2520at%252017.46.04.png%3Falt%3Dmedia%26token%3Ddf4018e6-4a8e-430f-b33a-4f9436d81c19&width=768&dpr=3&quality=100&sign=ba6d9d05&sv=2) _Open Link_ opens the page where the list of profiles is displayed. Note: You should add a url that already contains all necessary search filters, similar to what you see on the screenshot below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Foc9No5Y6EBdErf4glTUQ%252FScreenshot%25202023-11-22%2520at%252017.47.55.png%3Falt%3Dmedia%26token%3D5e54ba60-b4ac-44f5-b6d2-f745dd7a3654&width=768&dpr=3&quality=100&sign=ab4151a7&sv=2) The loop is set at 10 to be able to save 10 results. The loop is set up in the _Start Repeat_ building block. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FnxkGq49PCC1CtEtu0mR6%252FScreenshot%25202023-11-22%2520at%252017.49.07.png%3Falt%3Dmedia%26token%3D4282f91f-eed4-45ee-bbe9-494d18940c6a&width=768&dpr=3&quality=100&sign=e2ccc405&sv=2) _Save Web Element_ building block saves profile links like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FQNLkWFODKxDb82HFpcWz%252FScreenshot%25202023-11-22%2520at%252017.50.20.png%3Falt%3Dmedia%26token%3Dd0eca1c3-2dd4-46c1-bc0b-003758091f12&width=768&dpr=3&quality=100&sign=5d9bc549&sv=2) **IMPORTANT**: If you pay close attention to the screenshot above, you will see that the selector contains **{loop\_index}**. Please read the following section to learn how to add the loop index to your selector (CSS or XPath): [How to Use Loop Index Syntax to Save Lists of Public Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/standard-loop#how-to-use-loop-index-syntax-to-save-lists-of-public-data) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#data-is-always-appended.-but-i-want-the-new-data-to-overwrite-the-old-data-on-every-run) Data is always appended. But I want the new data to overwrite the old data on every run. Use [Delete Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data) building block before you start your loop. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#how-do-i-get-rid-of-duplicates-in-my-table) How do I get rid of duplicates in my table? Use [Remove Duplicates](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates) building block after your loop finished saving all the results. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#how-to-save-paginated-results) How to save paginated results? Check [Nested Loops - Handle Pagination](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#how-to-handle-scrolling) How to handle scrolling? Scrolling is handled automatically by your TaskBot. In-built auto-scrolling logic might fail in some cases. You may need to set up some additional logic by using space or arrow down with a [Keyboard Action](https://docs.zerowork.io/using-zerowork/using-building-blocks/keyboard-action) block. Contact support to report the website where scrolling is not triggered automatically ([Support](https://docs.zerowork.io/support/getting-support) ). ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#video-tutorial) Video Tutorial [PreviousSave Web Elementchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element) [NextEnrich Existing Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data) Last updated 9 months ago * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#faq) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Save from Clipboard | ZeroWork This action saves your clipboard's content to a variable or table. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-from-clipboard#example-save-post-link-on-linkedin) Example: Save post link on LinkedIn Imagine that you need a TaskBot that copies post links from LinkedIn and saves them. When the three-dot button to open more actions is clicked, you can see there is an option called "Copy link to post". ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fgcpkf7FB84Nqniwb0LIZ%252FScreenshot%25202024-01-12%2520at%252014.21.02.png%3Falt%3Dmedia%26token%3D33eaac1a-6edf-455c-8156-156a9888481b&width=768&dpr=3&quality=100&sign=f7996cde&sv=2) First, add a building block [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) that will click on this option. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FKKiAMfZMUB0LWWe9SqVi%252FScreenshot%25202024-01-12%2520at%252014.23.30.png%3Falt%3Dmedia%26token%3Dd4350893-6477-4602-a66d-18b5d961b9e8&width=768&dpr=3&quality=100&sign=adaa8221&sv=2) By clicking on copy link to post, the link is added to your clipboard. Now you can add _Save from Clipboard_ building block in order to save the clipboard content to a variable or a table. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F0qIAd5Mc18lOr7QyZ1NA%252FScreenshot%25202024-01-12%2520at%252014.24.17.png%3Falt%3Dmedia%26token%3D782ea713-d716-417e-99e2-c04a2f795d09&width=768&dpr=3&quality=100&sign=a58f88ef&sv=2) circle-exclamation Note that there is no clipboard isolation between TaskBots. Typically, it's a matter of milliseconds for the TaskBot to get the copied content and save it. However, if you run many TaskBots in parallel, all of which heavily rely on saving content from clipboard, this might be error-prone because content from clipboard might get mixed up across TaskBots. [PreviousTake Screenshotchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/take-screenshot) [NextLogchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/log) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Remove Words | ZeroWork This action removes all entered words (or characters). When entering multiple words, separate them by comma. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words#example) Example **Data to be formatted:** AI scientist and PhD candidate Ms. Fina Fedora **Words to remove**: Ms., Mr., Mrs., PhD, MBA **Result will be:** AI scientist and candidate Fina Fedora (as in "AI scientist and ~PhD~ candidate ~Ms.~ Fina Fedora") #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words#limitation) Limitation Commas cannot be removed (since they are used to separate multiple words). To remove commas, use the action _Replace text_ and leave the replacement value empty. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/remove-words#video-tutorial) Video Tutorial [PreviousFormat Datachevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data) [NextShorten Content Lengthchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/shorten-content-length) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Send Notification | ZeroWork ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FlWbGkLXW5O8yZnuvZzuo%252Fsend-notification_block_overview.png%3Falt%3Dmedia%26token%3D5b9eae54-7122-43aa-9a26-8348acbb1069&width=768&dpr=3&quality=100&sign=444a97cf&sv=2) The **Send Notification** block allows you to send yourself an email notification. triangle-exclamation The email will be sent to the email address associated with your ZeroWork account. If you need to send an email notification to recipients other than yourself, consider using a [Send HTTP Request](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request) block to integrate with third-party email APIs. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification#how-to-use-it) How To Use It The Send Notifiaction block has two fields: 1. **Subject**: the plaintext subject of the email. 2. **Email notification content**: the plaintext or HTML body of the email. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification#things-to-know) Things To Know * Both fields are required. * Both fields accept [variable](https://docs.zerowork.io/using-zerowork/using-variables) and [table](https://docs.zerowork.io/using-zerowork/using-tables) references. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FBXn7Csvg9l0VsdozTYeD%252Fsend-notification_block_refs.png%3Falt%3Dmedia%26token%3D3e33f90d-caa5-45ed-92a2-930ab6190353&width=768&dpr=3&quality=100&sign=78bcc09a&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification#block-behavior) Block Behavior * The **Email notification content** field accepts a mix of plaintext and HTML. You may minify HTML in this field to eliminate extra whitespace in the email's body. * This block has a per minute sending rate limit. The rate limit is automatically applied when this block is activated within a [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) loop. * Emails are sent from `[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) `. Consider whitelisting this email address within your email client. * Emails contain a standard footer text. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification#examples-and-use-cases) Examples & Use Cases ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FIatsnLpsIBCbLkNkBa7P%252Fsend-notification_block_notify_on_not_found.png%3Falt%3Dmedia%26token%3D6537d950-25b9-4d81-ba38-6693432ca203&width=768&dpr=3&quality=100&sign=44deabd0&sv=2) Notify yourself if an element is missing on a webpage ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FmSEFcosFL8xkbSsW3U86%252Fsend-notification_block_notify_on_error.png%3Falt%3Dmedia%26token%3D91e538e7-9e46-4100-bcd9-2652d10ba166&width=768&dpr=3&quality=100&sign=d80397a8&sv=2) Notify yourself if a webpage is down or unreachable [PreviousAsk ChatGPTchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt) [NextAPIs: Send HTTP Requestchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request) Last updated 4 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Auto-Scroll | ZeroWork _This page is upcoming. Stay tuned!_ [PreviousContinue until No Element Is Foundchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/continue-until-no-element-is-found) [NextAuto-Continue from Last Row or Elementchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Log | ZeroWork The **Log** building block allows you to record custom log messages during a TaskBot's run. These messages are displayed in the running log dialog and saved in the Run Reports ([Using Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports) ) for future reference. If no message is entered, a warning is recorded, but the TaskBot run remains unaffected and its status is not marked as failed. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FWaCrynDzv882rynP9sEO%252FScreenshot%25202024-12-29%2520at%252012.54.01.png%3Falt%3Dmedia%26token%3D8af3a48e-a0fe-46c2-bb6d-9f554aa3cf86&width=768&dpr=3&quality=100&sign=d263c971&sv=2) This is how a log message is displayed in the running log dialog: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FjpCGpwbxvmOEFBhRPDS3%252FScreenshot%25202024-12-29%2520at%252012.59.07.png%3Falt%3Dmedia%26token%3Dfc67272c-79e6-4a5d-a550-5fa8d9d198e4&width=768&dpr=3&quality=100&sign=52036085&sv=2) It will also be part of the logs in the **TaskBot Run Reports**: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fux2QLXtH9uxnsKQmyKBo%252FScreenshot%25202024-12-29%2520at%252013.00.07.png%3Falt%3Dmedia%26token%3Dddbf25a7-9718-4ddf-86f6-3384fa7ef8c6&width=768&dpr=3&quality=100&sign=f0cb0adb&sv=2) [PreviousSave from Clipboardchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-from-clipboard) [NextBuilding Block Optionschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Split Data | ZeroWork The **Split Data** building block allows you to break a value into multiple parts and save them into separate columns or variables. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data#how-it-works) How It Works * **Value to split** – Select the value that should be split (e.g., a full name or an address). * **Separator** – Define the character or text that separates the parts (e.g., a space, comma, or custom delimiter). * **Positions to save** – Specify which parts to extract and where to store them. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data#example-split-full-name-to-first-and-last-name) Example: Split full name to first and last name Consider this to be your initial table: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FFmrCd0dszAvYOpHCUXAO%252FScreenshot%25202023-06-16%2520at%252017.10.57.png%3Falt%3Dmedia%26token%3D2368828f-4949-488f-b8af-87d9a3efbd5e&width=768&dpr=3&quality=100&sign=b7a5e2cf&sv=2) How to set up the Split Data building block: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F6N93HCLGuuymyNBW18yv%252FScreenshot%25202023-11-22%2520at%252016.36.33.png%3Falt%3Dmedia%26token%3D3f93c339-4b32-4a8e-97b8-153e70a76c28&width=768&dpr=3&quality=100&sign=9c02056&sv=2) This is the end result after running your TaskBot: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FTV6eh6XGGgbCdFLuoJh9%252Fspaces_g9LcR8XM7TGOzOCDGsCS_uploads_wDT0yaLivkCX6mFOtj4c_Screenshot%25202023-06-16%2520at%252017%2520copy.png%3Falt%3Dmedia%26token%3D6c3551b7-39b4-4712-8aad-959f6f7586e5&width=768&dpr=3&quality=100&sign=c2de57e9&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data#split-from-the-end-of-text) Split from the End of Text You can enter **negative numbers** in position fields to split from the end of text. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data#behavior-during-run) **Behavior During Run** * If the split value **does not contain a requested position**, nothing is saved for that position, and no action is taken. * **Positive positions** (e.g., `1`, `2`, `3`) start counting from the beginning. **Examples**: * "Hello world", position 1 ⟶ "Hello" * "Hello world", position 2 ⟶ "world" * "Hello world", position 3 ⟶ _(nothing gets saved)_ * **Negative positions** (e.g., `-1`, `-2`, `-3`) allow counting from the end. _(Supported from the agent version 1.1.61.)_ **Examples**: * "Hello world", position -1 ⟶ "world" * "Hello world", position -2 ⟶ "Hello" * "Hello world", position -3 ⟶ _(nothing gets saved)_ * **Position 0 is not valid** and does not correspond to any value. TaskBot will generate an error if 0 is used. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data#video-tutorial) Video Tutorial [PreviousShorten Content Lengthchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/shorten-content-length) [NextApply Regexchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Apply Regex | ZeroWork The **Apply Regex** building block allows you to perform advanced text formatting and manipulation using regular expressions. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#methods) **Methods** 1. **Replace text** Replaces text matching the given regular expression with a replacement value. * **Example 1**: Replace the first occurrence of "birds" with "dogs": **Input Text**: "cats eat birds and birds fly" **Regex**: `/birds/` **Replacement**: "dogs" **Result**: "cats eat dogs and birds fly" * **Example 2**: Replace all occurrences of "birds" with "dogs" (using `g`): **Input Text**: "cats eat birds and birds fly" **Regex**: `/birds/g` **Result**: "cats eat dogs and dogs fly" 2. **Extract matches** Extracts text that matches the given regular expression. * **Example 1**: Extract the first match of a number: **Input Text**: "Number 123 and there is also another one 345" **Regex:** `/\d+/` **Result**: "123" (Note: without "g", only the first number is extracted.) * **Example 2**: Extract all matches of all numbers (using `g`): **Input Text**: "Number 123 and there is also another one 345" **Regex**: `/\d+/g` **Result**: \["123", "345"\] 3. **Check if pattern matches** Checks if the text contains a match for the given regular expression and returns `true` or `false`. * **Example**: Check if "abc" exists in "abc123": **Regex**: `/abc/` **Result**: "true" ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#flags) **Flags** You can add flags to modify the behavior of your regular expressions. Examples of typically used flags: * `**g**`: Global search (matches all occurrences). * `**i**`: Case-insensitive search. * `**m**`: Multiline search. * **Example**: `/example/gi` performs a global, case-insensitive search. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#use-case-example-extract-google-sheet-ids) **Use Case Example: Extract Google Sheet IDs** Imagine you have a list of Google Sheets links and need to extract the IDs. * Your building block set-up: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FiCBTxRSGClOARMvfTtz8%252FScreenshot%25202025-01-02%2520at%252008.41.22.png%3Falt%3Dmedia%26token%3Db159872b-f646-4b65-8e9c-38893f55a461&width=768&dpr=3&quality=100&sign=fc3b6e0b&sv=2) * **Result**: Extracted ID is "1aBcD\_12345\_EfGhI67-JklMnOpqrstu890". ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FBtjoC2gV3wRBgL1ogTje%252FScreenshot%25202025-01-02%2520at%252008.42.58.png%3Falt%3Dmedia%26token%3Ded9f55c0-27ed-4349-aaca-6b298e1ee12b&width=768&dpr=3&quality=100&sign=148f6ecf&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#additional-notes) **Additional Notes** * If the input text is empty, the TaskBot will take no action and continue running. * If your regex is invalid, the TaskBot will generate an error report and stop run/loop. * You can validate and test your regex using tools like [regex101.comarrow-up-right](https://regex101.com/) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#im-not-a-developer-can-i-still-use-regex) I'm not a developer, can I still use regex? Absolutely! Regex is simply a sequence of characters that specifies a match pattern in text. Anyone can use it. There are many reference guides on the internet to learn more. Here is one example: [Regex reference guidearrow-up-right](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference) . [PreviousSplit Datachevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/split-data) [NextRemove Duplicateschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/remove-duplicates) Last updated 10 months ago * [Methods](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#methods) * [Flags](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#flags) * [Use Case Example: Extract Google Sheet IDs](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#use-case-example-extract-google-sheet-ids) * [Additional Notes](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#additional-notes) * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/apply-regex#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Take Screenshot | ZeroWork To view how to use File Options, see this page: [File Options](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#file-options) . To learn how to get the folder path, see this page: [How do I get folder path?](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#how-do-i-get-folder-path) [PreviousRecord Datechevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/record-date) [NextSave from Clipboardchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-from-clipboard) Last updated 9 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # After Repeat | ZeroWork Lets you do actions **after** loop iterations completed. _After Repeat_ building block must always be placed after _Start Repeat_ building block. Below are some examples. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat#example-1-send-yourself-an-email-notification-after-your-taskbot-finished-its-run) **Example 1**: Send yourself an email notification after your TaskBot finished its run This is the workflow set-up where _Start Repeat_ building block is set to loop through some actions. _After Repeat_ is placed right after _Start Repeat_ building block and ensures that TaskBot will send you an email once all loop iterations are completed. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FU5UdL8iUkqjsbSyLNEgY%252FScreenshot%25202023-11-23%2520at%252007.15.06.png%3Falt%3Dmedia%26token%3D67cf6c9a-c073-4160-89b2-04de0cb28a17&width=768&dpr=3&quality=100&sign=2f42b9ce&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat#example-2-chain-multiple-loops-first-collect-leads-then-engage-with-them-in-the-same-run) **Example 2**: Chain multiple loops - first collect leads, then engage with them in the same run _After Repeat_ can produce 'workflow in workflow' effect since it lets you chain multiple independent loops within the same workflow. Imagine that you set up a loop to collect leads, as described here: [Save Lists](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) , and you set up another loop to iterate over collected leads and visit each profile, as described here: [Enrich Existing Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data) . You can create two separate TaskBots for these two scenarios. Or, you can use _After Repeat_ to unite both in the same workflow, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F6x2kwSXKN8vS4J9MhwbL%252FScreenshot%25202023-11-23%2520at%252008.32.14.png%3Falt%3Dmedia%26token%3D30012418-dc8c-422f-829e-14609751cda8&width=768&dpr=3&quality=100&sign=1c7860d3&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat#video-tutorial) Video Tutorial [PreviousNested Loops - Handle Paginationchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination) [NextBreak Repeatchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/break-repeat) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Delay | ZeroWork ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FUFqKPJiwz5SGprwchMhT%252Fdelay_block_overview.webp%3Falt%3Dmedia%26token%3Df258f65a-00c8-41d5-b5e3-f7ff5efb01c0&width=768&dpr=3&quality=100&sign=21195ad8&sv=2) The **Delay** block allows you to pause your TaskBot for a specified duration (in seconds) before moving to the next block. By default, the pause time is **randomized** between the minimum and maximum values you set. This makes your TaskBot’s actions appear more natural to websites that might use anti-bot detection measures. circle-check Setting the **same value** for both minimum and maximum values allows you to use a **fixed delay** instead of a random one. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay#how-to-use-it) How To Use It The Delay block has two fields: 1. **Minimum (seconds)**: The shortest possible pause duration. 2. **Maximum (seconds)**: The longest possible pause duration. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay#things-to-know) Things To Know * The default value for both fields is **1 second**. * You can enter **decimal values** (for example, `1.50` for 1.5 seconds.) * Both fields accept [variable](https://docs.zerowork.io/using-zerowork/using-variables) and [table](https://docs.zerowork.io/using-zerowork/using-tables) references. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fav3RgrwrI5oWJtkQXvlc%252Fdelay_block_refs.webp%3Falt%3Dmedia%26token%3D6b633c5f-13e0-47e8-9c37-797abc06b909&width=768&dpr=3&quality=100&sign=b8d6fd3f&sv=2) circle-exclamation If a variable or table reference contains an invalid value for the Delay block (for example, text instead of a number), the Delay block will be skipped, and your TaskBot will move to the next block immediately without any delay. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay#block-behavior) Block Behavior * If you enter the **same number** in both fields, the pause time will always be that exact duration. For example, when specifying 4 seconds for both minimum and maximum durations, your TaskBot will pause for exactly 4 seconds. * If the **maximum is less than the minimum**, your TaskBot will pause for the **minimum** duration instead. For example, if maximum duration is 4 seconds but the minimum duration is 10 seconds, your TaskBot will pause for exactly 10 seconds. * If you **leave either field empty**, the delay block will be skipped. * Setting both values to **0** means your TaskBot will move to the next step **without pausing**. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay#examples-and-use-cases) Examples & Use Cases ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fd88nk2lySNmrEaswIqDo%252Fdelay_block_throttle_api_requests.png%3Falt%3Dmedia%26token%3Db3aa26bd-782c-49d1-a47a-fafab04c63f6&width=768&dpr=3&quality=100&sign=5540ddb2&sv=2) Throttling sequential API requests with a Delay block [PreviousUpload Filechevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file) [NextRecord Datechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/record-date) Last updated 7 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Building Block Options | ZeroWork [Deactivate Building Blockschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks) [Shortcutschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/shortcuts) [Auto-Alignchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align) [Sticky Noteschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/sticky-notes) [Delay Times between the Building Blockschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks) [PreviousLogchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/log) [NextDeactivate Building Blockschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Auto-Continue from Last Row or Element | ZeroWork This option lets TaskBot continue where it left off in the previous run. The TaskBot will track the iteration/row number and update it after finishing the loop. This option is helpful whenever you need to process a large amount data and want to ensure that your TaskBot can process it continually during several subsequent runs. For example, imagine that you are saving a list of 10,000 profiles. On the 1,000th profile the website suddenly crashes. If you toggled _Continue at Latest Iteration_, on its next run TaskBot will start from the 1,001st item and so you don't need to start from scratch. If you enter a number in _Start from_, the next run will not start at an iteration lower than that value. This option can be applied both on standard and dynamic loop type. However, it's important to note that there are some differences to how _Continue at Latest Iteration_ is used in dynamic versus standard loop types. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element#auto-continue-in-dynamic-loop) Auto-Continue in Dynamic Loop In a dynamic loop type, this option refers to the row. So if your TaskBot covered 100 rows during the first run, then on the next run it will start looping from the 101st row. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element#example-opening-a-limited-number-of-profiles-per-run) Example: Opening a limited number of profiles per run You can combine repetition number with this option to only process a limited number of rows per run. An example would be to limit visiting profile links from a table to 100 a day. **Loop Set-up** Dynamic loop is set up to loop through the table "LinkedIn Profiles". The (optional) repetition limit is set to 100 and the auto-continue option is enabled. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FUJYiMdASgqUGyZca4Kv9%252FCleanShot%25202025-04-27%2520at%252008.21.56.png%3Falt%3Dmedia%26token%3D21a1ed78-c3e1-4a50-930b-56eb9c2d927c&width=768&dpr=3&quality=100&sign=a6c53be9&sv=2) **How TaskBot Runs** * **Run 1**: Visits 100 profiles by looping through 1 to 100 rows and updates the continue at latest iteration to 101. * **Run 2**: Starts from 101st row, loops through 101 to 200 rows and, once finished, updates the continue at latest iteration to 201. * **Run 3**: Starts from 201st row, loops through 201 to 300 profiles and, once finished, updates the continue at latest iteration to 301. * ...Runs until the table rows are exhausted. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element#auto-continue-in-standard-loop) Auto-Continue in Standard Loop In a standard loop type, this option refers to the selector in the list. **Example: Scraping a large list** Assume you want to scrape a list of some profiles. A list has 5,000 profiles, and you only want to scrape 100 per day. **Loop Set-up** Standard loop is set up to repeat 100 times and has continue at latest iteration option checked. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F8A2LGmcBfNx42FMBuHte%252FCleanShot%25202025-04-27%2520at%252008.24.25.png%3Falt%3Dmedia%26token%3D37d96739-1ce4-430b-b0db-b6b273211b4d&width=768&dpr=3&quality=100&sign=84bc2b2e&sv=2) **How TaskBot Runs** * **Run 1**: Collects 1 to 100 profiles and updates the continue at latest iteration to 101. * **Run 2**: Starts from 101st selector, collects 101 to 200 profiles and, once finished, updates the continue at latest iteration to 201. * **Run 3**: Starts from 201st selector, collects 201 to 300 profiles and, once finished, updates the continue at latest iteration to 301. * ...Runs until the list is exhausted. [PreviousAuto-Scrollchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-scroll) [NextNested Loops - Handle Paginationchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination) Last updated 9 months ago * [Auto-Continue in Dynamic Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element#auto-continue-in-dynamic-loop) * [Auto-Continue in Standard Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element#auto-continue-in-standard-loop) sun-brightdesktopmoon sun-brightdesktopmoon --- # Enrich Existing Data | ZeroWork #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data#example-visit-every-profile-from-a-list-of-linkedin-profile-links-and-save-additional-public-informa) **Example: Visit every profile from a list of LinkedIn profile links and save additional public information such as current job position and email address shown on the profile page** Here is the workflow set-up: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZ4Pust3QIKNu3rOM6mc6%252FScreenshot%25202023-11-22%2520at%252017.11.03.png%3Falt%3Dmedia%26token%3Db1203bbc-4754-4426-9046-d632972b524c&width=768&dpr=3&quality=100&sign=9877b2ac&sv=2) The loop is set to iterate over table rows: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FOYA8wuRWPCilrksFFyE6%252FScreenshot%25202023-11-22%2520at%252017.10.46.png%3Falt%3Dmedia%26token%3Db2a472c3-18a8-477e-8c46-04555ae912d3&width=768&dpr=3&quality=100&sign=1ba69895&sv=2) _Open Link_ building block points to the table column "Profile link": ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FGOSYTNc47hUhOtUqn8U1%252FScreenshot%25202023-11-22%2520at%252017.09.10.png%3Falt%3Dmedia%26token%3Da5862040-e7f5-48f5-9aaa-6570570f8c27&width=768&dpr=3&quality=100&sign=9cfd0bc8&sv=2) The two last _Save Web Element_ building blocks save job title and about me section: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FEb6vRskUqQK2n56n0Ecc%252FScreenshot%25202023-11-22%2520at%252017.10.01.png%3Falt%3Dmedia%26token%3D484a8633-5128-413d-8743-b53b49289941&width=768&dpr=3&quality=100&sign=bce943c4&sv=2) **Table before run** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FCOhyRW7UmHhwGTzAaZ0Q%252Fspaces_g9LcR8XM7TGOzOCDGsCS_uploads_cyEdDlwC1VkMd76MQZqR_Screenshot%25202023-06-16%2520at%252014%2520copy.png%3Falt%3Dmedia%26token%3D0bd7311d-d696-4f31-8653-b378016cdb42&width=768&dpr=3&quality=100&sign=84548135&sv=2) **Table after run** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FPtfVB3fMhjRE3PhelGkU%252Fspaces_g9LcR8XM7TGOzOCDGsCS_uploads_r6KQKv1CRmDLlYRFO7CR_Screenshot%25202023-06-16%2520at%252014%2520copy.png%3Falt%3Dmedia%26token%3D945c2457-9010-4d77-b3ce-c8ef02cd85a9&width=768&dpr=3&quality=100&sign=794cbc3c&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data#avoid-visiting-same-profiles) Avoid visiting same profiles You should avoid visiting the same profiles. Visiting same profiles over and over slows down your TaskBot runs and data generation. And it might also trigger **anti-bot alerts**. Some websites like LinkedIn track how many profiles you visit per day and block display if you exceed those limits. So do add extra logic to avoid visiting same profiles. The example below explains how to achieve that. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data#example-set-profile-visit-status-to-visited-and-avoid-visiting-same-profile-links-by-checking-if-sta) **Example: Set profile visit status to "visited" and avoid visiting same profile links by checking if status equals "visited"** Add [Update Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data) building block: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FQtW2MiZg9YlryOL4LRaI%252FScreenshot%25202023-11-22%2520at%252017.19.25.png%3Falt%3Dmedia%26token%3D3cec6a1e-f54a-4804-8e83-bbf1442bc1f9&width=768&dpr=3&quality=100&sign=d2023eb1&sv=2) Create a new column in your table (or in your Google Sheet) and call it "Profile visit status": ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FczSAvyYhNRzsiRqYifLw%252FScreenshot%25202023-11-22%2520at%252017.21.07.png%3Falt%3Dmedia%26token%3De101e065-bd8d-4581-9695-3993f99911d8&width=768&dpr=3&quality=100&sign=4bac8986&sv=2) Use _Update Data_ building block to mark that a profile was visited like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F4HSTmhSRQJMVu9XyWPfL%252FScreenshot%25202025-01-02%2520at%252007.53.17.png%3Falt%3Dmedia%26token%3Dc3a3ba03-3659-4362-80c9-fdc93ed19871&width=768&dpr=3&quality=100&sign=ef4f9d23&sv=2) Now you need to set a condition that will check if a profile has already been visited or not. Add [Start Condition and Set Condition](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-condition-and-set-condition) building blocks like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FUOfztkjr5vSI7XyLevf4%252FScreenshot%25202023-11-22%2520at%252017.23.23.png%3Falt%3Dmedia%26token%3Db7f5dd3c-9d82-499d-bc6a-3541fca70749&width=768&dpr=3&quality=100&sign=c0050b28&sv=2) Your _Start Condition_ building block points to the "Profile visit status" column: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZ5wXv0BMkjCuxFtPdlES%252FScreenshot%25202023-11-22%2520at%252017.25.32.png%3Falt%3Dmedia%26token%3D265a0759-1893-414d-ae61-a54a10a9411b&width=768&dpr=3&quality=100&sign=770a4870&sv=2) And your _Set Condition_ building block ensures that TaskBot only opens those links that have not yet been visited: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FA75pzH6irQx91DttPMYX%252FScreenshot%25202023-11-22%2520at%252017.26.56.png%3Falt%3Dmedia%26token%3D0ef2c83f-74a0-4d29-a7c0-aadd0536007a&width=768&dpr=3&quality=100&sign=3785e231&sv=2) The above set-up on how to prevent your TaskBot from visiting same profile links is also demonstrated in a video tutorial: ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data#video-tutorial) Video Tutorial [PreviousSave Listschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) [NextInsert Text or Datachevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/insert-text-or-data) Last updated 8 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Update Data | ZeroWork This action updates data in a variable or table to a new value. New data can be empty - this will clear the existing data and set it to an empty value. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#example-1-mark-leads-as-qualified-if-their-description-contains-certain-keywords) **Example 1: Mark leads as qualified if their description contains certain keywords** Imagine you saved profiles from, for example, LinkedIn to a table called "Linkedin profiles". Now you want to mark all those leads which have keywords "senior", "vp", "director" in their job title as qualified. For this, you can create a column which you can call, for example, "Status" and use this action to update rows with the word "qualified" in the cases where your condition is fulfilled. This is the workflow set-up: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FTP49iPjXJLX1CaJ4Kvt1%252FScreenshot%25202023-11-21%2520at%252015.46.56.png%3Falt%3Dmedia%26token%3Df5de8406-5d8b-4f74-ab71-bbc5779ed5c4&width=768&dpr=3&quality=100&sign=16f791ba&sv=2) Loop is set up to iterate over profiles in your table: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FbHRuRqZrI87fnzgpROBm%252FScreenshot%25202023-11-21%2520at%252015.47.37.png%3Falt%3Dmedia%26token%3D758e3154-28a0-44b0-b03b-181610d90a7c&width=768&dpr=3&quality=100&sign=7296c010&sv=2) _Start Condition_ is pointing to the column "Job position". ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FKAyRNRF8GgK3fephItMI%252FScreenshot%25202023-11-21%2520at%252015.48.03.png%3Falt%3Dmedia%26token%3Df49760fd-c205-4941-9df8-cf630b53c398&width=768&dpr=3&quality=100&sign=5e2a812b&sv=2) _Set Condition_ is checking for the aforementioned keywords. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FxqkRG1e1b1ycdE6bDEQy%252FScreenshot%25202023-11-21%2520at%252015.49.00.png%3Falt%3Dmedia%26token%3Ddf3ea271-cf03-4eb1-9aa2-ed33af50aa1c&width=768&dpr=3&quality=100&sign=f4dad526&sv=2) Now the column "Status" will be set equal to "qualified" as long as the condition above is met. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FBUrqU1OuFNIcSiBagDKQ%252FScreenshot%25202025-01-02%2520at%252007.51.36.png%3Falt%3Dmedia%26token%3Df96c4c36-f97e-421e-bbb1-86c4603c2cf5&width=768&dpr=3&quality=100&sign=9dfb1f34&sv=2) Later, when you continue working with this table, you can set up your TaskBot to only send connection requests to those contacts who have the word "qualified" in the column "Status" or you can delete all disqualified leads (see example here: [Example: Remove disqualified leads if lead qualification status does not equal "qualified"](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data#example-remove-disqualified-leads-if-lead-qualification-status-does-not-equal-qualified) ). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#example-2-mark-leads-who-received-an-outreach-message-with-message-sent) **Example 2: Mark leads who received an outreach message with "Message sent"** A similar popular use case is to mark a message status as processed. Imagine your TaskBot will be sending out automated messages to a list of profiles. You can create a column called, for example, "Status message" and let your TaskBot update it with "sent" every time a DM is sent. Then by adding a condition to skip sending DMs on profiles who have a record "sent" in their "Status message" column, you can make sure that you never send repeated DMs to the same leads. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FJbrfM0muTG1nsnqShNVM%252FScreenshot%25202025-01-02%2520at%252007.52.21.png%3Falt%3Dmedia%26token%3D83c6601c-0965-48f8-a7ee-83c89db734d5&width=768&dpr=3&quality=100&sign=395eca09&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#example-3-set-profile-visit-status-to-visited-to-avoid-visiting-same-profiles) **Example 3: Set profile visit status to "visited" to avoid visiting same profiles** Here is a an example of a workflow set-up that checks for status of profile being visited: [Avoid visiting same profiles](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/enrich-existing-data#avoid-visiting-same-profiles) (link includes a video tutorial). ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#when-i-use-a-table-reference-no-data-is-updated-although-there-is-data-in-the-table) When I use a table reference, no data is updated, although there is data in the table. This happens when no dynamic loop is set up to pull rows from the table. Please see the solution here: [When I Use Data from Table, No Data is Being Pulled](https://docs.zerowork.io/using-zerowork/common-problems/when-i-use-data-from-table-no-data-is-being-pulled) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#video-tutorial-1-qualify-profiles-in-a-table-or-google-sheet) Video Tutorial 1: Qualify Profiles in a Table or Google Sheet ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#video-tutorial-2-use-update-data-to-transfer-data-from-one-table-to-another) Video Tutorial 2: Use Update Data to Transfer Data from One Table to Another [PreviousAbort Runchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/abort-run) [NextNumber Operationschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations) Last updated 1 year ago * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#faq) * [Video Tutorial 1: Qualify Profiles in a Table or Google Sheet](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#video-tutorial-1-qualify-profiles-in-a-table-or-google-sheet) * [Video Tutorial 2: Use Update Data to Transfer Data from One Table to Another](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data#video-tutorial-2-use-update-data-to-transfer-data-from-one-table-to-another) sun-brightdesktopmoon sun-brightdesktopmoon --- # Number Operations | ZeroWork The **Number Operations** building block allows you to perform various mathematical and formatting operations on numbers. If the value to apply the operation on is empty, the TaskBot will take no action and continue its run. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#add) **Add** Combine two numbers or concatenate two strings. * **Examples** * 1 + 1 ⟶ 2 * "hello" + " world" ⟶ "hello world" * **Use** **Case Example** * Add a counter to limit number of actions per TaskBot run. See example set-up: [Example: Use variable to limit number of DMs sent per run](https://docs.zerowork.io/using-zerowork/using-variables#example-use-variable-to-limit-number-of-dms-sent-per-run) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#subtract) **Subtract** Subtract one number from another. * **Example**: 5 - 3 ⟶ 2 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#multiply) **Multiply** Multiply two numbers. * **Example**: `4 * 3` ⟶ `12` * See a use case example here: [Example: Standardize different formats](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations/example-standardize-different-formats) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#divide) **Divide** Divide one number by another. * **Example**: 10 / 2 ⟶ 5 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#remainder) **Remainder %** Return the remainder after dividing one number by another. * Example: 13 % 5 ⟶ 3 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#round) **Round** Round a number to the nearest whole number. * **Example**: 2.6 ⟶ 3 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#round-up) **Round up** Round a number up to the nearest whole number. * **Example**: 2.2 ⟶ 3 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#round-down) **Round down** Round a number down to the nearest whole number. * **Example**: 2.7 ⟶ 2 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#get-random-number) **Get random number** Generate a random number within a specified range. If no minimum or maximum values are provided, the TaskBot will use the default values: 0 for the minimum and 1,000,000,000 for the maximum. * **Example**: Minimum 1, maximum 5 ⟶ 3.45 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#set-decimals) **Set decimals** Set the number of decimal places for a number. * **Example**: 2 decimals: 5 ⟶ 5.00, 5.5333 ⟶ 5.53 ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#remove-formatting) **Remove formatting** Remove formatting such as commas or dots in a number. If a number is used for arithmetic calculations (+, -, /, \*) or numeric comparisons (> or <), it is recommended to first convert it to a clean number for higher reliability. This is when this operation comes in handy. * **Examples** * 1.000.000,23 is dot-grouped and will be converted to 1000000.23 * 1,000,000.23 is comma-grouped and will be converted to 1000000.23 * 1,000.000.23 has wrong format and an error report will be generated * * * **Additional Notes** * If the value to perform the operation on (e.g., value to add to, number to round up) is not provided, the operation is skipped, and the TaskBot will continue without making changes. * For operations requiring two values (e.g., add, subtract), if the value to use is not provided, the operation is skipped, and the TaskBot will continue without making changes. * If the operation requires a valid number (any operation except _Add_) and the input is not a number, the TaskBot will generate an error report and stop the run. [PreviousUpdate Datachevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/update-data) [NextExample: Standardize different formatschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations/example-standardize-different-formats) Last updated 9 months ago * [Add](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#add) * [Subtract](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#subtract) * [Multiply](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#multiply) * [Divide](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#divide) * [Remainder %](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#remainder) * [Round](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#round) * [Round up](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#round-up) * [Round down](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#round-down) * [Get random number](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#get-random-number) * [Set decimals](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#set-decimals) * [Remove formatting](https://docs.zerowork.io/using-zerowork/using-building-blocks/number-operations#remove-formatting) sun-brightdesktopmoon sun-brightdesktopmoon --- # Sticky Notes | ZeroWork Sticky notes can be placed anywhere within the TaskBot builder area. To add one, click on the sticky note icon and drag it to where you want to place it. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fxt9pldYn5liZDLbW2EJD%252FScreenshot%25202024-02-13%2520at%252015.51.41.png%3Falt%3Dmedia%26token%3D87ca7ff9-43e0-4e6a-9d03-7e1fdb8915ed&width=768&dpr=3&quality=100&sign=b6fa176a&sv=2) Sticky notes can be used as clarifying notes, see below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZFsTdlrJfXnOBOJ2h4uD%252FScreenshot%25202024-02-13%2520at%252015.54.06.png%3Falt%3Dmedia%26token%3D3ed13f12-95db-4e56-a751-e8a69f27fc8d&width=768&dpr=3&quality=100&sign=eedeeb9e&sv=2) Or, they can be used for visual grouping, see below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FoBWpjzra8gxNxgWKyB6j%252FScreenshot_2024-01-31_at_13.12.36.png%3Falt%3Dmedia%26token%3Dc702960b-8596-43fc-a2ed-a439851f7263&width=768&dpr=3&quality=100&sign=6adf50fe&sv=2) [PreviousAuto-Alignchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align) [NextDelay Times between the Building Blockschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Delay Times between the Building Blocks | ZeroWork Delay times between the building blocks represent the amount of time that your TaskBot will wait between executing the building blocks. Some default times are set for some of the building blocks (such as _Open Link_ or _Insert Text or Data_). Instead, you can also use the [Delay](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) building block. circle-info Delay time that you enter into a building block always kicks in **after** the action took place. So if you need delay **before** a certain action, you need to make sure to add delay time to the **preceding** building block or use [Delay](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) building block. **Example**: When loading a website, it makes sense to increase the delay time to allow for the website to load properly. Otherwise, the TaskBot may not find the elements it needs on a website that is not loaded and thus abort the run if you don't add an appropriate delay. _**Picture:**_ _You can see that the delay time after Keyboard Action is set to 3 seconds to allow the website to process reload (R + CMD/CTRL + SHIFT is a shortcut for reloading the page)._ ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FFJ532aRx4u9yTbxK8bsz%252FScreenshot%25202023-11-20%2520at%252016.33.59.png%3Falt%3Dmedia%26token%3D1a626c2a-c169-4438-bffa-370114ac6d20&width=768&dpr=3&quality=100&sign=9c1467f4&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/delay-times-between-the-building-blocks#randomize-delay-time) Randomize Delay Time After you are done building your TaskBot, you can choose the option to randomize delay times between the building blocks when your TaskBot runs. Activate it only for TaskBots where you are trying to mimic human behavior, especially when trying to automate tasks on social media, and the like. Beware that once activated, the run time will significantly slow down (depending on your upper limit), since it will randomly add additional delay time. _**Picture:**_ _TaskBot will wait between 3 and 15 seconds after opening the website._ ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fzpb6kRvE5JHsywRQXRxl%252FScreenshot%25202023-11-20%2520at%252016.39.17.png%3Falt%3Dmedia%26token%3D5988db4b-2707-4952-aaf1-7b6c4fea73fe&width=768&dpr=3&quality=100&sign=7ec7bc14&sv=2) [PreviousSticky Noteschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/sticky-notes) [NextUsing Variableschevron-right](https://docs.zerowork.io/using-zerowork/using-variables) Last updated 4 months ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Auto-Align | ZeroWork Allows you to auto-align your workflow, top to bottom or left to right. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FQi2TgXurgx3DWZh9hjSi%252FScreenshot%25202023-11-23%2520at%252011.03.13.png%3Falt%3Dmedia%26token%3D3b74c506-24f6-4e80-ae26-11d1e9eeeb1c&width=300&dpr=3&quality=100&sign=597209cd&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align#before) Before ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FUvH9WuctZpafZtsmb21F%252FScreenshot%25202023-11-23%2520at%252011.01.20.png%3Falt%3Dmedia%26token%3Def939209-2c74-4d07-b1c9-943eb22497b8&width=768&dpr=3&quality=100&sign=e15ced99&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align#after-left-to-right) After (left to right) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FxugqfkI3yVMWeXDgNNe9%252FScreenshot%25202023-11-23%2520at%252011.01.36.png%3Falt%3Dmedia%26token%3D8c458847-e689-4a2f-8ea0-8d79950877d2&width=768&dpr=3&quality=100&sign=e7192082&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align#after-top-to-bottom) After (top to bottom) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fw6NsKYQHyovMdCOf9ndq%252FScreenshot%25202023-11-23%2520at%252011.02.25.png%3Falt%3Dmedia%26token%3Dfa4ff824-9188-435f-b376-c75d9d772483&width=768&dpr=3&quality=100&sign=a2af7f9c&sv=2) [PreviousShortcutschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/shortcuts) [NextSticky Noteschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/sticky-notes) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Shortcuts | ZeroWork **Mouse drag + SHIFT:** select multiple blocks. Selected blocks will be shown like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FXsKS2NC0KZcLmBggfXB2%252FScreenshot%25202024-09-11%2520at%252010.20.01.png%3Falt%3Dmedia%26token%3D3f9dea5e-c659-4568-9be1-419b20ded60b&width=768&dpr=3&quality=100&sign=ccf3fc37&sv=2) [PreviousDeactivate Building Blockschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks) [NextAuto-Alignchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/auto-align) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Local and Global State (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Store values for the **current run** (local state) or **across runs on the same Desktop Agent** (global state). Stays on this device; data is never sent to ZeroWork servers. **API** `zw.state.*`, `zw.globalState.*` Copy // @zw-run-locally // Local per-run state — cleared automatically when the run ends const runState = zw.state.access(); runState.runStartedAt = Date.now(); // Shared Desktop Agent global state — persists across runs on this device const globalState = zw.globalState.access(); globalState.totalRuns = (globalState.totalRuns ?? 0) + 1; Copy // In the browser — work with a JSON-safe snapshot of local or global state const runStateCopy = await zw.state.browser.getCopy(); runStateCopy.lastSeenAt = Date.now(); await zw.state.browser.commit({ state: runStateCopy }); * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-1.-local-per-run-state-zw.state) 1\. Local Per-Run State — `zw.state.*` A per-run scratchpad automatically initiated on run start. It is **deleted when the run ends**. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#at-a-glance) **At a Glance** * `zw.state.access()` → returns a **live mutable object** you can read and update anywhere in the run. It can hold anything (e.g., helpers, counters, functions, Maps, Playwright objects like pages or contexts, etc.). It's deleted automatically when the run ends. Not available in the browser (see [**Use state in the browser**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-3.-use-state-in-the-browser-zw.state.browser.-and-zw.globalstate.browser) further below). * async/sync\* `await zw.state.clear()` → clears the whole run state. \*`async` in browser, `sync` locally (see [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) ). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#examples) **Examples** **Add a type-safe validator and stringifier around zw.setRef()** **Counters or flags across multiple Write JS blocks in the same run** **Clear mid-run if needed** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-2.-global-state-zw.globalstate) 2\. Global State — `zw.globalState.*` A device-level scratchpad shared across runs on the same Desktop Agent. Persists between runs until the Desktop Agent quits or restarts. Use it when you need to reuse something across runs on one machine (e.g., cached data, a counter of all runs, etc.). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#at-a-glance-1) At a Glance * `zw.globalState.access()` → a **live mutable object** you can read and update across runs. It can hold anything. Not available in the browser (see [**Use state in the browser**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-3.-use-state-in-the-browser-zw.state.browser.-and-zw.globalstate.browser) further below). * async/sync\* `await zw.globalState.clear()` → clears the whole global state. \*`async` in browser, `sync` locally (see [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) ). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#example) **Example** **Track which TaskBots ran today (per device)** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#notes) **Notes** * It's **not durable** storage. It's **lost when the Desktop Agent quits or restarts**. For durable data use: * **Variables/tables** via `zw.getRef()` / `zw.setRef()` * **Device storage** via `zw.deviceStorage.*` * As long as the Desktop Agent isn't closed or restarted, global state is **not auto-cleaned**. Clear what you no longer need. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-3.-use-state-in-the-browser-zw.state.browser.-and-zw.globalstate.browser) 3\. Use State in the Browser — `zw.state.browser.*` and `zw.globalState.browser.*` In the browser you **cannot** use `*.access()`. Use **JSON-safe snapshots** instead. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#at-a-glance-2) **At a Glance** * async `await zw.state.browser.getCopy({ key?: string })` `await zw.globalState.browser.getCopy({ key?: string })` → returns the current state (or the section under `key`). * async `await zw.state.browser.commit({ state: any, key?: string })` `await zw.globalState.browser.commit({ state: any, key?: string })` → accepts any **serializable** (JSON-safe) value. If `key` is provided, only that section is updated. circle-info `key` is optional and lets you read/update just a section (safer, smaller payloads; no need to snapshot/commit the whole state if it’s large). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#examples-1) **Examples** **Whole snapshot** **Section-only snapshot with** `**key**` #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#notes-1) Notes * **JSON-safe only when using** `***.browser.getCopy()**` **or** `***.browser.commit()**`**.** Snapshots must be JSON-safe. Functions, Maps, circular references, and similar types cannot be serialized for browser use. If your state contains such values, use `key` to fetch only a JSON-safe section that you need in the browser. * **In-browser snapshot** **size limits.** Passing snapshots larger than **~3,000,000 characters** fails. If your state is large, use `key` to work with just a section. Serialization of smaller objects is also faster. * **In-browser calls require** `**await**`**.** In the browser, `*.browser.getCopy()`, `*.browser.commit()`, and `*.clear()` are async. * `***.browser.***` **scope is reserved for the browser only.** `zw.state.browser.*` is meant for the browser context. In local runs, just use `zw.state.access()` and make a copy yourself if needed: [PreviousWrite and Read Variables and Tableschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables) [NextDevice Storage (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming) Last updated 4 months ago * [1\. Local Per-Run State — zw.state.\*](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-1.-local-per-run-state-zw.state) * [2\. Global State — zw.globalState.\*](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-2.-global-state-zw.globalstate) * [3\. Use State in the Browser — zw.state.browser.\* and zw.globalState.browser.\*](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-3.-use-state-in-the-browser-zw.state.browser.-and-zw.globalstate.browser) sun-brightdesktopmoon Copy // @zw-run-locally zw.state.access().setRefSafely = ({ ref_id, name, value }, expectedType) => { if (typeof value !== expectedType) { throw new Error(`Value for ${name} is not ${expectedType}`); } const valueStr = typeof value === "string" ? value : (value === null || value === undefined) ? "" : JSON.stringify(value); zw.setRef({ ref_id, name, value: valueStr }); }; // Use the helper in later blocks within the same run zw.state.access().setRefSafely({ ref_id, name: "age", value: 42 }, "number"); Copy // @zw-run-locally const runState = zw.state.access(); runState.processed = (runState.processed ?? 0) + 1; await zw.log("processed", runState.processed); Copy await zw.state.clear(); Copy // @zw-run-locally const gs = zw.globalState.access(); const today = new Date().toISOString().slice(0, 10); // YYYY-MM-DD if (!gs.botsRanToday || gs.botsRanToday.date !== today) { gs.botsRanToday = { date: today, bots: [] }; } const taskbotInfo = await zw.getTaskbotInfo(); if (!gs.botsRanToday.bots.includes(taskbotInfo.id)) { gs.botsRanToday.bots.push(taskbotInfo.id); } Copy const stateCopy = await zw.state.browser.getCopy(); stateCopy.step = (stateCopy.step ?? 0) + 1; await zw.state.browser.commit({ state: stateCopy }); Copy const prefs = (await zw.state.browser.getCopy({ key: "prefs" })) ?? {}; prefs.theme = "dark"; await zw.state.browser.commit({ key: "prefs", state: prefs }); Copy // 🚫 Won't work const stateCopy = zw.state.browser.getCopy(); // missing await stateCopy.runData = {}; // throws because stateCopy is a Promise await zw.state.browser.commit({ state: stateCopy }); // this line never runs // ✅ Works const stateCopy = await zw.state.browser.getCopy(); stateCopy.runData = {}; await zw.state.browser.commit({ state: stateCopy }); Copy // @zw-run-locally const s = zw.state.access(); const shallowCopy = { ...s }; sun-brightdesktopmoon --- # Nested Loops - Handle Pagination | ZeroWork You can use another _Start Repeat_ building block inside of your loop. This is called nested loop (loop inside a loop). You can create as many nested loops within your main or other nested loops as you wish. Its primary use case is to handle pagination. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination#example-save-linkedin-profile-data-from-multiple-pages-handle-paginated-results) **Example**: Save LinkedIn profile data from multiple pages - handle paginated results Imagine you want to save a list of profiles from LinkedIn search results. LinkedIn usually shows 10 profiles per page. This is why you would need to set up a _Start Repeat_ building block with a repetition number of 10. See example set-up here: [Save Lists](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-web-element/save-lists) . But how do you make your TaskBot not just save 10 results from one page but go through, for example, 30 pages of results (making it a total of 300 collected profile links)? For this or any other paginated results, you need a nested loop. Here is the workflow set-up: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fh0kaKTgiAC4H3UiUzORV%252FScreenshot%25202023-11-23%2520at%252010.38.13.png%3Falt%3Dmedia%26token%3D32db6731-d6ea-43b3-b6e5-4a7235ba784d&width=768&dpr=3&quality=100&sign=ffdff9d5&sv=2) _Open Link_ opens the page where the list of profiles is displayed. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FxfjNmNdqiRmKax1VADYn%252Fspaces_g9LcR8XM7TGOzOCDGsCS_uploads_oc9No5Y6EBdErf4glTUQ_Screenshot%25202023-11-22%2520at%252017.webp%3Falt%3Dmedia%26token%3D971479c9-17cd-4d85-aef1-d5660b247735&width=768&dpr=3&quality=100&sign=ed3d9134&sv=2) Your main loop needs to loop through 30 pages. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FcESqOq0lsORe5QzjWzCg%252FScreenshot%25202023-11-23%2520at%252010.43.09.png%3Falt%3Dmedia%26token%3D82c22a83-79bb-4222-b05f-13f982f33eff&width=768&dpr=3&quality=100&sign=666b5390&sv=2) Your nested loop will loop through profiles and save them, 10 per page. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FzC9TUQU68Fhh3axRZvQE%252Fspaces_g9LcR8XM7TGOzOCDGsCS_uploads_nxkGq49PCC1CtEtu0mR6_Screenshot%25202023-11-22%2520at%252017.webp%3Falt%3Dmedia%26token%3Dc0819981-adfe-4827-8df7-cd04a711d56a&width=768&dpr=3&quality=100&sign=ea77a73f&sv=2) After your nested loop finishes saving 10 profiles, main loop continues via _After Repeat_ with the action _Click_. Action click will click on the button "Next" and thus paginate to the next page. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FvQ7NGJWs7DN5HUK8jlBo%252FScreenshot%25202023-11-23%2520at%252010.47.35.png%3Falt%3Dmedia%26token%3Df3ad3c5a-e393-4fc2-9500-ac2ada49e423&width=768&dpr=3&quality=100&sign=5dde96d1&sv=2) Let's summarize the learnings: * Loop is set up to repeat 30 times. This corresponds to the number of pages with search results on LinkedIn. * Within every repetition, your TaskBot enters the nested loop and saves 10 profiles. * After the nested loop is completed, the TaskBot continues (via [After Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat) ) with clicking "Next" button to go to the next page. Note that _After Repeat_ must be placed after the **nested** _Start Repeat_ block. * After that, the cycle repeats: Save 10 profiles, then click on "Next" - for 30 times. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/nested-loops-handle-pagination#video-tutorial) Video Tutorial [PreviousAuto-Continue from Last Row or Elementchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat/auto-continue-from-last-row-or-element) [NextAfter Repeatchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/after-repeat) Last updated 1 year ago sun-brightdesktopmoon sun-brightdesktopmoon --- # Upload File | ZeroWork The **Upload File** building block allows TaskBot to upload files from either a direct file URL or a local folder on your computer. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#step-1-trigger-the-upload-action) Step 1: Trigger the Upload Action Before using the **Upload File** building block, ensure that the upload action is initiated. Typically, you’ll need to add a building block that clicks the upload button, as shown below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FGNV20XHKQC8VFNAQtkTm%252FScreenshot%25202023-11-21%2520at%252014.28.59.png%3Falt%3Dmedia%26token%3Dff8347f8-e00a-4f9b-b997-b83e53b43ba7&width=768&dpr=3&quality=100&sign=53afb6c7&sv=2) circle-exclamation The system dialog to select files (file chooser) **will not be visible** to you if you watch your TaskBot run. Your TaskBot will handle it 'behind the scenes'. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#step-2-select-file-source-option) Step 2: Select File Source Option Choose where TaskBot should get the file from. Select one of the following options: 1. **From file URL** If you have a direct URL for the file, enter it in the provided field. This option allows TaskBot to fetch the file from an online source directly. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FCUNrmQhJTooPREI8RT3A%252FScreenshot%25202024-10-29%2520at%252006.42.42.png%3Falt%3Dmedia%26token%3Dab2aca5f-97a9-48f0-8a73-6be4d84bcfcb&width=768&dpr=3&quality=100&sign=3ea7b416&sv=2) 1. **From folder path** Use this option to upload a file from your local machine. Enter the full file path. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FDijQcXhdV0YCdqnuwOfr%252FScreenshot%25202024-10-29%2520at%252006.43.22.png%3Falt%3Dmedia%26token%3D945a2404-be78-48c0-a6e7-4bdea2b3b579&width=768&dpr=3&quality=100&sign=6b1744c2&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#faq) FAQ #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#how-do-i-get-folder-path) How do I get folder path? Here are instructions for Mac, Windows and Linux. 1. On Mac * Select a folder and perform a **right-click**. * When the context menu appears, hold the **Option** key on the keyboard. * **Copy “File-name” as Pathname** option will appear in the context menu. Click it to copy the full file path to the clipboard. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FYry2A4Y1hwQweRDiLwwD%252Fhow%2520to%2520find%2520file%2520path%2520on%2520Mac%2520_1706535381.avif%3Falt%3Dmedia%26token%3D14536a0d-bcf4-418e-82f7-a7198ad5136f&width=768&dpr=3&quality=100&sign=58475000&sv=2) 1. On Windows * Open **File Explorer** and navigate to the folder you want. * Click once in the **address bar** at the top of the File Explorer window. This will show the full path as text. * Right-click the highlighted path and select **Copy**. You can then paste this path wherever you need. 1. On Linux * Open the file manager (e.g., Nautilus for GNOME, Dolphin for KDE). * Navigate to the file you want to use. * Right-click the folder, select **Properties** or **Get Info**, and copy the **Location** or **Path** shown in the details. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#is-there-a-way-to-add-the-file-manually) Is there a way to add the file manually? You can add a file column or variable and upload your file to it. Select option _Upload from file URL_ in the Upload File building block to reference to that file column or variable. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FZM4xcAD3qqPsWZUqwYuf%252FScreenshot%25202023-11-21%2520at%252014.24.44.png%3Falt%3Dmedia%26token%3D2d0081fa-6e5f-497e-ad8f-b687942ce591&width=768&dpr=3&quality=100&sign=82e35242&sv=2) [PreviousSave Filechevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file) [NextDelaychevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/delay) Last updated 1 year ago * [Step 1: Trigger the Upload Action](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#step-1-trigger-the-upload-action) * [Step 2: Select File Source Option](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#step-2-select-file-source-option) * [FAQ](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#faq) sun-brightdesktopmoon sun-brightdesktopmoon --- # Ask ChatGPT | ZeroWork This action gets an answer from ChatGPT for your prompt. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#example-input) Example input ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FJpzLJZ40CPBqMdxbQUbo%252FScreenshot%25202023-12-18%2520at%252015.58.32.png%3Falt%3Dmedia%26token%3D5acf237d-d29e-4171-a4bd-a12cdfbc78cb&width=768&dpr=3&quality=100&sign=83fe684b&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#getting-api-key) Getting API Key If you see the warning message shown below, it means that you haven't added your OpenAI key. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F63e58Ngs8EtFSznCkP8x%252FScreenshot%25202023-12-18%2520at%252016.01.00.png%3Falt%3Dmedia%26token%3D386ac37e-dba3-4b31-9335-5735b49ea003&width=768&dpr=3&quality=100&sign=5669f84d&sv=2) This is how you can add it. **Step 1:** Log in to your ChatGPT / OpenAI account at [openai.comarrow-up-right](https://openai.com/) . **Step 2:** Open [https://platform.openai.com/api-keysarrow-up-right](https://platform.openai.com/api-keys) . **Step 3:** Create an API key or copy an existing one. **Step 4**: Open your settings ([https://creator.zerowork.io/settings?tab=1arrow-up-right](https://creator.zerowork.io/settings?tab=1) ). **Step 5**: Add your key here: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FvCz7O0ufQ7SbqKXABFkV%252FScreenshot%25202024-03-13%2520at%252016.38.18.png%3Falt%3Dmedia%26token%3Da86fa603-c850-4976-946f-58cba94555a7&width=768&dpr=3&quality=100&sign=a1727e81&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#customize-behavior-on-error) Customize Behavior on Error Per default, if OpenAI returns an error, your TaskBot will stop its run (or break the current loop, if the error happens inside a loop). You can customize this behavior. **Note**: Some errors - missing prompt, wrong model id and invalid api key - will terminate TaskBot (loop) run, even if you selected continue option. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#how-to-customize-behavior-on-error) How to customize behavior on error **Example set-up** Imagine you asked ChatGPT to create a very long blog article, so that ChatGPT hits its capacity limit and returns a truncated response (you can learn more about truncated responses below). Truncated responses are categorized as errors, so per default TaskBot would stop its run. However, you would like to still save the response - and if it's truncated, you want to save it as a draft. **Step 1: Change default setting for behavior on error** Click on the settings gear in _Ask ChatGPT_ building block. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FSMeWHGwmAKbJrFPwRcwB%252FScreenshot%25202023-12-18%2520at%252016.12.25%2520%283%29.png%3Falt%3Dmedia%26token%3Dab67988e-ecb5-49c5-8923-90d7b6c04353&width=768&dpr=3&quality=100&sign=d72f840a&sv=2) Then select the option to continue run and record error code. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FDOSEgoUAMCSmbRZ4ooiY%252FScreenshot%25202023-12-18%2520at%252016.12.00.png%3Falt%3Dmedia%26token%3D20d6b128-f1e9-49ce-9468-51a6bd59ddf5&width=768&dpr=3&quality=100&sign=5d820d97&sv=2) **Step 2: Add conditions** Now you can add a condition that checks if the variable "OpenAI error" contains "length" ("length" is the error code for truncated responses). If it contains "length", then you can make your TaskBot proceed with saving the response as a draft. At the same time, you can also add a second condition which checks if response does not contain the word "length", in which case you can continue with a different path. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FYcDL2EI7y13y01wRe0Zi%252FScreenshot%25202023-12-18%2520at%252016.17.09.png%3Falt%3Dmedia%26token%3D47bc62a0-7072-4c99-8473-8cb585b8e929&width=768&dpr=3&quality=100&sign=46c300b9&sv=2) The error status (if any), error code (if provided) and error message (if provided) will be saved to a variable or column, like so: "Status: 400, code: context\_length\_exceeded, message: This model's maximum context length is 4097 tokens. However, you requested 200017 tokens (17 in the messages, 200000 in the completion). Please reduce the length of the messages or completion.". For truncated responses, the error will be recorded as "length". Here is a list of errors that OpenAI can return: [https://platform.openai.com/docs/guides/error-codes/api-errorsarrow-up-right](https://platform.openai.com/docs/guides/error-codes/api-errors) . ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#why-responses-can-get-truncated) Why Responses Can Get Truncated Every ChatGPT model has a character limit. In ChatGPT, characters are calculated in tokens. So every model has a token limit. For example, for ChatGPT-4, it's 8090, which corresponds to approx. 32,000 characters in English language. If your prompt asks ChatGPT to generate an answer of more characters than its capacity allows, the responses can get truncated. For example, this prompt "Write an article about marketing of more than 50 000 characters" is likely to result in a truncation error. This can also happen when you use the advanced prompt option called "Max token length" and enter a number that is too low. Truncation can also happen when your prompt is too long. This is because ChatGPT token limit is shared between the prompt and the answer. For example, this prompt "Here is an article about marketing: \[...pasting an article of more than 50,000 characters...\]. Generate a similar one." will result in a truncation error. To avoid this particular problem, you can shorten the length of the dynamic part of your prompt, see section below where an example set-up is shown. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#token-cost-and-saving-strategies) Token Cost and Saving Strategies Here is the official price per token page: [https://openai.com/pricingarrow-up-right](https://openai.com/pricing) . #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#check-token-consumption-in-your-taskbot-run-reports) **Check token consumption in your TaskBot run reports** After your TaskBot finishes its run, it will record how many tokens were consumed in your report logs for every request made. Simply open your TaskBot run reports and scroll to the log results of _Ask ChatGPT_ building block. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FSVSh3voObDlJtSMG2S6n%252FScreenshot%25202023-12-18%2520at%252016.56.30.png%3Falt%3Dmedia%26token%3D287416bd-9b1b-443e-8d6f-c52f6b0a4d74&width=768&dpr=3&quality=100&sign=317944a2&sv=2) This is how the amount of spent tokens is displayed in the log message: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FzlOfZiBNEWAQEqP1qVgT%252FScreenshot%25202024-04-03%2520at%252013.38.43.png%3Falt%3Dmedia%26token%3D1443a09e-389b-4bf3-b8a2-b526f46e5868&width=768&dpr=3&quality=100&sign=e19577fb&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#shorten-dynamic-prompt) Shorten dynamic prompt You can use [Shorten Content Length](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data/shorten-content-length) action in _Format Data_ building block in order to shorten dynamic content in your prompt. Let's take a look at an example. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#example-set-up) Example set-up Imagine that you built a TaskBot that collects social media posts and then asks ChatGPT to generate auto-comments to those posts. Consider this prompt: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FmXHr7NUULqU667dLHdqJ%252FScreenshot%25202023-12-18%2520at%252017.00.28.png%3Falt%3Dmedia%26token%3D729968f1-a3f3-458f-9b3a-c6130ffa6d35&width=768&dpr=3&quality=100&sign=ef90ffc3&sv=2) You can see that the length in the column "Scraped Post Content" can greatly vary. It's possible that someone shared a very long post of over 1,000 characters. This will consume an unnecessary large amount of your tokens. A token-saving strategy can be to shorten the post content. This is how you can do it. **Step 1**: After having collected the post, use _Format Data_ building block to shorten its content to 150 characters (or whatever number you consider adequate). ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F7SyqBv5F6c2io5OakXgZ%252FScreenshot%25202023-12-18%2520at%252017.05.28.png%3Falt%3Dmedia%26token%3Defb5be37-bcef-47e1-9f01-60fcfd0b5241&width=768&dpr=3&quality=100&sign=e99a582f&sv=2) **Step 2**: To avoid that ChatGPT assumes that we are asking it to complete an incomplete post, let's add a clarification to the prompt, like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FiliFxxbExTYgtQ2nRtsb%252FScreenshot%25202023-12-18%2520at%252017.07.27.png%3Falt%3Dmedia%26token%3D5bac67f0-822c-42f0-bd7b-f99d545ac163&width=768&dpr=3&quality=100&sign=dd396435&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#video-tutorial) Video Tutorial [PreviousDelete Datachevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/delete-data) [NextSend Notificationchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification) Last updated 10 months ago * [Getting API Key](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#getting-api-key) * [Customize Behavior on Error](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#customize-behavior-on-error) * [Why Responses Can Get Truncated](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#why-responses-can-get-truncated) * [Token Cost and Saving Strategies](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#token-cost-and-saving-strategies) * [Video Tutorial](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt#video-tutorial) sun-brightdesktopmoon sun-brightdesktopmoon --- # Save File | ZeroWork With the **Save File** building block, you can save file urls or download files. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#file-source) File Source Start by choosing where to get the file from. These are the options: 1. **From file URL**: Use this option if you have a direct URL to the file you want to save. 2. **From download action**: This is when your TaskBot performs an action that initiates file download (like clicking a download button). Let’s go over each option in detail. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#option-1-from-file-url) Option 1: From file URL 1. **Enter file URL**: Provide the direct URL to the file. Here is an example of a valid file URL: [https://wallpaperaccess.com/full/2656.jpgarrow-up-right](https://wallpaperaccess.com/full/2656.jpg) . 2. **Save file to folder**: Enter the folder path where you want the file saved. You can make your TaskBot rename the file in _File options_. This is how to get the folder path: [How do I get folder path?](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#how-do-i-get-folder-path) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FbzpMfe9s0QOQG0tcjou4%252FScreenshot%25202024-10-29%2520at%252005.51.47.png%3Falt%3Dmedia%26token%3D412c4522-28b3-4c56-b28c-10cb1ac861be&width=768&dpr=3&quality=100&sign=8c09b0be&sv=2) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#option-2-from-download-action) Option 2: From download action 1. **Initiate download**: Ensure your TaskBot is set up to first click a download button or take any necessary steps to initiate the download. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F8MWimMJjv4lcQcNYxQ26%252FScreenshot%25202023-11-21%2520at%252014.35.34.png%3Falt%3Dmedia%26token%3Dd4f56aba-3e72-4d7d-a7ec-826001fb14f5&width=768&dpr=3&quality=100&sign=f35b4f05&sv=2) circle-exclamation The system dialog to select folder to save the file to **will not be visible** to you if you watch your TaskBot run. Your TaskBot will handle it 'behind the scenes'. 1. **Saving Options** (choose one or both): * **Save file URL to a variable or table**: Select a variable or table to store the file URL from the download action. This can be useful if you want to reuse the file URL in another part of your workflow. For example, you can then use [Upload File](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file) building block and reference to the file URL to get the file from for the upload. * **Save file to local folder**: Enter the folder path to save the file locally. You can make your TaskBot rename the file in _File options_. This is how to get the folder path: [How do I get folder path?](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file#how-do-i-get-folder-path) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FsEAxCL7adXVotcPvVPxt%252FScreenshot%25202024-10-29%2520at%252006.06.48.png%3Falt%3Dmedia%26token%3Df689e4a7-523c-48fc-a13a-7bf89e947723&width=768&dpr=3&quality=100&sign=68c0b3f4&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#file-options) File Options When downloading files to you local folder, you can use **File options** to configure your preferences. * **Make file name unique on conflict**: Toggle this option if you want to avoid overwriting files with the same name. Whenever there is a file with the same name, your TaskBot will add a random ID to the end of the file name to make it unique (e.g., `file_name_6354736148.png`). If left untoggled, files with the same name in the folder will be overwritten. * **File name** (optional): Enter a custom file name if you want to rename the downloaded file. If there is already a file with the same name in your folder, then your TaskBot will either make the file name unique or overwrite the file depending on whether or not you toggled the option _Make file name unique_, as described above. * **Save full file path** (optional): Save the full path of the downloaded file, including the file name, to a table or variable. This can be useful if you want to reuse the file in the [Upload File](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file) building block which can get the file from your folder in order to upload it. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fb8WgGTQ6yKdlGoQxrhpo%252FScreenshot%25202024-10-29%2520at%252006.14.40.png%3Falt%3Dmedia%26token%3Dbe9013df-cab6-416f-ac05-41a36082e51e&width=768&dpr=3&quality=100&sign=ad020065&sv=2) * * * triangle-exclamation **Note**: You can only save your file url or file path to a standard column / variable and cannot save it to a **file** column or variable. This is because _Save File_ building block only saves the url or the path to the file whereas the **file** column or variable expects the 'real' file. [PreviousMetadata (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming) [NextUpload Filechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/upload-file) Last updated 1 year ago * [File Source](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#file-source) * [File Options](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file#file-options) sun-brightdesktopmoon sun-brightdesktopmoon --- # Device Storage (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Persist key–value data on this device. Survives Desktop Agent restarts, uninstalls, and reinstalls. Stays on this device; data is never sent to ZeroWork servers. **API** `zw.deviceStorage.*` Copy const credentials = { username: await zw.deviceStorage.get("username_salesforce"), password: await zw.deviceStorage.get("password_salesforce"), }; await zw.deviceStorage.set("last_login_salesforce", String(Date.now())); * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming#at-a-glance) At a Glance * async `await zw.deviceStorage.get(key: string)` → returns the `string` value for the key, or `undefined` if not set. * async `await zw.deviceStorage.set(key: string, value: string)` → saves a `string` value under the key. * async `await zw.deviceStorage.remove(key: string)` → removes the key and its value from device storage. * async `await zw.deviceStorage.has(key: string)` → returns `true` if the key exists, otherwise `false`. * async `await zw.deviceStorage.getAll()` → returns an object of key–value pairs `{ [key: string]: string }`. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming#adding-secrets) **Adding Secrets** For passwords, API tokens, and other sensitive values, add them in the Desktop Agent UI instead of saving them as plain text in the **Write JS** building block using `zw.deviceStorage.set()`. (Reading a value with `zw.deviceStorage.get()` is safe.) To add a secret: 1. Open the Desktop Agent. 2. Select **Device storage** from the tray menu. 3. Click **Add key**, then save your value. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FmYCLdaNReWu0Vpw5U0oo%252FCleanShot%25202026-01-04%2520at%252014.19.19.png%3Falt%3Dmedia%26token%3D5c636ccb-0835-48ad-bd8e-3a86ff93b86a&width=768&dpr=3&quality=100&sign=e70fc52e&sv=2) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming#examples) **Examples** **Check if value is present and set if not** **Securely log in with credentials stored only locally** **Clear device storage** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming#saving-non-string-values) Saving Non-String Values Device storage only accepts strings. You can **stringify on write** and **parse on read** if you want to work with other types. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming#logging-secrets) **Logging Secrets** If you need to log sensitive values (like passwords or API tokens), use `zw.logTemp()` instead of `zw.log()`. `zw.logTemp()` shows the value in the live run logs, but it is **not** saved to TaskBot run reports. ⚠️ Avoid using `zw.deviceStorage.get()` to read secrets via [Code in Inputs](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs#code-in-inputs) in no-code building blocks. Many building blocks auto-log values, and those logs are saved to TaskBot run reports. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming#notes) Notes * **Size limits.** Total device storage is limited to **~3,000,000 characters**. Writes that would exceed the total limit will throw an error. * **Always use** `**await**`**.** All methods in `zw.deviceStorage.*` are async, whether the code runs locally or in the browser. [PreviousLocal and Global State (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming) [NextUtilities (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming) Last updated 1 month ago sun-brightdesktopmoon Copy if (!(await zw.deviceStorage.has("machine_id"))) { await zw.deviceStorage.set("machine_id", "M1234"); } Copy // @zw-run-locally const credentials = { username: await zw.deviceStorage.get("username_salesforce"), password: await zw.deviceStorage.get("password_salesforce"), }; // Get the active page and enter credentials programmatically // Alternatively, use zw.deviceStorage.* directly in no-code blocks const page = await zw.browserContext.getActivePage(); await page.goto("https://login.salesforce.com/"); await page.type("#username", credentials.username); await page.type("#password", credentials.password); Copy // Get an object mapping keys to string values const all = await zw.deviceStorage.getAll(); await zw.log("deviceStorage keys", Object.keys(all)); const keys = Object.keys(all); for (const key of keys) { await zw.deviceStorage.remove(key); } Copy // Save an object (stringify on write) const runMeta = { machineId: "M1234", lastRunAt: Date.now(), lastProcessedInvoiceId: "INV-2026-00127", }; await zw.deviceStorage.set("billing_bot_state", JSON.stringify(runMeta)); // Read it back (parse on read) const raw = await zw.deviceStorage.get("billing_bot_state"); const parsed = raw ? JSON.parse(raw) : null; Copy const secret = await zw.deviceStorage.get("some_secret"); // ✅ Good: Visible in live logs only (not saved to run reports) await zw.logTemp(secret); // 🚫 Avoid: Saved to TaskBot run reports await zw.log(secret); Copy // 🚫 Won't work const someValue = zw.deviceStorage.get("someKey"); // missing await // ✅ Works const someValue = await zw.deviceStorage.get("someKey"); sun-brightdesktopmoon --- # Deactivate Building Blocks | ZeroWork You can use _Deactivate_ option when you right-click on the selected building blocks. Your TaskBot will then skip the deactivated blocks when it runs. You can activate the building blocks at any time by right-clicking on _Activate_. To activate or deactivate multiple building blocks at the same time, click **Shift** and drag with the mouse, followed by right-clicking. To select multiple individual building blocks, click **CMD** (Mac) or **Ctrl** (Windows) + mouse click. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fz0U8ggT6G6qtDm46E9PK%252FScreenshot%25202023-11-21%2520at%252010.17.53.png%3Falt%3Dmedia%26token%3Da188f6ae-106b-460e-bf6a-1b8b6249250d&width=768&dpr=3&quality=100&sign=fa7363f3&sv=2) After deactivating, the building blocks will be marked grey. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FyAOKOrqV4rBqxm4lwgJX%252FScreenshot%25202023-11-21%2520at%252010.23.52.png%3Falt%3Dmedia%26token%3D9769fae5-8ad8-4f1e-aefa-b8fbf2ce6216&width=768&dpr=3&quality=100&sign=769ed27d&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#skip-entire-sequences) Skip Entire Sequences By disconnecting a chunk of the workflow and deactivating its **first** building block, you can skip entire sections of your workflow. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FQJ9HwMgVUKyiK7dX1uUO%252FScreenshot%25202023-11-21%2520at%252010.26.43.png%3Falt%3Dmedia%26token%3Db254d4c0-7027-493b-98d3-90123769027d&width=768&dpr=3&quality=100&sign=b3ba528e&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#skip-loop) Skip Loop By deactivating _Start Repeat_ block, you can skip the entire loop sequence. The TaskBot will directly continue along the path after the _After Repeat_ building block. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F23pAoqrowhqPjQScfvHW%252FScreenshot%25202023-11-21%2520at%252010.29.25.png%3Falt%3Dmedia%26token%3Db2e5b954-7abc-4e9c-8d33-b68efcd79ce3&width=768&dpr=3&quality=100&sign=77441c42&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#skip-try-catch) Skip Try-Catch By deactivating _Start Try-Catch_ block, you can skip the entire sequence of building blocks inside the try-catch scope. The TaskBot will directly continue along the path after the _After Try-Catch_ building block. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#special-case-conditional-paths) Special Case: Conditional Paths If you deactivated a conditional building block and its conditions (as shown below), your TaskBot cannot know which path to continue. In this scenario, the next building block will be picked **randomly.** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FpBnyLWQgf6BFDUVtd5rj%252FScreenshot%25202024-01-12%2520at%252014.08.12.png%3Falt%3Dmedia%26token%3D5a4de94a-16e0-47aa-82c3-27b59f5c0fc3&width=768&dpr=3&quality=100&sign=3dbd2960&sv=2) [PreviousBuilding Block Optionschevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options) [NextShortcutschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/shortcuts) Last updated 9 months ago * [Skip Entire Sequences](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#skip-entire-sequences) * [Skip Loop](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#skip-loop) * [Skip Try-Catch](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#skip-try-catch) * [Special Case: Conditional Paths](https://docs.zerowork.io/using-zerowork/using-building-blocks/building-block-options/deactivate-building-blocks#special-case-conditional-paths) sun-brightdesktopmoon sun-brightdesktopmoon --- # APIs: Send HTTP Request | ZeroWork This actions makes API requests in your workflow. To explain how to use it, we will go over a specific example in which we send an API request to open.ai to get answers to questions saved in a table. In this example, open.ai is used to let AI generate answers to pre-defined questions. circle-info **Note:** The example with open.ai is simply used for demonstration purposes in order to show how to make custom API calls. If you really need to send a request to open.ai, simply use [Ask ChatGPT](https://docs.zerowork.io/using-zerowork/using-building-blocks/ask-chatgpt) building block which conveniently contains all the configuration options you need. Normally, you **do not need** to use _Send HTTP Request_ building block for interacting with open.ai. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#example-openai-final-set-up) Example: OpenAI Final Set-up In the picture, you can see the final set-up you need to do, and we will go over each option in more detail below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fdwu1ucmkxj7aV4ysy2UY%252FScreenshot%25202023-11-21%2520at%252015.05.44.png%3Falt%3Dmedia%26token%3D4d14c6b5-1baf-49d3-8126-d25148a74b19&width=768&dpr=3&quality=100&sign=dc589144&sv=2) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F1BwvfeMieqpfeYbQHIkb%252FScreenshot%25202023-11-21%2520at%252015.06.07.png%3Falt%3Dmedia%26token%3Df54805b1-7af0-4835-b5b3-d8de324884de&width=768&dpr=3&quality=100&sign=37ea1f30&sv=2) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FdSq6y5oV4cwTjK11dZrj%252FScreenshot%25202023-11-21%2520at%252015.06.25.png%3Falt%3Dmedia%26token%3Dc74dc256-ac55-4745-b0f0-8e9bad31d862&width=768&dpr=3&quality=100&sign=4852ceab&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#select-method) Select method Here you can select different methods (PUT, POST, GET, PATCH, etc.) to create your specific API request. In the example of open.ai, we need to select POST. To determine what method you need to use, you need to check the documentation or a tutorial page of the API that you are using. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fdz21Xi7mmWAb5XkuXNmo%252FScreenshot%25202023-06-16%2520at%252015.16.06.png%3Falt%3Dmedia%26token%3Df852c343-6cd9-4ad3-a74d-ce2082ee7718&width=768&dpr=3&quality=100&sign=10f1fedd&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#url) URL Insert the url that you want to call. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuCoAZzUI75RZHHNoR1ry%252FScreenshot%25202023-06-16%2520at%252015.20.06.png%3Falt%3Dmedia%26token%3D6d70f7a8-356d-4da0-acb6-38a2d1ee9e14&width=768&dpr=3&quality=100&sign=8395798&sv=2) triangle-exclamation Beware that some request URLs require slash at the end and some don't. If you add an unnecessary slash, you request may not go through. You can add dynamic data from tables as well. Let's diverge from open.ai for a moment and take another example: Imagine you need to identify a likely age group that your lead or prospect belongs to. For that, you can call agify api. The api url is [https://api.agify.io?name=michael.arrow-up-right](https://api.agify.io/?name=michael) As you can see, the name "michael" is dynamic and so you can simply replace that by a table reference. This way in every loop iteration, your TaskBot will make a request with a different name. [arrow-up-right](https://api.genderize.io/?name=peter) ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FzNYY8m3hNLvgVmoMWGrQ%252FScreenshot%25202023-06-16%2520at%252015.19.06.png%3Falt%3Dmedia%26token%3D0d013438-fc92-4d3c-981b-1821003369a4&width=768&dpr=3&quality=100&sign=fd2b2e27&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#headers) **Headers** You need to check the requirements of your API what headers you need to add. Often, authorization header is required. For example, in open.ai, you would need to add these two headers: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FF73qUy60F4REEnc1z8Jb%252FScreenshot%25202023-06-16%2520at%252015.22.50.png%3Falt%3Dmedia%26token%3Dab0cd230-7837-4b0d-a201-79a7aff5ec69&width=768&dpr=3&quality=100&sign=82c07fc&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#body) **Body** You need to check the requirements of your API if you need to add any body. In open.ai, you would likely need to add the question that you want to get the answer to in your body, and so it would look like this: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fu5kGfUsuu1vG51nC9Tph%252FScreenshot%25202023-11-21%2520at%252015.10.20.png%3Falt%3Dmedia%26token%3D78a0a37e-f41c-4295-9064-8835395bee5a&width=768&dpr=3&quality=100&sign=b63478a6&sv=2) Note that the body includes a table reference, as you might want to iterate over a list of questions or get the question dynamically from a different source. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#save-data-from-response) Save Data from Response Before you hit RUN to call the API, you need to create a table with matching columns. In a moment, you will learn how column matching with API's response keys is done. For now, make sure to create an empty table or use an existing one and then select it in the dropdown _Save response body_, as shown below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F7f23b2AMdttbOuhKgnuf%252FScreenshot%25202023-06-16%2520at%252015.27.42.png%3Falt%3Dmedia%26token%3Da46ca354-d3fe-4077-b3af-320871598365&width=768&dpr=3&quality=100&sign=6845decd&sv=2) In case that you do not need to save response - for example, because it's a patch request where you do not expect to receive any response - simply leave that dropdown empty. In the open.ai example, we want to save the answer and this is why we need to create and select a table (in this example called "Answers"). ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#column-matching-and-record-path) Column Matching and Record Path Your TaskBot will automatically match data from keys to your columns, unless there are nested key-value pairs. For now, let's leave nested key-value pairs aside (we'll get to it in a moment) and assume that your API call returns a simple response with keys on the same level without any nested values like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FUl6Wo78uVgr7nSYVkt0d%252FScreenshot%25202023-01-31%2520at%252017.59.54.png%3Falt%3Dmedia%26token%3D5d2589b8-a303-4910-9f43-f9393ff3962f&width=768&dpr=3&quality=100&sign=c12a665c&sv=2) In this case, you need to create a table that contains columns that you want to save response to, like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FMdNgHqTJYZzPeLubYyCP%252FScreenshot%25202023-01-31%2520at%252018.02.25.png%3Falt%3Dmedia%26token%3Dca2f2e51-0f99-43fc-8b1b-d5e5030a9a64&width=768&dpr=3&quality=100&sign=fefc1b7&sv=2) Note that this table only contains _name_ and _age_ but it doesn't contain _count_. This is because you are flexible on what keys to save. So if your table contains columns that are **not** part of the keys in the API response or, like in the example above, does not contain some keys that **are** part of the API response, those will simply be ignored. In other words, you can add _count_ if you want or you can omit it if that piece of data does not need to be saved. After hitting RUN, this is how the data will be populated: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F4y8HrlVzs6i7RNfX17d7%252FScreenshot%25202023-01-31%2520at%252018.06.05.png%3Falt%3Dmedia%26token%3D260d132a-605b-498c-bdec-2d935cf579b9&width=768&dpr=3&quality=100&sign=fc036472&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#nested-key-values-and-record-path) **Nested key-values and record path** Let's get back to the open.ai example. Sample response from open.ai looks like this: In this case, we have non-nested and nested values. So if you wanted to save _id_, _object_, _created_ and _model,_ you would simply create a table with columns named exactly like that, as explained in the example above. But for those key-values that are nested, we need to create a record path like so: `choices[0]['text']` Any value inside a list marked by square brackets needs to be accessed with numbers where 0 corresponds to the first item, 1 to the second, etc. placed into square brackets. Any value inside a nested object marked by braces needs to be accessed with its key placed into square brackets. This record path has to be added extra to the building block like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fp9iEqrgwNagL6BCe1xCC%252FScreenshot%25202023-11-21%2520at%252015.16.05.png%3Falt%3Dmedia%26token%3Decf01bb9-a854-4079-a075-fca20b06efb6&width=768&dpr=3&quality=100&sign=95cec37a&sv=2) The nested path also needs to be added as a column name to the table: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FRGjseY2BGBJ5DgeV0wJH%252FScreenshot%25202023-01-31%2520at%252018.19.38.png%3Falt%3Dmedia%26token%3D63e7486b-7aee-4c72-b3b8-1061ab01baa5&width=768&dpr=3&quality=100&sign=636a7dff&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#save-status-response) Save Status Response You can save the response code to a table. This allows you to recognise errors in the workflow for 400 or 500 codes, so that your TaskBot can handle them accordingly. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FK7sCn8ogpSd189gWKvmQ%252FScreenshot%25202023-06-16%2520at%252015.32.47.png%3Falt%3Dmedia%26token%3D7213e085-deac-405b-823b-47bb2c90f05b&width=768&dpr=3&quality=100&sign=da2d18e1&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#example-break-loop-if-status-request-is-unsuccessful) Example: Break loop if status request is unsuccessful A typical example would be to break the loop in case the status is not equal 200 (200 means success) as shown here: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FTLOljx0gQiAcE6Q6eHSe%252FScreenshot%25202023-11-21%2520at%252015.17.55.png%3Falt%3Dmedia%26token%3D16659e83-16a8-4469-a8a4-adfe6b52735f&width=768&dpr=3&quality=100&sign=b22d51c4&sv=2) ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#invalid-json-body-error) Invalid JSON Body Error Beware that json format does not accept double quotes inside the double quotes. See example below. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252F6SG06W3O9YL15b1wu5b3%252FScreenshot%25202023-06-16%2520at%252015.36.31.png%3Falt%3Dmedia%26token%3Db0edbea0-eaac-47b6-8032-3e67bef9bf72&width=768&dpr=3&quality=100&sign=4ccf7443&sv=2) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#remove-double-quotes-from-dynamic-data) Remove double quotes from dynamic data Since you may be getting this data dynamically from a website or from a user input (in case you use parameters or table references), you may want to first replace double quotes by single quotes using [Format Data](https://docs.zerowork.io/using-zerowork/using-building-blocks/format-data) building block and selection the option **Replace text**, as shown below: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FsvOpZmx5tlpHhGPNakTr%252FScreenshot%25202025-01-02%2520at%252008.37.04.png%3Falt%3Dmedia%26token%3D7a9c6c6c-5b6a-40cd-b017-c251e684a493&width=768&dpr=3&quality=100&sign=40489cb0&sv=2) [PreviousSend Notificationchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/send-notification) [NextWrite JavaScriptchevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript) Last updated 1 year ago * [Example: OpenAI Final Set-up](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#example-openai-final-set-up) * [Select method](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#select-method) * [URL](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#url) * [Headers](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#headers) * [Body](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#body) * [Save Data from Response](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#save-data-from-response) * [Column Matching and Record Path](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#column-matching-and-record-path) * [Save Status Response](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#save-status-response) * [Invalid JSON Body Error](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request#invalid-json-body-error) sun-brightdesktopmoon Copy { "id": "cmpl-GERzeJQ4lvqPk8SkZu4XMIuR", "object": "text_completion", "created": 1586839808, "model": "text-davinci:003", "choices": [\ {\ "text": “THIS IS THE ANSWER TO THE QUESTION THAT WE WANT TO SAVE"\ "index": 0,\ "logprobs": null,\ "finish_reason": "length"\ }\ ], "usage": { "prompt_tokens": 5, "completion_tokens": 7, "total_tokens": 12 } } sun-brightdesktopmoon --- # Utilities (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Add delays and write logs. **API** `zw.delay()`, `zw.log()`, `zw.logTemp()` Copy await zw.log("Starting run"); await zw.delay({ min: 1500, max: 2500 }); // randomized delay 1.5–2.5s * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming#at-a-glance) At a Glance * async `await zw.delay({ min: number, max?: number })` → pauses for `min` (ms). If `max` (ms) is provided and `max > min`, the delay is randomized between `min` and `max`. * async/sync\* `await zw.log(...values: any)` → like console.log, logs comma-separated values. * async/sync\* `await zw.log({ message: any, status?: "success" | "fail" | "warning", tag?: string })` → logs with custom styling. * async/sync\* `await zw.logTemp(...values: any)` `await zw.logTemp({ message, status?: "success" | "fail" | "warning", tag?: string })` → same as `zw.log()` but not persisted to Run Reports. \*`async` in browser, `sync` locally (see [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) ). * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming#examples) **Examples** **Structured status logs (styled in the UI)** Copy await zw.log({ message: "Logged in", status: "success", tag: "auth" }); await zw.log({ message: "Slow response detected", status: "warning", tag: "network" }); await zw.log({ message: "Failed to submit form", status: "fail", tag: "checkout" }); **Log objects, arrays, and functions — no manual stringify needed** **Exact wait with only** `**min**` **Dynamic backoff based on state** **Live-only logging of secrets (never persisted to Run Reports)** **Try/catch with styled fail log** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming#notes) Notes * **Size limits.** The **persistent** message saved to Run Reports is capped at **~500 characters**. The **running** log view shows up to **~500,000 characters** per message. Longer inputs do not throw an error but are truncated. * **Delay always requires** `**await**`**.** `zw.delay()` is async and must be awaited in both local and browser execution. * **Log async behavior.** In the browser, `zw.log()` and `zw.logTemp()` are async — use `await`. When Write JS code runs locally, `await` is optional (the examples use `await` for consistency). [PreviousDevice Storage (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming) [NextBrowser Context (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming) Last updated 4 months ago sun-brightdesktopmoon Copy const payload = { id: 42, items: [1, 2, 3] }; const helper = (x) => x * 2; await zw.log("Logging objects, arrays, functions", payload, helper); Copy await zw.delay({ min: 1000 }); // exactly 1s, no randomized delay await zw.log("Waited for exactly 1s"); Copy // @zw-run-locally const state = zw.state.access(); state.retryCount = (state.retryCount ?? 0) + 1; const backoffMs = Math.min(5000, 500 * state.retryCount); await zw.log("Retry:", state.retryCount, "waiting:", backoffMs); await zw.delay({ min: backoffMs }); Copy const token = await zw.deviceStorage.get("auth_token"); await zw.logTemp("Auth token received", token); // Structured live-only (styled in running log) await zw.logTemp({ message: token, status: "warning", tag: "debug_auth" }); Copy try { // do something that may throw } catch (err) { await zw.log({ message: `Action failed: ${err?.message}`, status: "fail", tag: "custom_code_error" }); throw err; } sun-brightdesktopmoon --- # Metadata (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Read TaskBot and agent details. **API** `zw.getTaskbotInfo()`, `zw.getAgentInfo()` Copy const taskbotInfo = await zw.getTaskbotInfo(); await zw.log("variables", taskbotInfo.variables); const agent = zw.getAgentInfo(); await zw.log("agent version", agent.version); * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming#at-a-glance) At a Glance * `zw.getAgentInfo()` → returns `{ version: string }` (for example, `{ version: "1.1.72" }`). * async/sync\* `await zw.getTaskbotInfo()` → returns: Copy { id: number, runType: "immediate" | "scheduled" | "webhook", currentRunResult: "success" | "warning" | "error" | "manually_stopped", variables: { ref_id: number, variableNames: string[] }, tables: Array<{ ref_id: number, type: "G_SHEETS" | "ZW_NATIVE", columnNames: string[] }>, webhookURL: string | null, } \*`async` in browser, `sync` locally (see [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) ). * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming#examples) **Examples** **Branch behavior by run type** **Get tables by type** **Add webhook URL to state and reuse later** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming#notes) Notes * **Names, not values.** For tables and variables, metadata returns **names** (variable names and column names). To read values, use `zw.getRef()`. * **Async behavior.** In the browser, `zw.getTaskbotInfo()` is async — use `await`. When Write JS code runs locally, `await` is optional (examples use `await` for consistency). `zw.getAgentInfo()` is sync everywhere. [PreviousBrowser Context (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming) [NextSave Filechevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/save-file) Last updated 4 months ago sun-brightdesktopmoon Copy const info = await zw.getTaskbotInfo(); if (info.runType === "scheduled") { await zw.log("Running in scheduled mode"); } Copy const info = await zw.getTaskbotInfo(); const gSheets = info.tables.filter(t => t.type === "G_SHEETS"); await zw.log("Google Sheets tables", gSheets); Copy // @zw-run-locally import axios from "axios"; // Add TaskBot webhook to global state const info = await zw.getTaskbotInfo(); const webhookURL = info.webhookURL; if (webhookURL) { (zw.globalState.access().webhooksToTrigger ||=[]).push(webhookURL); } // In another TaskBot, access global state and trigger webhooks const webhooks = zw.globalState.access().webhooksToTrigger || []; for (const url of webhooks) { await axios.post(url); } sun-brightdesktopmoon --- # Write and Read Variables and Tables | ZeroWork _**This page uses the new**_ `**zw.**` _**syntax. It will work starting with agent v1.1.72. If your agent is older, use the non-prefixed calls**_ `**getRef()**` _**and**_ `**setRef()**` _**instead of**_ `**zw.getRef()**` _**and**_ `**zw.setRef()**`_**.**_ Read and write persistent values in variables and tables with `zw.getRef()` and `zw.setRef()`. **API** `zw.getRef()`, `zw.setRef()` Copy // Get a value from a table column or a variable const profileName = await zw.getRef({ ref_id: 5079, name: "Profile Name" }); // Save a value to a table column or a variable await zw.setRef({ ref_id: 4372, name: "Profile Name Copy", value: profileName }); * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables#at-a-glance) At a Glance * async `await zw.getRef({ ref_id: number, name: string })` → `string` → returns the `string` value from a variable or table column. * async/sync\* `await zw.setRef({ ref_id: number, name: string, value: string })` → `void` → saves a `string` value to a variable or table column. \*`async` in browser, `sync` locally (see [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) ). * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables#whats-ref_id) What’s `ref_id`? In ZeroWork, **tables** and **variables** are data groups. Each data group has an ID called `ref_id`. * **Table** `**ref_id**` is shown in the left sidebar next to the table name. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FXQZ2qLixU5uuPgH1dIYr%252FCleanShot%25202025-09-24%2520at%252013.54.21.png%3Falt%3Dmedia%26token%3Dab55e1ac-2f6b-4ba0-ab38-4816f3b7a5d5&width=300&dpr=3&quality=100&sign=63f17345&sv=2) * **Variables** `**ref_id**` is shown in the Variables dialog. ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FYiFFGRej8zFne62Z8nOS%252Fimage%2520%281%29.png%3Falt%3Dmedia%26token%3D2f30a84f-1535-4fdc-9058-c4a57d2434fd&width=768&dpr=3&quality=100&sign=4bdded52&sv=2) * `**name**` identifies a table column or a variable in the Variables group. Names are **case-sensitive**. Copy // Read a table column by its table ref_id and column name const profileName = await zw.getRef({ ref_id: 5079, name: "Profile Name" }); // Same variables ref_id for different variable names const date = await zw.getRef({ ref_id: 4379, name: "date" }); const counter = await zw.getRef({ ref_id: 4379, name: "counter" }); * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables#saving-non-string-values) Saving Non-String Values Values are stored as **strings**. To store arrays or objects, **stringify on write** and **parse on read**. Passing a non-string `value` to `zw.setRef()` throws an error. **Example** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables#loops-and-row-behavior) Loops and Row Behavior `zw.getRef()` and `zw.setRef()` follow ZeroWork’s loop logic: * **Read existing rows** → place **Start Repeat** with **dynamic** loop **before** your Write JavaScript building block. * **Append new rows** → place **Start Repeat** with **standard** loop before the block **or** use a custom append with `appendIndex`. Read more about how loops work in ZeroWork: [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) . **Custom append without Start Repeat** Use `appendIndex` to add rows from a loop in your code. `appendIndex: 0` is the first appended row. If a table already has 3 rows, `appendIndex: 0` becomes the 4th row. > ⚠️ When using `appendIndex`, placing this Write JavaScript building block inside a Start Repeat loop can mix the built-in loop index with a custom `appendIndex`, causing mismatched rows. **Example** The resulting table: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FKYEtp0YKVOjFlbsXl8Fd%252Fimage%2520%282%29.png%3Falt%3Dmedia%26token%3D84a5a6b1-42bc-47b7-9256-2073515806b2&width=300&dpr=3&quality=100&sign=c0aafb87&sv=2) **Update existing rows in a custom code loop** Add a **dynamic** Start Repeat building block to iterate rows and use the Write JavaScript building block within that loop. As long as your Write JavaScript is inside that loop, it will have access to the values inside the row that is currently being iterated over. If you need true in-code row access, share your use case in [Discordarrow-up-right](https://discord.gg/JkkCNmVBeg) in the #ideas-feature-suggestions channel. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables#common-pitfalls) Common Pitfalls * **Always use** `**await**` **in the browser.** In the browser, `zw.getRef()` and `zw.setRef()` are async — use `await`. * **Match the exact name (case-sensitive).** [PreviousImports and Package Management (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming) [NextLocal and Global State (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming) Last updated 3 months ago sun-brightdesktopmoon Copy // 🚫 Won't work (value must be a string) await zw.setRef({ ref_id: 4379, name: "chars", value: ["a", "b", "c"] }); // Error: The value argument must be a string. Copy // Save objects or arrays (stringify on write) await zw.setRef({ ref_id: 4379, name: "animals", value: JSON.stringify([{ category: "cat" }, { category: "dog" }]), }); // Read and use it (parse on read) const animalsArray = JSON.parse( await zw.getRef({ ref_id: 4379, name: "animals" }) ); Copy const valuesToSave = ["a", "b", "c"]; const TABLE_REF_ID = 4382; let i = 0; for (const val of valuesToSave) { await zw.setRef({ ref_id: TABLE_REF_ID, name: "value", value: val, appendIndex: i, }); i++; } Copy // 🚫 Won't work (running in the browser) const name = zw.getRef({ ref_id: 5079, name: "Profile Name" }); // missing await → name is a Promise, not a string await zw.setRef({ ref_id: 4379, name: "Copy", value: name }); // throws error // Error: The value argument must be a string. // ✅ Works const name2 = await zw.getRef({ ref_id: 5079, name: "Profile Name" }); await zw.setRef({ ref_id: 4379, name: "Copy", value: name2 }); Copy // 🚫 Won't work (case mismatch) await zw.getRef({ ref_id: 5079, name: "profile name" }); // Error: This variable or column does not exist. // ✅ Works await zw.getRef({ ref_id: 5079, name: "Profile Name" }); sun-brightdesktopmoon --- # Write JavaScript (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Use the **Write JavaScript** building block to run custom code with the `zw` API. Your code runs inside the TaskBot runtime and can work with npm packages, variables and tables, state, device storage, and the browser context. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#what-you-can-do) What You Can Do #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#imports-and-package-management) Imports and Package Management Install, import, manage, and use npm packages. Use standard `import` statements or `zw.import(options, …)` for custom options. **API** `zw.import()`, `zw.packages.*` Copy // @zw-run-locally import dayjs from "[email protected]"; // auto-installs if needed await zw.log("now", dayjs().toISOString()); // Example with options — 'isolate' scopes the package to this TaskBot only const lodash = await zw.import({ isolate: true }, "[email protected]"); await zw.log("chunked result", lodash.chunk([1, 2, 3, 4], 2)); **Reference:** [Imports and Package Management (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#variables-and-tables) Variables and Tables Read from and write to variables and tables (native and Google Sheets). **API** `zw.getRef()`, `zw.setRef()` Copy const email = await zw.getRef({ ref_id: 3623, name: "Email" }); await zw.setRef({ ref_id: 3624, name: "Email copy", value: email }); **Reference:** [Write and Read Variables and Tables](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-and-global-state) Local and Global State Store and use values for the current run (local state) or across runs (global state). Stays on this device; never sent to ZeroWork servers. **API** `zw.state.*`, `zw.globalState.*` **Reference:** [Local and Global State (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#device-storage) Device Storage Persist key–value data on this device. Survives restarts and reinstalls. Stays on this device; never sent to ZeroWork servers. **API** `zw.deviceStorage.*` **Reference:** [Device Storage (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/device-storage-upcoming) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#utilities) Utilities Add delays and write logs. **API** `zw.delay()`, `zw.log()`, `zw.logTemp()` **Reference:** [Utilities (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#browser-and-context) Browser and Context Launch, quit, and manage the active browser context and pages. **API** `zw.browserContext.*` **Reference:** [Browser Context (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming) * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#metadata) Metadata Read TaskBot and agent details. **API** `zw.getTaskbotInfo()`, `zw.getAgentInfo()` **Reference:** [Metadata (upcoming)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) **Local vs. Browser Execution** Some methods only work when the code runs locally. To run code locally, either enable the **Run locally** checkbox in the building block UI or include `// @zw-run-locally` anywhere in your code (top is recommended for visibility). **Example** * **Fully available in browser execution** * **Variables and tables** — `zw.getRef()`, `zw.setRef()` * **Device storage** — `zw.deviceStorage.*` * **Utilities** — `zw.delay()`, `zw.log()`, `zw.logTemp()` * **Metadata** — `zw.getTaskbotInfo()`, `zw.getAgentInfo()` * **Available in browser with limitations** * **Imports and package management** — `zw.import()`, `zw.packages.*` Installing and managing packages is only available when running locally; using already imported packages is supported in the browser — see how [**here**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#how-to-use-imported-packages-in-the-browser) . * **Local and global state** — `zw.state.*`, `zw.globalState.*` Access to the live mutable object via `*.access()` is **only** available locally. In the browser, you can get a snapshot with `*.browser.getCopy()` and save state with `*.browser.commit()` — see how [**here**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/local-and-global-state-upcoming#id-3.-use-state-in-the-browser-zw.state.browser.-and-zw.globalstate.browser) . The clear method `*.clear()` is available in both local and browser execution. * **Browser context** — `zw.browserContext.*` Largely unavailable in browser execution. Only inspection methods `zw.browserContext.getContextInfo()` and `zw.browserContext.getDefaults()` are supported in the browser. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#using-the-zw-apis-in-no-code-blocks) **Using the** `**zw**` **APIs in No-Code Blocks** You can use the `zw` APIs in no-code blocks, too, either as expressions `${...}` or as code blocks with `return` statements `$${...}`. **Exampl** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FyrcRUzQSQMqhaqUsFiS3%252FCleanShot%25202025-09-29%2520at%252009.13.39.png%3Falt%3Dmedia%26token%3D3d1a4e6c-685b-4f73-a6ad-581a4d08c86d&width=768&dpr=3&quality=100&sign=b617d9f1&sv=2) **Reference**: [Code in Inputs](https://docs.zerowork.io/using-zerowork/using-building-blocks/dynamic-inputs/code-in-inputs) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#error-handling) Error Handling Thrown errors are automatically saved to **Error Reports** in **Run Reports** (see [Using Run Reports](https://docs.zerowork.io/using-zerowork/using-run-reports) ). Notifications, if enabled, then follow your error run notification settings (by email, Slack, or a custom webhook). This is a useful way to generate custom errors and get notified automatically. **Example** **Resulting error report** ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FAPHOXDVAE7kpBSfbt1X2%252FCleanShot%25202025-09-29%2520at%252009.31.43.png%3Falt%3Dmedia%26token%3Dede1e915-e93f-4626-a554-2d32a0a51ef7&width=768&dpr=3&quality=100&sign=8659e943&sv=2) Thrown errors can also be caught by the **Try-Catch** building blocks, see: [Try-Catch](https://docs.zerowork.io/using-zerowork/using-building-blocks/try-catch) . * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#notes) Notes * Old API `log()`, `delay()`, `setRef()`, and `getRef()` (without the `zw.` prefix) still work. We recommend the new convention `zw.*` (e.g., `zw.getRef()`), but your current code will continue to run. Existing `activePage` and `taskbotContext` will also continue to work, although they're now discouraged — prefer `zw.browserContext.getActivePage()` and `zw.browserContext.getContext()`. [PreviousWrite JavaScriptchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript) [NextImports and Package Management (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming) Last updated 4 months ago * [What You Can Do](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#what-you-can-do) * [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) * [Using the zw APIs in No-Code Blocks](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#using-the-zw-apis-in-no-code-blocks) * [Error Handling](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#error-handling) * [Notes](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#notes) sun-brightdesktopmoon Copy // @zw-run-locally // Per-run local state, cleared when the run ends const runState = zw.state.access(); runState.runStartedAt = Date.now(); // Shared Desktop Agent global state const globalState = zw.globalState.access(); globalState.totalRuns = (globalState.totalRuns ?? 0) + 1; Copy // In-browser snapshot (survives serialization) const snapshot = await zw.state.browser.getCopy(); snapshot.runStartedAt = Date.now(); await zw.state.browser.commit(snapshot); Copy const credentials = { username: await zw.deviceStorage.get("username_salesforce"), password: await zw.deviceStorage.get("password_salesforce"), }; await zw.deviceStorage.set("last_login_salesforce", String(Date.now())); Copy await zw.log("starting run"); await zw.delay({ min: 1500, max: 2500 }); Copy // @zw-run-locally // Example (abridged). See the reference for all options. await zw.browserContext.launch({ contextControls: { keepAlive: true }, // more controls available launchOptions: { headless: true /* proxy, userDataDir, ... */ }, contextOptions: { /* recordVideo, geolocation, ... */ }, scripts: [], cookies: [], onContextReady: async (context) => { await context.route('**/*.{png,jpg,jpeg}', route => route.abort()); }, // see the reference for the full list of options }); const contextInfo = await zw.browserContext.getContextInfo(); await zw.log("context", contextInfo); await zw.browserContext.quit(); Copy const taskbotInfo = await zw.getTaskbotInfo(); await zw.log("variables", taskbotInfo.variables); const agent = zw.getAgentInfo(); await zw.log("agent version", agent.version); Copy // @zw-run-locally await zw.log("This runs locally now"); console.log("And this will no longer be visible in the browser console."); Copy throw new Error( "Test error to verify Error Reports in Run Reports" ); sun-brightdesktopmoon --- # Imports and Package Management (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Use standard JavaScript imports like `import dayjs from "[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) "` or use the `zw` API `zw.import()` for custom options to install (if needed) and import packages during a TaskBot run. ZeroWork installs missing packages and makes them available to your code. Manage packages with `zw.packages.list()`, `zw.packages.uninstall()`, and `zw.packages.uninstallAll()`. **API** `zw.import()`, `zw.packages.*` Copy // @zw-run-locally // Use desktop automation in ZeroWork import { execSync } from "child_process"; import { keyboard } from "@computer-use/nut-js"; // Open an editor depending on OS if (process.platform === "win32") { execSync("start notepad"); } else if (process.platform === "darwin") { execSync(`osascript -e 'tell application "TextEdit" to activate' -e 'tell application "TextEdit" to make new document'`); } else { execSync("gedit || xed || kate || nano", { shell: "/bin/bash" }); } // Wait briefly for the editor window to appear await zw.delay({ min: 2_000 }); // Type into the editor await keyboard.type("Hello from ZeroWork desktop automation!"); * * * [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#id-1.-imports) 1\. Imports ---------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#standard-imports) Standard Imports You can use standard ESM or CommonJS syntax. Any such import installs the package if needed, then loads it. **Notes** * Installed packages are available to any TaskBot by default. To scope per TaskBot, use `zw.import()` with `{ isolate: true }` (see details further below). * If a package isn’t used for one week, it's removed automatically. To change this window or prevent automatic uninstall, use `zw.import()` with `uninstallIfUnusedFor` (see details further below). * Subpaths like `"lodash/chunk"` and Git repositories are supported. * You can disable auto-imports by adding a comment `// @zw-disable-auto-import` * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#imports-with-zw.import) Imports with `zw.import()` Use `zw.import()` when you need options or want to import several packages at once. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#at-a-glance) **At a Glance** * async `await zw.import(options: ImportOptions, pkg: string | string[] | { [key: string]: string })` → installs if needed and returns the loaded module(s) #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#examples) **Examples** **Single package with options** **Multiple packages as an array** **Named mapping as an object** **Installing from Git (HTTPS only)** **Use default options by passing an empty object {}** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#import-option-details) **Import Option Details** * `**uninstallIfUnusedFor**` **(default:** `**168**`**)** Defaults to 168 hours (**one week**). Set to `null` to keep the package on the device indefinitely. * `**isolate**` **(default:** `**false**`**)** When `true`, the package is scoped to this TaskBot only and isn’t visible in other TaskBots. Useful when different TaskBots need different versions of the same package. Note: If the TaskBot is deleted, the package isn’t removed automatically; you can manage it later with `zw.packages.*` (see details further below). * `**preferDefault**` **(default:** `**true**`**)** — _advanced_ Returns `module.default` when present (otherwise the module object). This only changes the return shape; it doesn’t affect how the module is resolved. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#supported-package-inputs) **Supported Package Inputs** You can pass any of the following to `zw.import()` as the **second** argument. * **String** `"lodash"`, `"[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) "`, `"lodash/chunk"`, `"https://github.com/user/repo.git#main"` or `"git+https://github.com/user/repo.git#main"` * **Array of strings** `["[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) ", "[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) "]` * **Object mapping** `{ util: "[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) ", time: "[[email protected]](https://docs.zerowork.io/cdn-cgi/l/email-protection) " }` **Invalid inputs that are rejected** * Tarball URLs, local file paths, and directories * Non-HTTPS Git URLs * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#special-package-types) Special Package Types #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#built-in-packages) Built-in Packages These packages are pre-bundled and resolve without installation. * Node core modules such as `fs`, `os`, etc. * `axios` pinned to `^1.6.6` * `playwright` pinned to `^1.45.0` They don’t appear in `zw.packages.list()`, and you can’t change their versions or uninstall them. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#pure-esm-packages) Pure ESM Packages ZeroWork isn’t pure ESM yet. **Pure ESM packages** aren’t supported and will throw an error similar to: > This package appears to be pure ESM. Pure ESM packages are currently not supported. To confirm, check the package documentation. **Workarounds for pure ESM packages** * Use a maintained non-ESM fork if available. For example, `cacheable-lookup` is a pure ESM module but a maintained fork is available: `@esm2cjs/cacheable-lookup`. * Pin a non-ESM version if the project provides one. For example, the latest `chalk` version is pure ESM but its documentation recommends pinning to v4 `chalk@4` for a CommonJS build. * If the package is pure ESM with no CommonJS fork or version, you will have to find an alternative. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#native-packages) Native Packages Packages that include native code (C/C++ or other system-level bindings) **may not work reliably**. They often require a compatible Node version, build tools, or system libraries. This typically affects modules that talk directly to the operating system or hardware — for example `**node-window-manager**`, `**robotjs**`, or `**ffi-napi**`. Advanced users with the right setup might get them working, but they aren’t guaranteed to install or run on all systems. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#reusing-references) Reusing References Import once and reuse the reference, as is generally best practice. The package won’t reinstall if it’s already installed, but package parsing and resolution still add overhead. * * * [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#id-2.-package-management) 2\. Package Management -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#at-a-glance-1) At a Glance * async `await zw.packages.list()` → returns `string[]` of **package IDs**. * async `await zw.packages.uninstall(id: string)` → removes one. * async `await zw.packages.uninstallAll()` → removes all user-managed packages. circle-info Built-ins (`axios@^1.6.6`, `playwright@^1.45.0`, and Node core modules like `os`, `fs`, etc.) do not appear in `list()` and cannot be uninstalled. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#whats-a-package-id) What’s a Package ID? A **package ID** uniquely identifies an installed package instance. It’s an opaque string made of an optional isolation prefix (`_`), a lower-cased, sanitized package name, `@`, and a version tag (``, `latest`, `git`, or a commit hash). It may differ from your original import string (subpaths aren’t included; characters are normalized). **Examples** Use these IDs with `zw.packages.uninstall(id)`. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#examples-1) Examples **List packages** **Uninstall by package name/version** **Uninstall all for a specific TaskBot** **Uninstall all** * * * [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#id-3.-local-and-browser-execution) 3\. Local and Browser Execution -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Package installation and management run locally only. Standard `import`/`require`, `zw.import()`, and `zw.packages.*` are supported **only** when the Write JS block runs outside the browser context. Enable the **Run locally** checkbox in the block UI, or add the comment `// @zw-run-locally`. circle-check You can still _**use**_ imported packages in the browser by exposing functions from a local block (see below). ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#how-to-use-imported-packages-in-the-browser) How to Use Imported Packages in the Browser Import locally in one block, expose a function, then call it from a later block that runs in the browser. circle-exclamation Functions exposed via `context.exposeFunction()` always become **asynchronous** in the browser, even if they were defined as synchronous. Always call them with `await`. [PreviousWrite JavaScript (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming) [NextWrite and Read Variables and Tableschevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-and-read-variables-and-tables) Last updated 4 months ago * [1\. Imports](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#id-1.-imports) * [Standard Imports](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#standard-imports) * [Imports with zw.import()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#imports-with-zw.import) * [Special Package Types](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#special-package-types) * [Reusing References](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#reusing-references) * [2\. Package Management](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#id-2.-package-management) * [3\. Local and Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#id-3.-local-and-browser-execution) * [How to Use Imported Packages in the Browser](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/imports-and-package-management-upcoming#how-to-use-imported-packages-in-the-browser) sun-brightdesktopmoon Copy // @zw-run-locally // ESM default import import dayjs from "[email protected]"; await zw.log("now", dayjs().toISOString()); // ESM subpath import import chunk from "lodash/chunk"; await zw.log("chunked result", chunk([1, 2, 3, 4], 2)); // CommonJS require const _ = require("[email protected]"); await zw.log("uniq result", _.uniq([1, 1, 2, 3])); // Import from Git (HTTPS only) import lodash from "git+https://github.com/lodash/lodash.git"; Copy // @zw-disable-auto-import import dayjs from "[email protected]"; // throws error Copy // Reference only — not runnable in Write JS type ImportOptions = { uninstallIfUnusedFor: number | null; // hours; default 168; null = never uninstall isolate: boolean; // scope to this TaskBot only; default false preferDefault: boolean; // advanced; default false }; Copy // @zw-run-locally const dayjs = await zw.import( { isolate: true, uninstallIfUnusedFor: 300 }, "[email protected]" ); Copy // @zw-run-locally const [dayjs, lodash] = await zw.import( { isolate: true }, ["[email protected]", "[email protected]"] ); Copy // @zw-run-locally const { time, dash } = await zw.import( { uninstallIfUnusedFor: null }, { time: "[email protected]", dash: "[email protected]" } ); Copy // @zw-run-locally const gitLodash = await zw.import( { uninstallIfUnusedFor: null }, "git+https://github.com/lodash/lodash.git" ); Copy // @zw-run-locally const lodash = await zw.import({}, "[email protected]"); Copy // @zw-run-locally // In most cases, leave preferDefault as is (true). const mysql = await zw.import({}, "mysql2@latest/promise"); // works const { chalk } = await zw.import({}, { chalk: "chalk@4" }); // works Copy // @zw-run-locally import * as fs from "fs"; // pre-bundled; no installation occurs import axios from "axios"; // resolves to axios@^1.6.6 // Version spec is ignored; resolves to pinned playwright@^1.45.0 import playwright from "[email protected]"; Copy // @zw-run-locally // 1. Anti-pattern: import inside the loop (re-parses/resolves each time) for (let i = 0; i < 1_000_000; i++) { await zw.log((await zw.import({}, "[email protected]"))().toISOString()); } // 2. Recommended: reuse a local reference const dayjs = await zw.import({}, "[email protected]"); for (let i = 0; i < 1_000_000; i++) { await zw.log(dayjs().toISOString()); } // 3. Optional (micro-optimization): reuse across Write JS blocks via run state const cachedDayjs = await zw.import({}, "[email protected]"); const state = zw.state.access(); if (!state.cachedResolvedImports) { state.cachedResolvedImports = {}; } state.cachedResolvedImports.dayjs = cachedDayjs; // In a later building block: await zw.log(zw.state.access().cachedResolvedImports.dayjs().toISOString()); Copy [email protected] [email protected] [email protected] // isolated to a specific TaskBot (prefix includes its ID) repo_name@git // Git source without a specific commit repo_name@9f3a2c4 // Git source pinned to a commit Copy // @zw-run-locally const ids = await zw.packages.list(); await zw.log("packages", ids); Copy // @zw-run-locally const ids = await zw.packages.list(); const target = ids.find(id => id.includes("[email protected]")); if (target) await zw.packages.uninstall(target); Copy // @zw-run-locally const myTaskBotId = 12345; const ids = await zw.packages.list(); const targets = ids.filter(id => id.startsWith(`${myTaskBotId.toString()}_`)); for (const target of targets) { await zw.packages.uninstall(target); } Copy // @zw-run-locally await zw.packages.uninstallAll(); Copy // Write JS Block A — runs locally // @zw-run-locally import lodash from "lodash"; // Illustrative for simplicity (but prefer pattern below) const context = zw.browserContext.getContext(); await context.exposeFunction("exposedChunkFn", (arr) => lodash.chunk(arr, 2)); // Better pattern for context continuity // Ensure function is exposed on any (re)launch await zw.browserContext.setDefaults({ onContextReady: async (context) => { await context.exposeFunction("exposedChunkFn", (arr) => lodash.chunk(arr, 2)); } }); Copy // Write JS Block B — runs in the browser const result = await exposedChunkFn([1, 2, 3, 4]); // [[1,2],[3,4]] await zw.log("exposedChunkFn result", result); sun-brightdesktopmoon --- # Write JavaScript | ZeroWork This action executes javascript code on a website. ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#references-to-variables-and-tables-using-getref-and-setref) References to Variables and Tables: Using `getRef()` and `setRef()` Use a reference from a variable or a table: Copy await getRef({ ref_id: 123, name: 'column or variable name' }); Save a value to a variable or a table: Copy await setRef({ ref_id: 123, name: 'column or variable name', value: 'something' }); #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#what-is-ref_id-and-where-to-find-it) What is `ref_id` and where to find it? `ref_id` corresponds to the table id or variables id. In ZeroWork, tables and variables are considered _data groups._ Each _data group_ has its own id (which is `ref_id`), so `ref_id` corresponds to the whole table id or to _all_ variables_._ The individual columns and individual variables are uniquely identified by name. Table ids can be found on the left sidebar: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FuvPI41ZTAI14oGsgW8Y8%252FScreenshot%25202024-03-30%2520at%252010.28.34.png%3Falt%3Dmedia%26token%3D2f98f714-de39-4394-b0d4-bc1b695fe946&width=768&dpr=3&quality=100&sign=3fdb8d0d&sv=2) Variables id (ref\_id) can be found in the variables dialog: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FFU5p9gFOhuN7DR1vBFHd%252FScreenshot%25202024-03-30%2520at%252010.30.09.png%3Falt%3Dmedia%26token%3D5b2cb0ec-b7be-4a9e-bcad-a9f96c7a1fbb&width=768&dpr=3&quality=100&sign=dbbbb2d8&sv=2) Before moving on to examples, beware that getting table content adheres to ZeroWork dynamic loop behavior, as described below: [Write JavaScript](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#saving-or-getting-data-within-loops) . * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#examples) Examples Using browser in-built functions: Making a fetch request, which returns an array and saving a value from the first item to a variable: * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#dos-and-donts-when-using-getref-and-setref) Dos and Don'ts When Using `getRef()` and `setRef()` 1. Both `getRef()` and `setRef()` are executed asynchronously. Make sure to wait for response, for example, by using `await`. Otherwise the code will continue executing without waiting for response. ❌ **Won't work** ✅ **Works** 1. Variable and column names are case-sensitive. For example, if the column in your table is named "Profile Name" and you reference to it in lower case, you will get an error. ❌ **Won't work** ✅ **Works** 1. Ensure to use correct data types. `ref_id` is expected to be number or string; `name` and `value` are expected to be strings. ❌ **Won't work** ✅ **Works** ✅ **Also works** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#saving-non-string-values-with-setref) Saving Non-String Values with `setRef()` Whenever you use `setRef()`, the value is stringified when it's saved. If the value is, for example, array or object and you need to access it later when calling `getRef()`, you need to parse it first to json. See example below. Assume you need to access the first item's object from the array saved to the variable "animals": ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FBznYifdU2f11ViEuREUI%252FScreenshot%25202024-03-31%2520at%252015.51.29.png%3Falt%3Dmedia%26token%3D30624102-54c7-47ee-ac28-80337b89a550&width=768&dpr=3&quality=100&sign=f3c29181&sv=2) ❌ **Won't work** ✅ **Works** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#saving-or-getting-data-within-loops-when-using-getref-and-setref) Saving or Getting Data Within Loops When Using `getRef()` and `setRef()` `getRef()` and `setRef()` adhere to ZeroWork in-built loop logic. For example, in order to access value from a table, you need to place [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) building block with _**dynamic**_ loop type before the _Write JavaScript_ building block. If you want to append data to a table, you need to place [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) building block with _**standard**_ loop type before the _Write JavaScript_ building block. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#custom-append-loop-logic-without-start-repeat) Custom Append Loop Logic without Start Repeat You can append rows within a custom loop in your code block by providing an argument for `appendIndex`. Beware: * `appendIndex` refers to the row number that should be appended. `appendIndex: 0` means the first row to be appended. If there are already 3 rows in the table, it will be appended as 4th. * When using `appendIndex`, avoid placing _Write JavaScript_ building block inside any ZeroWork in-built loop (by this, [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) building block is meant) - whether nested or not! Otherwise the row indices might get mixed up between ZeroWork in-built loop logic and your custom loop logic, and you might end up with mismatched data. With that in mind, here is an example of how you can make this scenario work: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fjn5VYQhDatlH8bixTjna%252FScreenshot%25202024-04-01%2520at%252015.34.09.png%3Falt%3Dmedia%26token%3D63b10b44-4b16-4e6e-9d55-cd7355c87287&width=768&dpr=3&quality=100&sign=6ecbe88e&sv=2) And here is the end result: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FxEomowqqEy56u6TMLjXn%252FScreenshot%25202024-04-01%2520at%252015.34.54.png%3Falt%3Dmedia%26token%3De1d6f334-8117-4852-9b9c-88f7dcc8bd3d&width=768&dpr=3&quality=100&sign=c2650af1&sv=2) Copy and try yourself: Custom looping through existing rows of a table within your code block in order to update data (as opposed to append) is currently not supported. However, in most use cases, adding dynamic loop with [Start Repeat](https://docs.zerowork.io/using-zerowork/using-building-blocks/start-repeat) is enough to enable this use case. Please let us know if you want this feature to be implemented in our [Discordarrow-up-right](https://discord.com/invite/aSUhf75fSz) server (#ideas-features-suggestions) while providing an example what you would need it for. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#log-to-taskbot-logs-with-log) Log to TaskBot Logs with `log()` You can define your own log messages by using the function `log`. Will be shown in your logs like so: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FK40AJhPzdSJ7bn6pMtbV%252FScreenshot%25202024-05-11%2520at%252013.58.48.png%3Falt%3Dmedia%26token%3Dbe4e8024-fb05-4694-a71e-8f2132965472&width=768&dpr=3&quality=100&sign=86955da5&sv=2) You can include `status` parameter, which is optional and accepts `"success"` or `"fail".` The default is "success". Must be either `"fail"` or `"success"`. Will be shown in your logs highlighted in red: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252Fq4qUvXGmLNQ0jhgCTsDH%252FScreenshot%25202024-05-11%2520at%252014.00.08.png%3Falt%3Dmedia%26token%3Dfda8c483-56f8-40e0-ae33-9d197a032186&width=768&dpr=3&quality=100&sign=8fd77d56&sv=2) You can include `tag` argument, which is optional and makes your log message appear with a labeled tag in your logs. Must be string. Will be shown in your logs with a tag on the right: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FvnVuDzUDUL1Y275nwK6R%252FScreenshot%25202024-05-11%2520at%252014.04.42.png%3Falt%3Dmedia%26token%3D0a2683f7-ccc5-47e6-b515-198cac7639ad&width=768&dpr=3&quality=100&sign=f10c541d&sv=2) * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#error-handling) Error Handling ZeroWork in-built error handling behavior will not always apply to your custom code. For example, if you use building block [Click Web Element](https://docs.zerowork.io/using-zerowork/using-building-blocks/click-web-element) and the selector is not found, normally you will get an error that selector could not be found (after the corresponding timeout) in your logs and the TaskBot run will be interrupted. However, because browser console treats not found selectors differently (by simply returning `null`), your TaskBot will continue its run despite the error. ❌ **Not recommended** ✅ **Better** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#define-custom-error-messages) Define custom error messages You can use custom error handling including custom try-catch logic and define custom behavior on error as well as your own custom error messages. Your custom error messages will be reflected in the logs and error reports. Consider the example below: This is how your custom error message in the logs and error reports will appear: ![](https://docs.zerowork.io/~gitbook/image?url=https%3A%2F%2F3220183989-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fg9LcR8XM7TGOzOCDGsCS%252Fuploads%252FHcjaOQOxnRQ5K67GsLtJ%252FScreenshot%25202024-03-31%2520at%252015.10.43.png%3Falt%3Dmedia%26token%3Daccd90e3-8a45-475e-b345-d8cc91c5f2f1&width=768&dpr=3&quality=100&sign=892af57f&sv=2) Here is another example with your own custom try-catch logic: * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#using-delay) Using `delay()` The custom `delay()` method allows you to pause the execution of JavaScript code for a specified duration. **How It Works:** * `**min**`: The minimum duration for the delay in milliseconds (required). Must be number. * `**max**`: The maximum duration for the delay in milliseconds (optional). Must be number. If provided, the actual delay duration will be randomized between `min` and `max`. * If `max` is not specified, the delay will last exactly `min` milliseconds. * If `max` is less than `min`, the delay will default to `min` milliseconds. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#run-locally-in-the-app-outside-browser-context) Run Locally in the App (outside browser context) This option allows the JavaScript code to execute directly in the ZeroWork agent application, bypassing the browser. By running locally, you gain access to additional system features and tools that are not available in the browser environment. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#accessible-libraries) **Accessible Libraries** 1. **Access to Playwright** `**pw**`: Full access to the Playwright library. Example: 1. **Access to node.js file system** `**fs**`: Node.js file system operations. Example: 1. **Access to axios** `**axios**`: HTTP requests using the Axios library. Example: * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#accessible-objects) **Accessible Objects** 1. **Access** **to the active page** `**activePage**`: Access the current active browser page. * This refers to the page your TaskBot is using during its run. * It is designed to combine no-code and code actions. For example, you might initiate a new page with the **Open Link** building block, perform some actions with some other building blocks, and then use custom Playwright code for advanced actions. **Notes**: * The `activePage` is a Playwright `Page` object. Any methods described in the [**Playwright Page class documentation**arrow-up-right](https://playwright.dev/docs/api/class-page) are applicable. * If no page exists (e.g., because it was not initiated with **Open Link** or was closed with the **Switch or Close Tab** building block), `activePage` will be `null`. **Examples:** * Performing actions not available in ZeroWork: * Adding event listeners: 1. **Access** **to the active context** `**taskbotContext**`: Access the current active browser context. * This allows integration of code and no-code actions at the context level. A context is one level above a page. **Notes**: * The `taskbotContext` is a Playwright `BrowserContext` object. Any methods described in the [**Playwright BrowserContext class documentation**arrow-up-right](https://playwright.dev/docs/api/class-browsercontext) are applicable. * If no browser exists (e.g., because it was not initiated with **Open Link** or was closed with the **Switch or Close Tab** building block), `taskbotContext` will be `null`. **Examples:** * Getting all pages: * Programmatically adding cookies: #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#additional-notes) **Additional Notes** * Output from `console.log()` will not appear in the browser console since the code runs directly in the ZeroWork application. **Tip**: Use `await log({ message })` to log messages in the TaskBot Run Reports and running logs. [PreviousAPIs: Send HTTP Requestchevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/apis-send-http-request) [NextWrite JavaScript (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming) Last updated 5 months ago * [References to Variables and Tables: Using getRef() and setRef()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#references-to-variables-and-tables-using-getref-and-setref) * [Examples](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#examples) * [Dos and Don'ts When Using getRef() and setRef()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#dos-and-donts-when-using-getref-and-setref) * [Saving Non-String Values with setRef()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#saving-non-string-values-with-setref) * [Saving or Getting Data Within Loops When Using getRef() and setRef()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#saving-or-getting-data-within-loops-when-using-getref-and-setref) * [Log to TaskBot Logs with log()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#log-to-taskbot-logs-with-log) * [Error Handling](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#error-handling) * [Using delay()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#using-delay) * [Run Locally in the App (outside browser context)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript#run-locally-in-the-app-outside-browser-context) sun-brightdesktopmoon Copy // example: get value from a table const profileName = await getRef({ ref_id: 4372, name: 'Profile Name' }); Copy // example: save value to a variable // note: all variables (both 'counter' and 'date') will have the same ref_id const counter = await getRef({ ref_id: 4379, name: 'counter' }); const date = await getRef({ ref_id: 4379, name: 'date' }); Copy const selector = document.querySelector("div button"); if (selector) selector.click(); Copy const res = await fetch( 'https://api.github.com/repos/microsoft/vscode-edge-devtools/issues?state=all&per_page=50&page=1' ); const resData = await response.json(); // save to a variable await setRef({ ref_id: 4379, name: "value from 1st item", value: resData[0]["title"] }); Copy const profileName = getRef({ ref_id: 4372, name: 'Profile Name' }); await setRef({ ref_id: 4372, name: 'New Profile Name', value: profileName }); // since await is missing in getRef, saves [object Object], and it's not what we want Copy const profileName = await getRef({ ref_id: 4372, name: 'Profile Name' }); await setRef({ ref_id: 4372, name: 'copied profile name', value: profileName }); // properly saves profile name (e.g. "Jane Doe") Copy const profileName = await getRef({ ref_id: 4372, name: 'profile name' }); // throws error: // "Cannot access the value of the variable or column. // This variable or column does not exist on this workflow" Copy const profileName = await getRef({ ref_id: 4372, name: 'Profile Name' }); Copy const profileName = await getRef({ ref_id: 4372, name: address }); // throws error: // ReferenceError: address is not defined Copy const profileName = await getRef({ ref_id: 4372, name: 'address' }); Copy const columnName = 'address'; const profileName = await getRef({ ref_id: 4372, name: columnName }); Copy const animals = await getRef({ ref_id: 4379, name: "animals" }); const firstAnimal = animals[0]["product"]; // resolves to undefined await setRef({ ref_id: 4379, name: "first animal", value: firstAnimal }); // throws error: Required arguments ref_id, name or value are missing Copy const animals = JSON.parse( await getRef({ ref_id: 4379, name: "animals" }) ); const firstAnimal = animals[0]["product"]; // resolves to "cat" await setRef({ ref_id: 4379, name: "first animal", value: firstAnimal }); Copy const valuesToSave = ["a", "b", "c"]; const TABLE_REF_IF = 4382; let appendIndex = 0; for (const value of valuesToSave) { await setRef({ ref_id: TABLE_REF_IF, name: "value", value, appendIndex }); appendIndex++; } Copy await log({ message: "Logging something custom" }); Copy await log({ message: "Logging something that went wrong", status: "fail" }); Copy await log({ message: "Logging something custom", tag: "My Custom Tag" }); Copy document.querySelector("div button").click(); // might throw error: cannot read properties of null (reading 'click') Copy const selector = document.querySelector("div button"); if (selector) selector.click(); // alternatively, use try-catch logic to throw custom error, see below Copy const selector = document.querySelector("div button"); if (!selector) throw new Error("My custom error message: div button is not found!"); Copy const doSomething = async (timeout) => { // some code that relies on timeout (e.g. making http request) }; let timeOut = 10; // corresponds to 10 sec try { await doSomething(timeOut); } catch (e) { timeOut = timeOut + 10; if (e.message.includes("timeout" && timeOut < 50) await doSomething(timeOut); else throw e; } // the error message from e.message will be saved to the logs and the error reports Copy await delay({ min: , max?: }); Copy const browser = await pw.chromium.launch({ channel: "chrome", headless: false }); const context = await browser.newContext(); const page = await context.newPage(); // do something with the new page await page.goto('https://wikipedia.org'); // end run await page.close(); await context.close(); await browser.close(); Copy const doesPathExist = fs.existsSync('/some-path'); Copy const someData = await axios.get('https://api.example.com/data'); Copy await activePage.dragAndDrop('#source', '#target'); Copy activePage.on('requestfailed', request => { await log({ message: request.url() + ' ' + request.failure().errorText, status: 'fail' }); }); Copy const allPages = taskbotContext.pages(); // Do something with the pages // For example, save all page URLs to a table let appendIndex = 0; for (const page of allPages) { await setRef({ ref_id; 4382, name: "URL", value: page.url(), appendIndex }); appendIndex++; } Copy const cookieObject1 = JSON.parse(await getRef({ ref_id: 123, name: "fb_cookies" })); const cookieObject1 = JSON.parse(await getRef({ ref_id: 123, name: "ig_cookies" })); await taskbotContext.addCookies([cookieObject1, cookieObject2]); sun-brightdesktopmoon --- # Browser Context (upcoming) | ZeroWork _**Available in version 1.1.72 (not yet live).**_ Launch, quit, manage, and inspect the browser context and pages your TaskBot uses. Copy // @zw-run-locally // Quick start (abridged) await zw.browserContext.launch({ launchOptions: { headless: true }, /* More options available */ }); await zw.log("Context info", await zw.browserContext.getContextInfo()); await zw.browserContext.quit(); * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-1.-core-concepts) 1\. Core Concepts **Launching the browser context** Launch with [`zw.browserContext.launch()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-2.-launch-the-browser-launch) (ZeroWork-managed). This ensures: * No-code blocks use the same context. * Lifecycle is managed for you. To opt out of auto-quit, pass `contextControls.keepAlive: true`. * (Re)launches reapply your launch arguments. _Note: If you need a custom launch flow or a self-managed context, see_ _**Advanced: Custom and self-managed contexts**_ _below._ * * * **Active page** A TaskBot has one active page at a time. No-code web-interaction blocks act on the active page. If you create a page in code and want no-code blocks to use it, set it with [`zw.browserContext.setActivePage(page)`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-7.-active-page-and-pages-setactivepage-getactivepage-isactivepage-listpages) . * * * **Context (re)launch** A TaskBot automatically (re)launches a context in these cases: * **Open Link** building block — launches one if none exists, otherwise reuses. * **Write JS** set to run **in the browser** — launches one if none exists, otherwise reuses. * A call to `**zw.browserContext.launch()**` — launches one and, depending on `config.makeMain`, either replaces the existing context or creates a parallel one. * **Launch Browser** building block — launches one and replaces the existing context. * Recovery after staleness or a crash. * Performance optimizations in long-running TaskBots. > 💡 **Common gotcha:** Closing the last tab (e.g., with **Switch** **or** **Close Tab**) ends the context. The next **Open Link** block creates a **fresh** **context** from [**defaults**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-3.-defaults-setdefaults-getdefaults) > . Avoid surprises (e.g., “I launched a headless browser and it suddenly became headful mid-run”) with these **best practices**: * Use `zw.browserContext.launch()` to launch. (If you need a custom launch flow, you can pass `contextProvider`.) * Add cookies, scripts, and permissions via `zw.browserContext.launch()` or `zw.browserContext.setDefaults()` so that they **reapply on (re)launches**. Don't use ad hoc calls like `context.addCookies()`. * * * **Sticky mode** [**Sticky profiles**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-5.-persistent-sticky-browser-profiles-clearprofile-cloneprofile) follow special rules. * One browser instance per profile. Same `stickyProfileId` ⇒ the same live browser instance across TaskBots (multiple isolated tabs). * Later launches attach to the live browser instance and ignore conflicting browser-level args (e.g., `headless`). Other arguments like `cookies`, `scripts` and `onContextReady` still apply on attach (deduplicated). * Quitting from one run closes that run’s tabs, but if other TaskBots are still using the browser instance it remains running and only quits when the last user leaves. * * * **Lifecycle** Contexts are closed and cleared automatically. * When a run ends, the context and browser quit unless `contextControls.keepAlive` is `true` or a shared sticky profile is still in use by other TaskBots. * If `keepAlive` is `true` but there are no open or eligible tabs, the context and browser still quit. * If a kept-alive browser remains open, the Desktop Agent cleans up when it detects manual closure (e.g., you close the window or the last tab). > ⚠️ **Caution**: `headless: true` + `keepAlive: true` can leave an invisible instance consuming resources or, if `mode: "sticky"`, blocking a sticky profile. The UI blocks this combo, but the API allows it—use with care. * * * **Advanced: Custom or self-managed contexts** * **Custom launch flow** Provide a callback via [`contextProvider`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-provider-contextprovider-advanced) in `zw.browserContext.launch()` when you need options the standard `zw` API doesn’t cover (e.g., launching with Firefox). See examples [here](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-provider-contextprovider-advanced) . * **Self-managed context** Pass `makeMain: false` in `zw.browserContext.launch()` to opt out of lifecycle and relaunch policy. No-code blocks keep using the main context. To rejoin the managed flow later, use [`zw.browserContext.adoptContext()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-8.-adopt-self-managed-contexts-advanced) . See examples [here](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-8.-adopt-self-managed-contexts-advanced) . * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-2.-launch-the-browser-launch) 2\. Launch the Browser — `launch()` #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#at-a-glance) At a Glance * async `await zw.browserContext.launch(args: CustomLaunchArgs)` → launches a new browser context and returns it. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#launch-arguments-customlaunchargs) **Launch Arguments** — `**CustomLaunchArgs**` **Defaults used when you pass no arguments** All options are optional. If you call `zw.browserContext.launch()` with no arguments, it inherits the Browser Launch Settings configured for this TaskBot or any values previously set via `zw.browserContext.setDefaults()`. If you set `config.inheritDefaults: false`, any option you don’t specify falls back to the built-in baseline defaults (the `default:` comments in the type definitions). Note how `mode` affects the default baseline when `config.inheritDefaults: true`: * If you don’t pass `mode`, `mode` and its corresponding settings are inherited from the current defaults. * If you pass `mode: "sticky"`, defaults are taken from the sticky profile settings for the `stickyProfileId` you provide. * If the current defaults use `mode: "sticky"` but you pass `mode: "incognito"`, ZeroWork switches to the built-in baseline defaults and ignores the current defaults. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#mode-mode-and-stickyprofileid) Mode — `mode` and `stickyProfileId` * `**mode**` **(default:** `**"incognito"**`**)** Selects how ZeroWork launches and manages the browser context. * `"incognito"`: Launches an isolated browser session. * `"sticky"`: Launches in a **sticky browser profile**. Multiple TaskBots with the same `stickyProfileId` share the same browser instance in parallel tabs (see [**Sticky Profiles**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-5.-sticky-browser-profiles-clearprofile-cloneprofile-listprofiles) further below). * `**stickyProfileId**` Selects which sticky profile to use (only relevant in sticky mode). Ignored when `mode: "incognito"`. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-controls-contextcontrols) Context Controls — `contextControls` * `**maximize**` **(default:** `**true**`**)** Maximizes the window. Ignored in `headless` mode (`headless` must use an explicit `viewport`, see [**Context Options**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-options-contextoptions) further below). * `**bypassDetection**` **(default:** `**false**`**)** Hardens bot detection bypass measures and keeps TaskBots indistinguishable from human users to Cloudflare and similar anti-bot systems. (Called previously `powerMode` in beta versions.) * **ℹ️ Trade-offs**: In `bypassDetection` mode, some launch and context options are unavailable (see [**Launch Options**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#launch-options-launchoptions) and [**Context Options**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-options-contextoptions) further below) and file uploads larger than ~50 MB are blocked (downloads are unaffected). * `**keepAlive**` **(default:** `**false**`**)** Keeps the browser open after the run ends. * 💡 `keepAlive: true` is ignored if, at run end, no pages remain. The context then closes. Tabs on about:blank or ZeroWork launch pages don’t count unless they are tied to Write JS in-browser code execution. * ℹ️ In sticky profiles, `keepAlive` applies only to **this run’s tabs**. If `true`, your tabs remain open; if `false`, your tabs close. The browser instance itself stays running as long as another TaskBot in the same profile is using it. It quits only when the last user leaves **and** no kept-alive tabs remain. * ⚠️ With sticky profiles, prefer leaving `keepAlive` false. After a long device sleep, the connection can drop while the browser stays open, blocking the profile until you restart the Desktop Agent or quit that browser. Only one browser instance can use a profile at a time. * `**bringToFront**` **(default:** `**true**`**)** Brings newly opened tabs to the front (applies to no-code blocks that open tabs). * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#cookies-cookies) Cookies — `cookies` Provide cookies **up front** so they are reapplied on every context (re)launch. Each cookie must include at least `name`, `value`, and `domain` (and `path`, where relevant). You can either provide the cookie array or, if you have cookies copied from multiple websites, an array of cookie arrays. > 💡 **Tip!** Avoid adding cookies in code later via `context.addCookies()` — those won’t automatically reapply on context relaunch. **Example** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#scripts-scripts) Scripts — `scripts` Scripts are injected **before** any page loads and reinjected on context (re)launch. Each script item is either `{ path }` or `{ content }` (when using `path`, provide an **absolute** path). > 💡 **Tip!** Avoid adding scripts in code later via `context.addInitScript()` — those won’t automatically reapply on context relaunch. **Example** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#callback-when-ready-oncontextready) Callback when Ready — `onContextReady` Runs whenever the context is (re)launched. **Example** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#launch-options-launchoptions) Launch Options — `launchOptions` * `**args**` Use with care: custom flags can break bot detection bypass measures. Note: `--user-data-dir` and `--profile-directory` are reserved. When `bypassDetection` is `true`, `--remote-debugging-port` is also reserved. If you pass arguments for reserved keys, they will be ignored. * `**executablePath**` By default, **your Chrome path is auto-detected** and used. You can override it with any Chromium-based browser (e.g., Chrome, Brave, Vivaldi, Chromium). You can find the executable path by opening chrome://version in your browser. _Note: Some Chromium forks (e.g., Opera) diverge too much and may not work._ * `**headless**` **(default:** `**false**`**)** Runs in the background and uses fewer resources. * `**proxy**` For SOCKS5, prefix with `socks5://`. SOCKS5 auth isn’t supported — `username` and `password` apply to HTTP proxies only. * **More options when** `**bypassDetection**` **is disabled** When `contextControls.bypassDetection` is `false`, Playwright’s `BrowserType.launch` options are available. For the full list, see **launch → Arguments** [**here**arrow-up-right](https://playwright.dev/docs/api/class-browsertype#browser-type-launch) . **Example** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-options-contextoptions) Context Options — `contextOptions` * `**permissions**` ZeroWork always grants `"clipboard-read"` and `"clipboard-write"` so that the Save From Clipboard building block works. * ⚠️ Avoid adding permissions in code later via `context.grantPermissions()` — those won’t automatically reapply on context relaunch. * `**userAgent**` Unless you know exactly what you’re doing, prefer not to change it. If you change `userAgent`, anti-detection may no longer be fully guaranteed. * `**viewport**` **(default:** `**{ width: 1440, height: 900 }**`**)** Takes effect when `maximize` is disabled or when `headless` is enabled. * `**extraHTTPHeaders**` Discouraged, because it can break bot detection bypass measures. Use with care. * **More options when** `**bypassDetection**` **is disabled** When `contextControls.bypassDetection` is disabled, Playwright’s `Browser.newContext` options are available. For the full list, see **newContext → Arguments** [**here**arrow-up-right](https://playwright.dev/docs/api/class-browser#browser-new-context) . * ⚠️ **Warning!** Using Playwright API to set options like `geolocation`, `extraHTTPHeaders`, etc. can harm the built-in bot detection bypass measures. **Examples** **Headless with explicit viewport** **Record a video** * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#config-options-config) Config Options — `config` * `**inheritDefaults**` **(default:** `**true**`**)** Inherits values from Browser Launch Settings or any values previously saved via `zw.browserContext.setDefaults()` for options you don’t specify. Note that if you pass `mode: "sticky"`, the inherited defaults come from the sticky profile’s settings (based on `stickyProfileId`). Likewise, if the current defaults’ mode is set to `"sticky"` but you explicitly pass `mode: "incognito"`, ZeroWork falls back to the built-in baseline defaults and ignores the current defaults. **Example**: If Browser Launch Settings have **Run in background** on and you don’t set `headless` in `launchOptions`, `headless` will be inherited as `**true**`. * `**makeMain**` **(default:** `**true**`**)** — _advanced_ If `true`, the launched context becomes the main context. The previous main context is closed (unless its `keepAlive` setting is `true`). If you set it to `false`, you partially lose automatic lifecycle, retries, and no-code blocks will keep using the old context. * ⚠️ Leave `makeMain` at `**true**` unless you’re deliberately running a self-managed context for an advanced use case. If you do, see [**Adopt Self-Managed Contexts**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-8.-adopt-self-managed-contexts-advanced) for more details further below. * 💡`makeMain: false` is ignored if you launch a context with a sticky profile that is already launched and has already been made main elsewhere. This is because launches of the same sticky browser profile all share the same browser instance, see [**Sticky Profiles**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-5.-persistent-sticky-browser-profiles-clearprofile-cloneprofile) for more details further below. * `**setAsDefaults**` **(default:** `**true**` **if** `**makeMain**` **is** `**true**`**, otherwise** `**false**`**)** — _advanced_ Sets these options for future launches as well as automatic relaunches (e.g., after a staleness or crash recovery) for the rest of the TaskBot run. * ⚠️ If you set `setAsDefaults` to `**false**`, a later relaunch may revert to older defaults. Likewise, if you set `setAsDefaults` to `**true**` while `makeMain` is `**false**`, the main context may relaunch with unexpected, unrelated settings. Prefer keeping the default. * * * #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-provider-contextprovider-advanced) Context Provider — `contextProvider` — _Advanced_ Provide a custom launch callback. Use it when you need a custom-launched context but still want no-code blocks to use it and want to benefit from lifecycle management and relaunch policy. **Use cases** * You must use a browser the ZeroWork launch API doesn’t support out of the box (for example, Firefox instead of Chromium). * You need a 100% pristine context without ZeroWork’s built-in anti-detection measures or defaults. **Example** **Launching Firefox** Because you supply the context, you control `launchOptions` (headless, proxy, etc.), `contextOptions` (viewport, permissions, etc.), window size, and any anti-detection choices. ZeroWork adopts your context, applies `cookies` and `scripts`, then runs `onContextReady`. Use this only if you need full control over browser creation and understand the trade-offs. **These arguments are ignored when** `**contextProvider**` **is set** * `launchOptions` * `contextOptions` * `contextControls.maximize`, `contextControls.bypassDetection` The rest of the arguments apply — including their corresponding defaults if `config.inheritDefaults` is true or left undefined (default is true). > ⚠️ **Exception**: Here, `mode` is always treated as `"incognito"`. If you pass `mode: "sticky"`, ZeroWork throws an error because sticky mode isn’t supported when `contextProvider` is used. Naturally, you fully control what happens inside `contextProvider`, so you _can_ launch with your own persistent browser profile there (e.g., with Playwright’s `launchPersistentContext()`). ZeroWork just won’t treat it as sticky mode, meaning there’s no built-in browser instance sharing and no profile locking. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-3.-defaults-setdefaults-getdefaults-resetdefaults) 3\. Defaults — `setDefaults()`, `getDefaults()`, `resetDefaults()` Defaults are the settings a TaskBot uses when launching or relaunching contexts. You can ensure that any subsequent launch or relaunch uses the settings you want by setting defaults. See [**Core Concepts**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-1.-core-concepts) → **Context (re)launch** for a list of cases when a browser context is (re)launched. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#at-a-glance-1) At a Glance * async `await zw.browserContext.getDefaults()` → returns [`CustomLaunchArgs`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#launch-arguments-customlaunchargs) . * async `await zw.browserContext.setDefaults(args:` [`CustomLaunchArgs`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#launch-arguments-customlaunchargs) `)` → updates the TaskBot-level default launch settings for the current run. * async `await zw.browserContext.resetDefaults()` → resets the TaskBot-level default launch settings to what’s defined in **Browser Launch Settings**. **Notes** * `zw.browserContext.getDefaults()` excludes `config`, which is only meaningful when launching or setting defaults. * In `setDefaults()`, only `config.inheritDefaults` is accepted (`makeMain` and `setAsDefaults` are ignored — they have no effect when setting defaults). #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#examples) **Examples** **Set all subsequent (re)launches to headless** **Discover a sticky profile’s ID** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-4.-context-getcontextinfo-getcontext) 4\. Context — `getContextInfo()`, `getContext()` #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#at-a-glance-2) At a Glance * `zw.browserContext.getContext()` → returns the current main browser context. * async/sync\* `await zw.browserContext.getContextInfo()` → returns: \*`async` in browser, `sync` locally (see [Local vs. Browser Execution](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/write-javascript-upcoming#local-vs.-browser-execution) ). **Working with the returned context** You can call any Playwright `BrowserContext` API. For the full list of available methods, properties and events, see [**here**arrow-up-right](https://playwright.dev/docs/api/class-browsercontext) . > **⚠️ Avoid** adding cookies, scripts, and permissions via the context API (e.g., `context.addCookies()`). Instead, pass them to [`zw.browserContext.launch()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-2.-launch-the-browser-launch) > or [`zw.browserContext.setDefaults()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-3.-defaults-setdefaults-getdefaults) > (e.g., `zw.browserContext.launch({ cookies: [] })`) so that they reapply on relaunch. > ⚠️ **Avoid** changing user agent, timezone, locale, or geolocation (e.g., `context.setGeolocation()`), as this can harm the built-in anti-detection measures. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#examples-1) **Examples** **Add a listener** **Clear cookies** **Relaunch non-headless if the current context is headless** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-5.-sticky-browser-profiles-clearprofile-cloneprofile-listprofiles) 5\. Sticky Browser Profiles — `clearProfile()`, `cloneProfile()`, `listProfiles()` Sticky profiles let multiple TaskBots share one browser session (same cookies/storage/fingerprint) via a persistent, shared user data directory. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#at-a-glance-3) At a Glance * async `await zw.browserContext.clearProfile({ stickyProfileId: number })` → clears the profile, or refuses to clear if the profile is in use. * async `await zw.browserContext.cloneProfile({ cloneTo: { stickyProfileId: number }, cloneFrom: { profilePath: string } })` → clones the profile, or refuses to clone if the **target** profile is in use. You can find the profile path by opening `chrome://version` in your browser and copying the **Profile Path** value. * async `await zw.browserContext.listProfiles()` → lists available profiles. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#behavior) Behavior * **Parallel TaskBots, one instance:** One shared browser instance (with multiple isolated tabs) per `stickyProfileId`. * **In-use lock:** If a profile is in use, both `clearProfile` and `cloneProfile` will fail to avoid breaking active runs. * **Create and discover:** You can create sticky profiles in **Browser Launch Settings**. You can’t create them via the API, but you can: * Create one in the UI (**Browser Launch Settings**). * Copy the profile ID, or run `zw.browserContext.listProfiles()` to discover it. * Use that profile ID as `stickyProfileId` programmatically. * `**contextProvider**` **and sticky mode:** `contextProvider` isn’t supported in sticky mode. If `mode` is `"sticky"` **and** `contextProvider` is provided, ZeroWork throws an error. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#shared-browser-side-effects) Shared Browser Side Effects * **Non-deterministic tab order** across independent TaskBots. If you need to switch programmatically, match by URL and/or TaskBot ID. **Example** * **Attach semantics —** when a browser instance is already live for that profile ID and a launch event attaches to it, browser-level arguments are **ignored** and others are **applied**. By default, applied items affect the whole context, so other TaskBots sharing the instance will see them (except `keepAlive` and `bringToFront`, which apply to this run’s tabs only). **Ignored on attach:** * `launchOptions` * `contextOptions` * `contextControls.bypassDetection`, `contextControls.maximize` **Applied:** * `contextControls.keepAlive`, `contextControls.bringToFront` — apply to this run's tabs only. * `scripts` — scripts that already ran are ignored; any **new** scripts are applied (context-wide). * `cookies` — duplicate cookies by the same `name` + `domain` + `path` are ignored; any **new** cookies are applied (context-wide). * ⚠️ Be careful not to pass conflicting cookies or two distinct cookies with the same `name`/`domain`/`path` (duplicates will be ignored). * `onContextReady` — runs on **every** attach (gate it if you want it to run only on true (re)launches). **Gate example:** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#anti-patterns) Anti-patterns * `**keepAlive**` **caution.** We don’t recommend setting `contextControls.keepAlive` to `true` in `zw.browserContext.launch()` or `zw.browserContext.setDefaults()` when using sticky profiles. After a long device sleep, the connection can drop while the browser stays open, blocking the profile until you restart the Desktop Agent or quit that browser. Remember: only one browser instance can use a profile at a time. Prefer leaving `contextControls.keepAlive: false` for sticky profiles. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-6.-quit-browser-quit) 6\. Quit Browser — `quit()` #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#at-a-glance-4) At a Glance * async `await zw.browserContext.quit(opts?: { forceQuit?: boolean })` → **closes** the current context and the browser instance. #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#behavior-1) **Behavior** * Closes the current run’s pages and attempts to close the browser/context. * Since `zw.browserContext.quit()` is called explicitly, the `keepAlive` setting is ignored. * In sticky profiles: * If other TaskBots are still using the same instance, pages from this run close, but the browser instance does not quit. * If no other TaskBots are using the instance, the browser quits fully. * `forceQuit: true` forces termination even if mode is `"sticky"` and browser is actively shared. Use with care. > 💡Contexts are automatically managed and closed when needed. See [**Core Concepts**](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-1.-core-concepts) > → **Lifecycle**. You only need to call `zw.browserContext.quit()` if it's part of your logic. Otherwise, lifecycle management is handled out of the box. * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-7.-active-page-and-pages-setactivepage-getactivepage-isactivepage-createpage-listpages) 7\. Active Page & Pages — `setActivePage()`, `getActivePage()`, `isActivePage()`, `createPage()`, `listPages()` #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#at-a-glance-5) At a Glance * async `await zw.browserContext.setActivePage(page: Page, options?: { forceContextMismatch?: boolean })` → makes a Page the “active page” used by no-code building blocks that do web interactions. * `zw.browserContext.getActivePage()` → returns `Page | null`, i.e. the page (if any) currently used by the TaskBot and its no-code building blocks. * `zw.browserContext.isActivePage(page: Page)` → returns `boolean` * async `await zw.browserContext.createPage({ url?: string, context?: BrowserContext })` → creates a new page and returns `Page` * `zw.browserContext.listPages()` → returns: **What’s an active page?** The **active page** is the page that no-code web-interaction blocks act on. There can be only one active page at a time. You can open other pages in code, but unless you set one as active, no-code blocks won’t use it. **Example** #### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#notes-and-caveats) **Notes & caveats** `**createPage**` **— create in custom context** — _advanced_ By default, pages are created in the current main context. If you need to create a page in a self-managed, non-main context, you can pass it in `context`, and the page will be created there instead. **Context mismatch &** `**forceContextMismatch**` If the page belongs to a different browser context than the current main context, an error is thrown similar to: > The page you provided belongs to a different browser context than the current main context. If you must use a custom launch flow, provide `contextProvider` in `zw.browserContext.launch()`. If you must use a self-managed context, use `zw.browserContext.adoptContext()` to adopt it before calling `zw.browserContext.setActivePage()`. While not recommended, you can also set `forceContextMismatch` to `true`. * `**forceContextMismatch**` **(default:** `**false**`**)** — _advanced_ * Consider it an **escape hatch**. Setting to `true` is not recommended. * If set to `true`, the page is made active even if it belongs to a foreign context. No-code blocks will now operate on the active page, but inconsistencies can arise when Switch or Close Tabs is used, when a context **relaunches**, or when you use [`zw.browserContext.getContext()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-4.-context-getcontextinfo-getcontext) . * If you must launch a custom context, explore [`contextProvider`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-provider-contextprovider-advanced) in [`zw.browserContext.launch()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-2.-launch-the-browser-launch) first. For more advanced use cases and self-managed contexts, explore [`zw.browserContext.adoptContext()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-8.-adopt-self-managed-contexts-advanced) . **Two ways to hit a mismatch** 1. Launching a second context with `makeMain: false` and creating a page there. 2. Creating a context entirely outside `zw.browserContext.launch()` (e.g., using the Playwright `BrowserType` API). **Bad (illustrative) pattern** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-8.-adopt-self-managed-contexts-advanced) 8\. Adopt Self-Managed Contexts (Advanced) For advanced use cases, you can create additional (non-main), self-managed contexts via `zw.browserContext.launch()` and then let ZeroWork adopt one of them as the active, managed context. **At a Glance** * async `await zw.browserContext.adoptContext(context: BrowserContext)` → adopts a non-main context **launched by** `**zw.browserContext.launch()**` (with `config.makeMain: false`). > ⚠️ Contexts created directly via the Playwright `BrowserType` API are **not** accepted. If you need a custom launch flow, provide it via [`contextProvider`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#context-provider-contextprovider-advanced) > in [`zw.browserContext.launch()`](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#launch-arguments-customlaunchargs) > . **Example** **Switching between two launched (non-main) contexts** * * * ### [hashtag](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#notes) Notes * **Largely unavailable in browser execution.** The `zw.browserContext.*` API is available mostly for local code execution. Only inspection methods `zw.browserContext.getContextInfo()` and `zw.browserContext.getDefaults()` are supported in the browser. [PreviousUtilities (upcoming)chevron-left](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/utilities-upcoming) [NextMetadata (upcoming)chevron-right](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/metadata-upcoming) Last updated 15 days ago * [1\. Core Concepts](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-1.-core-concepts) * [2\. Launch the Browser — launch()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-2.-launch-the-browser-launch) * [3\. Defaults — setDefaults(), getDefaults(), resetDefaults()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-3.-defaults-setdefaults-getdefaults-resetdefaults) * [4\. Context — getContextInfo(), getContext()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-4.-context-getcontextinfo-getcontext) * [5\. Sticky Browser Profiles — clearProfile(), cloneProfile(), listProfiles()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-5.-sticky-browser-profiles-clearprofile-cloneprofile-listprofiles) * [6\. Quit Browser — quit()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-6.-quit-browser-quit) * [7\. Active Page & Pages — setActivePage(), getActivePage(), isActivePage(), createPage(), listPages()](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-7.-active-page-and-pages-setactivepage-getactivepage-isactivepage-createpage-listpages) * [8\. Adopt Self-Managed Contexts (Advanced)](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#id-8.-adopt-self-managed-contexts-advanced) * [Notes](https://docs.zerowork.io/using-zerowork/using-building-blocks/write-javascript/browser-context-upcoming#notes) sun-brightdesktopmoon Copy // Type reference — not runnable in Write JS type CustomLaunchArgs = { mode?: "incognito" | "sticky"; // default: "incognito" stickyProfileId?: number; // used only when mode="sticky" (ignored when mode="incognito") contextControls?: { maximize?: boolean; // default: true bypassDetection?: boolean; // default: false keepAlive?: boolean; // default: false bringToFront?: boolean; // default: true }; onContextReady?: (ctx: BrowserContext) => void | Promise; scripts?: Array<{ path: string } | { content: string }>; cookies?: Array | Array>; launchOptions?: LaunchOptions; // headless, proxy, args, executablePath, etc. contextOptions?: ContextOptions;// viewport, permissions, userAgent, extraHTTPHeaders, etc. config?: { makeMain?: boolean; // default: true inheritDefaults?: boolean; // default: true setAsDefaults?: boolean; // default: true if makeMain=true, else false }; contextProvider?: () => Promise | BrowserContext; // advanced: callback that returns a custom-launched context }; Copy // @zw-run-locally // ✅ Works: launch without passing any arguments await zw.browserContext.launch(); Copy // @zw-run-locally await zw.browserContext.launch({ cookies: [ /** cookie array copied from a website **/ ], }); // Multiple cookies await zw.browserContext.launch({ cookies: [\ [ /** cookie array for website 1 **/ ],\ [ /** cookie array for website 2 **/ ],\ [ /** cookie array for website 3 **/ ],\ ] }); Copy // @zw-run-locally await zw.browserContext.launch({ scripts: [\ { content: `window._usedByTaskBot = ${(await zw.getTaskbotInfo()).id};` },\ { path: "/Users/me/scripts/guard.js" },\ ] }); Copy // @zw-run-locally import * as crypto from "crypto"; await zw.browserContext.launch({ onContextReady: async (context) => { // Example 1: Expose a function from an imported package await context.exposeFunction( "sha256", (text) => crypto.createHash("sha256").update(text).digest("hex") ); // Example 2: Save bandwidth by blocking images await context.route('**/*.{png,jpg,jpeg}', r => r.abort()); }, }); Copy // Type reference — not runnable in Write JS type LaunchOptions = { args?: string[]; // Chrome/Chromium flags; use only for advanced use cases executablePath?: string; // Chromium-based browser path; defaults to Chrome headless?: boolean; // default: false proxy?: { server: string; // "host:port" or "socks5://host:port" bypass?: string; // comma-separated domains username?: string; password?: string; }; // When bypassDetection is false, more options are available (e.g., channel). }; Copy // @zw-run-locally await zw.browserContext.launch({ launchOptions: { headless: true, proxy: { server: "123.45.67.89:3128", username: "username", password: await zw.deviceStorage.get("proxy_password"), }, }, }); Copy // Type reference — not runnable in Write JS type ContextOptions = { permissions?: string[]; // will include "clipboard-read" and "clipboard-write" by default userAgent?: string; // dangerous! Changing can harm anti-detection viewport?: { width: number; height: number } | null; extraHTTPHeaders?: Object // When bypassDetection is false, more options are available (e.g., recordVideo). }; Copy // @zw-run-locally await zw.browserContext.launch({ launchOptions: { headless: true }, contextOptions: { viewport: { width: 1000, height: 600 } }, }); Copy // @zw-run-locally await zw.browserContext.launch({ contextControls: { bypassDetection: false // disable bypassDetection to unlock recordVideo }, contextOptions: { recordVideo: { dir: "/Users/me/zw-runs/videos", size: { width: 800, height: 450 }, }, } }); Copy // @zw-run-locally import { firefox } from "playwright"; const launchFirefoxContext = async () => { const firefoxBrowser = await firefox.launch(); const context = await firefoxBrowser.newContext(); return context; }; await zw.browserContext.launch({ contextProvider: launchFirefoxContext, cookies: [ /** cookies **/ ], scripts: [ /** scripts **/ ], onContextReady: () => zw.log("My Firefox context is ready."), }); Copy // @zw-run-locally await zw.browserContext.setDefaults({ launchOptions: { headless: true } }); await zw.browserContext.launch(); // now guaranteed to launch headless Copy const defaults = await zw.browserContext.getDefaults(); const stickyProfileId = defaults?.mode === "sticky" ? defaults.stickyProfileId : null; await zw.log("Sticky profile ID", stickyProfileId); Copy { id: string, contextProps: { mode: "sticky" | "incognito", stickyProfileId?: number, // when mode="sticky" maximize?: boolean, headless?: boolean, bypassDetection?: boolean, foreignContext?: boolean, // advanced: true if launched with contextProvider }, usedInTaskbots: number[], // TaskBots currently using this context (can be multiple when mode="sticky") currentRunControls: { keepAlive?: boolean, bringToFront?: boolean, }, } | null Copy // @zw-run-locally const context = zw.browserContext.getContext(); context.on("close", async () => { await zw.log("Context is being closed."); }); Copy // @zw-run-locally const context = zw.browserContext.getContext(); await context.clearCookies(); Copy // @zw-run-locally const contextInfo = await zw.browserContext.getContextInfo(); if (contextInfo?.contextProps?.headless) { // Relaunch because a headful browser is required await zw.browserContext.quit(); await zw.browserContext.launch({ launchOptions: { headless: false } }); await zw.log("Browser is relaunched."); const updatedInfo = await zw.browserContext.getContextInfo(); await zw.log("Confirm headless is now false", updatedInfo.contextProps.headless); } Copy // @zw-run-locally const TASKBOT_ID = 1243; const pagesForThisBot = zw.browserContext .listPages() .filter(page => page.usedBy === TASKBOT_ID); Copy // @zw-run-locally await zw.browserContext.launch({ mode: "sticky", stickyProfileId: 6567, onContextReady: async (context) => { // Runs on every attach; gate if you only want true (re)launches if (context._onContextReadyRan === true) { await zw.log("Attach detected — skipping onContextReady."); return; } await zw.log("Running onContextReady on a true (re)launch only."); context._onContextReadyRan = true; }, }); Copy Array<{ page: Page, url: string, isActive: boolean, contextId: string, usedBy: number, // TaskBot ID }> Copy // @zw-run-locally const page = await zw.browserContext.createPage({ url: "https://wikipedia.org" }); await zw.browserContext.setActivePage(page); Copy const page = await zw.browserContext.createPage({ context: myCustomContext }); Copy // 🚫 Bad (illustrative) pattern // Launch main context const context1 = await zw.browserContext.launch(); // Launch a second independent context const context2 = await zw.browserContext.launch({ // 🚫 Bad: makeMain is false → launched a loose, non-managed context config: { makeMain: false } }); const page = await context2.newPage(); // This will throw unless forceContextMismatch is set to true (not recommended) await zw.browserContext.setActivePage(page); Copy // @zw-run-locally // Launch two independent contexts (illustrative; only do this if you truly need it) const LINKEDIN_ACCOUNT_A = [/* cookies */]; const PROXY_USA = { server: "socks5://..." }; const LINKEDIN_ACCOUNT_B = [/* cookies */]; const PROXY_ITALY = { server: "socks5://..." }; const launchArgsA = { cookies: LINKEDIN_ACCOUNT_A, launchOptions: { proxy: PROXY_USA }, contextControls: { keepAlive: true }, config: { makeMain: false }, // create as non-main }; const contextA = await zw.browserContext.launch(launchArgsA); const pageA = await zw.browserContext.createPage({ context: contextA }); const launchArgsB = { cookies: LINKEDIN_ACCOUNT_B, launchOptions: { proxy: PROXY_ITALY }, contextControls: { keepAlive: true }, config: { makeMain: false }, // create as non-main }; const contextB = await zw.browserContext.launch(launchArgsB); const pageB = await zw.browserContext.createPage({ context: contextB }); // Persist references across blocks and TaskBots (same Desktop Agent) const globalState = zw.globalState.access(); globalState.contexts = { A: { context: contextA, page: pageA, defaults: launchArgsA }, B: { context: contextB, page: pageB, defaults: launchArgsB }, }; const adoptSafely = async ({ context, page, defaults }) => { // Adopt the context into the managed flow await zw.browserContext.adoptContext(context); // Ensure continuity on relaunches await zw.browserContext.setDefaults(defaults); // Point no-code blocks to the right page await zw.browserContext.setActivePage(page); }; // Persist helper so it can be called in other TaskBots/blocks globalState.adoptSafely = adoptSafely; // Later in another block or TaskBot: adopt and switch to A await globalState.adoptSafely(globalState.contexts.A); // Later in another block or TaskBot: adopt and switch to B await globalState.adoptSafely(globalState.contexts.B); sun-brightdesktopmoon --- # Email Protection | Cloudflare Please enable cookies. Email Protection ================ You are unable to access this email address docs.zerowork.io ------------------------------------------------------------ The website from which you got to this page is protected by Cloudflare. Email addresses on that page have been hidden in order to keep them from being accessed by malicious bots. **You must enable Javascript in your browser in order to decode the e-mail address**. If you have a website and are interested in protecting it in a similar way, you can [sign up for Cloudflare](https://www.cloudflare.com/sign-up?utm_source=email_protection) . * [How does Cloudflare protect email addresses on website from spammers?](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/) * [Can I sign up for Cloudflare?](https://developers.cloudflare.com/fundamentals/setup/account/create-account/) Cloudflare Ray ID: **9ced4793de242fdf** • Your IP: Click to reveal 54.237.218.47 • Performance & security by [Cloudflare](https://www.cloudflare.com/5xx-error-landing) ---