# Using Logic Apps with Foundry Agents

# Creating a Foundry agent

If you don’t have an existing Foundry agent, go ahead and [create a foundry agent](https://dimitaronai.com/microsoft-foundry-agents) now. To continue with this example, you should have at least one agent as below:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635417305/b8639919-df56-46eb-84b6-ff012cade22f.png align="center")

---

# Adding an action

Let’s add an action to the agent, which will use an Azure Logic App as a tool. Click on the agent, and on the right side select add for the actions:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635478023/4faa2e69-fb49-47b4-8170-e5883dcb8887.png align="center")

Then, from the options choose Azure Logic Apps:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635512590/c05d5cbf-54de-4084-9087-f5d5764c6dac.png align="center")

You can choose from your own authored actions or Microsoft authored. Let’s use a Microsoft authored action for the weather forecast:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635551055/b3f81865-68ee-4fa0-b594-2b86ffcd58eb.png align="center")

Add the action name and description and choose the resource group, region and subscription needed to create the Logic App:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635588628/0f4dfbc5-5a1e-41a6-b501-5ce9d7af4aaa.png align="center")

Finally, review the `schema` for the logic app workflow:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635620691/326c53da-5d34-4f79-ace7-7c70a85f82b9.png align="center")

If you open the resource group in Azure, you can see that a connector and a Logic App were created automatically.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635670328/d4f75031-2e47-47a9-9897-a2553b3ed7ec.png align="center")

You can also check the workflow in the Logic App designer. What’s important to note is that the trigger is an `HTTP request`.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635701795/f00b6015-d628-4d85-9ce5-b7958bcd4ba9.png align="center")

Looking the actions of the agent again, note that the `weather forecast tool` has been added.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635828958/8df223af-989f-4328-b0ba-babcd2d15e93.png align="center")

To see if this works, open the playground and ask a weather-related question.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635730098/8890f16b-fda5-4d4f-9784-31f1856d633c.png align="center")

Notice that the agent used one tool, which is the Logic App. Checking the execution of the Logic App also shows that it has been invoked.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1769635766302/eaaeb2ba-39f9-4cdc-9d23-ab2da686241a.png align="center")

---
