# Execute Function

**Introduction**

The "Execute Function" step allows you to run a predefined function within your automation, providing inputs and managing the execution mode. This step is useful for reusing logic encapsulated in functions and integrating them into your automation workflows.

**Configuration**

* **Function**: The function to be executed. This parameter is required and defines the logic that will be run.
* **Mode**: The execution mode of the function, which determines how the function runs. This parameter is required.
* **Inputs**: The inputs required by the function. These are dynamically generated based on the selected function's input parameters (if there are any).

**Outputs**

* **Output**: The result returned by the function after execution (if the function returns an output). This output can be used in subsequent steps or actions.


---

# 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.flexy.bot/modules/scripting/steps/execute-function.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.
