# Exists Check

**Exists Check** node is designed to verify the existence of any value accessible through [Magical Autocomplete](/flow-builder/cql-cosmocloud-query-language/magical-autocomplete.md) within the current flow. This node can check for the existence of node data, variables, token data, custom secrets, and more, providing a boolean result that can be used for conditional logic in your workflow.

### Properties Panel

| **Field**              | **Description**                                                                      | **Required** |
| ---------------------- | ------------------------------------------------------------------------------------ | ------------ |
| Node name              | [Node Name](https://docs.cosmocloud.io/concepts-and-in-depth/flow-builder/node-name) | true         |
| CQL reference to check | The CQL reference to the value being checked for existence.                          | true         |

### Usage

1. Specify the CQL reference of the value you want to check for existence.
2. The node will return a boolean value indicating whether the referenced item exists.

### Behaviour

* The node evaluates the provided CQL reference within the current flow context.
* If the referenced item exists, the node returns `true`.
* If the referenced item does not exist, the node returns `false`.
* The result can be used in subsequent nodes for conditional branching or decision making.

### Returns

The node returns a boolean value:

* `true` if the referenced item exists
* `false` if the referenced item does not exist

You can access this result using Magical Autocomplete (e.g., `$.<node_name>.result`) in any node below this node.

### Example

Let's say you want to check if a variable named `user_id` exists in the current flow:

1. Set CQL Reference to `$.variables.user_id`

If `user_id` exists in the flow, the node will return `true`. If it doesn't exist, it will return `false`.

### Best Practices

* Use this node to validate the presence of data before attempting to use it in your flow.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cosmocloud.io/flow-builder/node-types/variable-nodes/special/exists-check.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
