From 1c272d10c9a4be27d11a15bb914cafc2f69502fb Mon Sep 17 00:00:00 2001 From: Esther Fan Date: Wed, 4 Mar 2026 10:29:34 -0800 Subject: [PATCH 1/3] Refine sample description and prerequisites Updated descriptions and prerequisites for terminology, clarity, and consistency with Microsoft writing style. --- .../agents_tools/sample_agents_logic_apps.py | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py index a3294ed803cb..ba18a4db8c27 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py @@ -6,33 +6,30 @@ """ DESCRIPTION: - This sample demonstrates how to use agents with Logic Apps to execute the task of sending an email. + This sample shows how to use agents with Azure Logic Apps to execute a task, such as sending an email. PREREQUISITES: - 1) Create a Logic App within the same resource group as your Azure AI Project in Azure Portal - 2) To configure your Logic App to send emails, you must include an HTTP request trigger that is - configured to accept JSON with 'to', 'subject', and 'body'. The guide to creating a Logic App Workflow - can be found here: - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/agents-logic-apps#create-logic-apps-workflows-for-function-calling + 1) Create a Consumption logic app resource in the same resource group as your Microsoft Foundry project in Azure portal. + 2) For the agent to run the logic app workflow, you must start the workflow with the HTTP **Request** trigger. + To set up the trigger and workflow for sending emails, configure the trigger to accept JSON with the 'to', 'subject', + and 'body' parameter values. To learn how to create a logic app resource and workflow, see: + https://learn.microsoft.com/azure/foundry-classic/openai/how-to/assistants-logic-apps#create-logic-apps-workflows-for-function-calling USAGE: python sample_agents_logic_apps.py - Before running the sample: + Before you run the sample, install the following Azure-related Python client libraries: pip install azure-ai-projects azure-ai-agents azure-identity azure-mgmt-logic - Set this environment variables with your own values: - 1) PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview - page of your Azure AI Foundry portal. - 2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in - the "Models + endpoints" tab in your Azure AI Foundry project. + Set the following environment variables with your own values: + 1) PROJECT_ENDPOINT - The Microsoft Foundry project endpoint. To find this value, in the Foundry portal, go to your project's "Overview" page. + 2) MODEL_DEPLOYMENT_NAME - The deployment name for the AI model. To find this value, in the Foundry portal, go to your project's "Models + endpoints" page, and look in the "Name" column. Replace the following values in the sample with your own values: - 1) - The name of the Logic App you created. - 2) - The name of the trigger in the Logic App you created (the default name for HTTP - triggers in the Azure Portal is "When_a_HTTP_request_is_received"). - 3) - The email address of the recipient. + 1) - The name for the logic app you created. + 2) - The name for the trigger that starts the logic app workflow. The default JSON name for HTTP **Request** triggers is "When_an_HTTP_request_is_received". + 3) - The email address for the recipient. """ From 33013d9b8660964a9deeaae8a0bef6cb2604a7cc Mon Sep 17 00:00:00 2001 From: Esther Fan Date: Thu, 5 Mar 2026 15:37:34 -0800 Subject: [PATCH 2/3] Add missing environment variables SUBSCRIPTION_ID and resource_group_name --- .../samples/agents_tools/sample_agents_logic_apps.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py index ba18a4db8c27..622e095826c0 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py @@ -25,6 +25,8 @@ Set the following environment variables with your own values: 1) PROJECT_ENDPOINT - The Microsoft Foundry project endpoint. To find this value, in the Foundry portal, go to your project's "Overview" page. 2) MODEL_DEPLOYMENT_NAME - The deployment name for the AI model. To find this value, in the Foundry portal, go to your project's "Models + endpoints" page, and look in the "Name" column. + 3) SUBSCRIPTION_ID - The ID for your Azure subscription. + 4) resource_group_name - The name for your Azure resource group. Replace the following values in the sample with your own values: 1) - The name for the logic app you created. From dbbd7a07da5b4de31c367aa5cef01433480db2ed Mon Sep 17 00:00:00 2001 From: Esther Fan Date: Thu, 5 Mar 2026 15:45:17 -0800 Subject: [PATCH 3/3] Fix link and spacing in prerequisites Updated prerequisites section with correct link for creating logic apps workflows. --- .../samples/agents_tools/sample_agents_logic_apps.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py index 622e095826c0..1ecb55b2affc 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py +++ b/sdk/ai/azure-ai-agents/samples/agents_tools/sample_agents_logic_apps.py @@ -10,10 +10,9 @@ PREREQUISITES: 1) Create a Consumption logic app resource in the same resource group as your Microsoft Foundry project in Azure portal. - 2) For the agent to run the logic app workflow, you must start the workflow with the HTTP **Request** trigger. - To set up the trigger and workflow for sending emails, configure the trigger to accept JSON with the 'to', 'subject', - and 'body' parameter values. To learn how to create a logic app resource and workflow, see: - https://learn.microsoft.com/azure/foundry-classic/openai/how-to/assistants-logic-apps#create-logic-apps-workflows-for-function-calling + 2) For the agent to run the logic app workflow, you must start the workflow with the HTTP **Request** trigger. + To set up the trigger and workflow for sending emails, configure the trigger to accept JSON with the 'to', 'subject', and 'body' parameter values. To learn how to create a logic app resource and workflow, see: + https://learn.microsoft.com/azure/foundry-classic/agents/how-to/tools-classic/logic-apps USAGE: python sample_agents_logic_apps.py