--- title: "Make an action optional when web scraping - Mozenda" slug: "set-an-action-as-optional" description: "You can set an action to harvest data optional when a captured item only occurs on some pages. Marking the action as optional will allows the agent to skip over instances when the target element is absent, preventing the agent from stopping mid-way." tags: ["skip over", "ignore", "troubleshooting", "optimize", "avoid", "filter"] updated: 2024-05-14T14:06:07Z published: 2024-05-14T14:06:07Z canonical: "help.mozenda.com/set-an-action-as-optional" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.mozenda.com/llms.txt > Use this file to discover all available pages before exploring further. # Make an action optional You can set an action to harvest data *optional* when a captured item only occurs on some pages. Marking the action as optional allows the agent to skip over instances when the target element is absent, preventing the agent from stopping mid-way. To mark a capture action optional: 1. Open the Agent Builder. 2. Open an agent. 3. In the agent list, right-click on a capture action (like *Capture - Price* below). 4. Select **Optional**. ![Set an Action as Optional_Image1(1)](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/Set%20an%20Action%20as%20Optional_Image1%281%29.png)