Skip to main content
Action: Only Continue If
Updated over 3 months ago

Overview

The Only Continue If action is an orchestration tool that allows you to set conditions for whether the rest of a workflow should execute or not. It enables you to create early stop conditions to prevent downstream actions from running unnecessarily, leading to a cleaner workflow experience with fewer failures. For example, you may want to extract URLs from a website scrape, but only continue with further processing if valid URLs are found. By setting a condition with Only Continue If to check for the presence of URLs, you can skip the scraping step entirely if no URLs are available, preventing potential errors. This action supports various text-based operators (equals, contains, etc.) that can be applied to inputs or outputs from other actions in the workflow. It pairs well with actions like Categorize to create complex conditional logic based on categorizing text inputs against predetermined values.

Usage Examples

  • Prevent failures with stop condition - the "Only Continue If" action is a useful orchestration action that allows you to set a condition upon which the rest of the workflow will run. It helps in creating early stop conditions to prevent workflow failures and ensure a cleaner experience overall. For example, if you are looking to extract URLs from a website scrape but are not sure if you'll find any URLs present, you can use the "Only Continue If" action to make sure that you only run the scrape if a valid URL is received.

  • Categorize and continue? - The "Categorize Text" action can be used in tandem with the "Only Continue If" action to set rigid predetermined values for easy conditions. For instance, you can use "Categorize" to determine if a URL is valid or if you're dealing with a specific product (e.g., a shirt or a pair of pants), and then use the "Only Continue If" action to continue the workflow only if the categorized result meets the specified condition. If your categories are not correctly stopping/continuing workflows, try adjusting the prompts for each category’s description to improve their accuracy.

  • Complex Branching Logic - When used in combination with other orchestration actions like "Run Workflow," "Run Workflow Inline," "Extract Data from Text," and "Categorize," the "Only Continue If" action can create complex branching logic, especially in parent workflows or when trying to return variables that may not be available. This allows for more advanced and conditional workflow execution based on the specified conditions. If you have operators that are not playing nicely together, remember you can chain multiple “Only Continue If” actions in a row.

Inputs

  • Conditions- This is the main input that allows you to set a condition or set of conditions upon which the rest of the workflow will run. You can use logical operators like equals, contains, starts with etc. to define the conditions, which can be chained together with and/or operators. only continue if input text equals "hello world"

Advanced Inputs

  • Continue Message - A custom message that will be returned if the conditions for continuing the workflow are met. Default is "Kept Going". continue message: "Success! Proceeding with workflow."

  • Stop Message - A custom message that will be returned if the conditions for continuing are not met, causing an early stop. Default is "Stopped Early". stop message: "Input text did not match condition. Stopping workflow."

Outputs

The "Only Continue If" action has only one output- it will return the Continue or Stop Message depending on whether or not its conditions are met and then either execute or stop the rest of the workflow.

Troubleshooting

  • Only Continue If Action Not Working as Expected - The Only Continue If action allows you to set a condition upon which the rest of the workflow will run. It is useful for creating early stop conditions to prevent workflow failures and ensure a cleaner experience overall. If this action is not working as expected, double-check the condition(s) you have set and ensure they are properly formatted.

  • Issues with Categorize Action - The Categorize action is often used in tandem with Only Continue If to set a rigid predetermined value against which to check a condition. This allows creating easy conditions for only continuing the workflow, such as checking if a URL is valid or if specific product information is available. If you are having issues with this, ensure the categorize values are set correctly.

  • Complex Condition Logic Not Working - You can add multiple conditions using AND/OR operators with Only Continue If. This allows creating complex branching logic, especially when combined with other actions like Run Workflow, Extract Data from Text, and Categorize. If this complex logic is not working as expected, break it down into smaller pieces to isolate the issue.

Related Actions

  • Categorize Text - The categorize action is helpful when used in conjunction with only continue if. It allows you to set rigid predetermined values and categorically determine if something meets a specific condition. This makes it easy to create conditions for only continue if, such as checking if a URL is valid, if text is in a particular language, or if a product meets certain criteria.

  • Run Workflow - When combined with only continue if, the run workflow action enables creating complex branching logic within a parent workflow. You can use conditions set by only continue if to determine whether to execute a child workflow or follow an alternate path.

  • Run Workflow (Inline) - Similar to run workflow, this action can be used alongside only continue if to create complex branching logic by conditionally executing inline workflows based on the criteria specified.

  • Extract Data From Text - This action is useful when you need to extract specific data from text and ensure that certain conditions are met before proceeding with the workflow. You can use only continue if to verify the extracted data and decide whether to continue or stop the workflow accordingly.

Did this answer your question?