# Logic Apps

This documentation details how to create a flow in Azure Logic Apps and use it as a connector in Power Omni, allowing AI Agents to execute actions in external systems (e.g., APIs, databases, ERPs).

### 1. Enable Permission in Azure

Before creating the Logic App, it is mandatory to assign the correct permission to Power Omni at the Azure Subscription level.

1. Access the [**Azure Portal**](https://portal.azure.com/) and log in.
2. In the search field, search for **"Subscriptions"**.

   <figure><img src="/files/Pz7vV1kHrsC0gnPhIhSO" alt=""><figcaption></figcaption></figure>
3. Select the subscription where Power Omni is installed.

<figure><img src="/files/CM2MqNP5sWuIR3w6n1Hw" alt=""><figcaption></figcaption></figure>

4. Click **IAM (Access Control)**, then click **Add > Add role assignment**.

<figure><img src="/files/RI10KID3D9tmWO9fqyJD" alt=""><figcaption></figcaption></figure>

5. Search for **Logic App** and select **Logic App Contributor**, then click **Next**.

<figure><img src="/files/zvdByNWTdYUjmCo9kBxN" alt=""><figcaption></figcaption></figure>

6. On the next screen (**Members**), click **"+ Select members"**.

<figure><img src="/files/WAdtciQ6V4IKCW754FtQ" alt=""><figcaption></figcaption></figure>

7. Search for **Power Omni**, select it, and proceed.

<figure><img src="/files/mkhSagJvkyIWF5sUlCdn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bDc5eVZ2IlMnAvzxqphX" alt=""><figcaption></figcaption></figure>

* Click **"Review + Assign"** to complete the role assignment.

Done! After assigning the role, you can proceed to create the Logic App.

### 2. Logic App Configuration in Azure

The Logic App will act as the bridge that receives the request from Power Omni and executes the desired business logic.

#### 2.1 Creating the Logic App Resource

1. Access the [**Azure Portal**](https://portal.azure.com/) .
2. Search for **"Logic Apps"** and click **Create**.

<figure><img src="/files/OQBrK9txaXYwnBMeRy9r" alt=""><figcaption></figcaption></figure>

3. On the creation screen, use the following settings:

* **Plan Type:** Select **Consumption (Multitenant)**.

<figure><img src="/files/3RTdqaUm4J00jCj0QUXH" alt=""><figcaption></figcaption></figure>

* <mark style="color:$danger;">It is important that the Logic App is created in the SAME Resource Group where the Azure AI Foundry resources (and Power Omni itself) were installed, and in the same region.</mark>

<figure><img src="/files/V5VrCWRsLucfGu5baa4T" alt=""><figcaption></figcaption></figure>

* After filling in the information, click **Review + Create**, then click **Create**.
* Wait for the deployment to complete.

<figure><img src="/files/TQoQv3iioLRHvQDD3uzV" alt=""><figcaption></figcaption></figure>

* After deployment, click **Go to resource**.

  <figure><img src="/files/sCkZ9qre318XdKRx2KNe" alt=""><figcaption></figcaption></figure>

#### 2.2 Designing the Workflow

After creating the Logic App, you must design the workflow in the Logic App Designer.\
Click **Development Tools > Logic App Designer**.

<figure><img src="/files/QVOWtW0OBLrsjT0CyGNW" alt=""><figcaption></figcaption></figure>

1. Trigger

   The flow must mandatorily start with the trigger:\
   \&#xNAN;**"When an HTTP request is received"**.

<figure><img src="/files/HVVCbC28dgY7qaDtAz5g" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/GjkXlVh1UYjh0wvzULzC" alt=""><figcaption></figcaption></figure>

2. **Method:** In the HTTP trigger settings, set the Method to **"Allow all methods"**.

<figure><img src="/files/uKf3gQZcxuxUjavq4k3i" alt=""><figcaption></figcaption></figure>

3. **Schema:** To ensure that Power Omni can send structured data to the Logic App, you must define the JSON schema. This schema defines which parameters the AI Agent can send to the Logic App.
4. Actions

   Add the necessary actions (e.g., connect to a system via API, send email, retrieve data, etc.).

<figure><img src="/files/ANHHr859EwqgpyZYmlC9" alt=""><figcaption></figcaption></figure>

5. Response

   The flow must mandatorily end with the **"Response"** action, which will send the execution result back to Power Omni.

<figure><img src="/files/7k4d2HVMnniVG0OjcbkH" alt=""><figcaption></figcaption></figure>

6. After creating the flow, click **Save**.

<figure><img src="/files/mAsxajWjvhDh9jMf5qnZ" alt=""><figcaption></figcaption></figure>

### 3. Configuring the Connector in Power Omni

After the Logic App is created, Power Omni will automatically identify it in the connector listing.

#### 3.1 Creating the Connector

1. Access the **Power Omni Administration Area**.
2. Navigate to **Artifacts > Connectors**.
3. Power Omni will list the Logic Apps that are in the same Resource Group. Locate and select the desired Logic App.

<figure><img src="/files/Ix80DEfp6HoR5p9BnOJY" alt=""><figcaption></figcaption></figure>

4. Fill in the Connector information:

* **Connector Name:** Provide a descriptive name (e.g., "ERP Inventory Query").
* **Description:** Define the text that the AI Agent will use to recognize and trigger this connector (e.g., "check\_inventory", "verify\_API").

5. Connection Configuration

* **Create New Connection:** If this is your first time using this Logic App, provide a name to create the connection.
* If the connection was previously created, click **"Import Existing Connection"** and enter the connection name.

<figure><img src="/files/cK0LytgdRRNMJPxzGSbN" alt=""><figcaption></figcaption></figure>

6. Verify that the Schema was configured automatically.
7. Click **Save**.

### 4. Linking the Connector to the Agent

For an AI Agent to use the new Logic App, it must be linked:

1. Go to the **Agents** section (in the Administration Portal).
2. Edit (or create) the AI Agent that should have access to the connector.

<figure><img src="/files/QpvFwtN9LpV0sULHPwL3" alt=""><figcaption></figcaption></figure>

3. In the Agent configuration, link the newly created connector.

<figure><img src="/files/us6RWZImSszNcwlXsUHR" alt=""><figcaption></figcaption></figure>

4. Save the changes.

{% hint style="success" %}
After that, your Agent is ready to use the created Logic App. Always remember to adjust the Agent’s instructions so that it operates according to the created Logic App.
{% endhint %}


---

# 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.poweromni.ai/en/administration-and-configuration/artifacts/connectors/logic-apps.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.
