Jump to a Section
  • If Error

    Specify alternate actions to handle an error without stopping your Flow.

    The function gives you something that looks more like a container than a card, allowing you to specify:

    • Try - one or more Actions and/or Functions you want to run.
    • If Error - the alternate Actions and Functions to execute if there’s an error in any of the Try steps.
    • Outputs (optional) - output fields that can be used in subsequent steps of the Flow. The value assigned to each output depends on whether or not there was an error.

    Try

    When you create a new If Error, the first step is to define your Try steps. These are one or more Actions and/or Functions to run. Add cards to this container just as you would elsewhere in a Flow.

    Tip: To add error handling to an existing set of steps in your Flow, insert the If Error block to the right of the cards you want in your Try block and then drag them in, one by one, starting with the rightmost card.

    If you want to retry a step automatically before handling the error, see also Error Handling options.

    If Error

    Use the dropdown at the top left to switch between the _Try_ steps and If Error steps.

    The If Error block contains the steps you want to take to handle the error. Insert Actions and/or Functions just as you would elsewhere in a Flow.

    Given to you at the beginning of each If Error block is an Error object. This object contains the details of the error in the Try block that results in a switch to the If Error block, including: message - the text of the error message (when available), code - the error code (e.g. 500), method - the ID for the step where the error occurred, Flow - the ID of the Flow, and execution - the ID of the particular execution of the Flow. You can use these values in your error handling steps, for instance, if you want to send an email with details of the error, or conditionally check whether or not to proceed based on whether it’s an expected error.

    NOTE: Return and Continue If will typically end a Flow but behave differently when inside a Try or If Error block. Think of Try or If Error blocks as anonymous child Flows – and just as when you call a child Flow, a Return returns you to the parent. So, a Return or Continue-If (when false) inside a Try or If Error block proceeds to the step immediately after the If Error container. Use Return Error or Return Error If, or a Continue-If outside the If Error, you want to halt the Flow rather than continue.

    Output Fields (Optional)

    You can drag outputs from cards that run before the If Error into a Try or If Error block, but you cannot drag outputs from inside the Try or If Error block to cards that are run after the If Error. This is because a step from inside a Try or If Error may not always run. The way to get around this is to use the optional Outputs feature.

    You access the Outputs by clicking View Outputs, which can be found on the top-right of the If Error container. This opens up a pane that appears to the right of the Try and If Error blocks. Click to add a new output – you can type the name and choose the type. Beneath each output you get two inputs: one for the case that there is no error (drop an output here from the Try block) and the other for the case there is an error (drop an output here from the If Error block).

    The Outputs in this pane can be mapped to subsequent steps in the Flow.

  • Return Error

    Throw an error and end the Flow.

    Input Fields

    • statusCode: a status code that indicates the type of error thrown
    • message: the content of the error message

    Output Fields

    No output fields.

  • Return Error If

    Throw an error and halt the Flow if a conditional test is true. If you want to conditionally stop a Flow but under normal circumstances so it doesn’t appear as an error, use Continue If instead.

    Input Fields

    • value a: the value to be compared
    • comparison: what comparison to make (see table below)
    • value b: the value to compare against
    • message: the error message to return when the condition is true and the Flow halts
    • statusCode: a status code number that indicates the type of error thrown

    IMPORTANT: Be sure to set the type of value a and value b to reflect how you would like the comparison to be done. For instance, the operator “greater than” compares numbers based on numeric value but text based on alphabetical sort order. So the number comparison 80 > 9 is true, but the text comparison “80” > “9” is false.

    Table of Relational Operators
    Operator Use Case
    equal to Compare two texts, numbers, dates or true/false to see if they have the same value
    not equal to Compare two texts, numbers, dates or true/false to see if they have different values
    greater than or equal Compare two texts, numbers or dates to see if the first has the same or greater value than the second.
    less than or equal Compare two texts, numbers or dates to see if the first has the same or lesser value than the second.
    greater than Compare two texts, numbers or dates to see if the first has a greater value than the second.
    less than Compare two texts, numbers or dates to see if the first has a lesser value than the second.
    a multiple of Compare two numbers to see if value a is an exact multiple of value b. (e.g. 12, 0 and -4 are all multiples of 4, but 2, 3 and 7 are not.)
    in Compare two texts to see if value a is a part of value b. (e.g. “test” is in “this is a test”, but there is no “i” in “team”)
    not in Compare two texts to see if value a is not part of value b.
    has key When value a is an object and value b is text, tests to see if the object has a key with the specified name. (e.g. true if value a is {"test":123} and value b is "test")
    doesn’t have key When value a is an object and value b is text, tests to see if the object does not have a key with the specified name.
    is empty Checks to see if value a is empty; ignores value b. What defines “empty” varies by type. Note: Only works for Text and Object. (Numbers, Dates, T/F, are viewed as empty).
    is not empty Checks to see if value a is not empty. Note: Only works for Text and Object. (Numbers, Dates, T/F, are viewed as empty).

    Output Fields

    No output fields.