How to use the Azure AI Foundry connector in Power Automate

Today I had a look into the Azure AI Foundry connector in Power Automate. My findings on this connector are in the post below.

Azure AI Foundry

Microsoft describes Azure AI Foundry as follows:

Azure AI Foundry has everything you need to design, customize, manage and support AI applications and agents built in GitHub, Visual Studio, Copilot Studio, and Microsoft Fabric with APIs for all your needs.

In this post I will have a look at configuring Azure AI Foundry as well as creating a flow that will use this configuration.

It all starts by visiting https://ai.azure.com or you could get to Azure AI Foundry through https://portal.azure.com as well.

You should get to the following overview that shows you any projects that you may have created in the past. And there is an option to create new projects.

visit Azure AI Foundry using https://ai.azure.com
visit Azure AI Foundry using https://ai.azure.com

Start by pressing the Create new button and then give your project a name. Spaces are not allowed in the project name.

Create an Azure AI Foundry project
Create an Azure AI Foundry project

Now after you click on Create the project will be created.

Creating a project can take a while
Creating a project can take a while

While the above step is creating my Azure AI Foundry project I had a quick look in Azure fro some reason resources are being created in Sweden.

Check in Azure Portal the resources created
Check in Azure Portal the resources created

Once the project has been created, we can configure the project. There are a few pieces of information that we will need later on in Power Automate. No need to take notes as you can access these later on as well.

  • API Key (this is hidden, but you can either click on the show or copy icon to get this)
  • Then there is the endpoint.
Project Overview of an Azure AI Foundry project
Project Overview of an Azure AI Foundry project

The endpoint should look something like this:

https://demoazureaifoundry-resource.services.ai.azure.com/api/projects/DemoAzureAIFoundry

Create a ChatGPT 4.1 model

By Selecting Model Catalog we can create various models. I’m going to use Chat GPT 4.1.

Create a GPT 4.1 model
Create a GPT 4.1 model

I can now either find tune the model or use the available model. If I choose to fine tune the model I could further train the model, however for this post I’m going to skip that step.

Fine tuning the GPT model
Fine tuning the GPT model

By clicking on the Use This model, our model will be created.

Use this model
Use this model

And the deployment can then be kicked off.

Deploy the model
Deploy the model

Once deployed we can collect the Key and the endpoint within the Models + endpoint section.

Target URI and Key for our Azure AI Foundry model
Target URI and Key for our Azure AI Foundry model

Create a connection in Power Automate for Azure AI Foundry

We could use the HTTP action to connect to Azure AI Foundry instead of using the connector. However as the connector is available we might as well use that.

Within Power Automate we can create a connection using the following form in the connection settings:

Create an Azure AI Foundry connection in Power Automate
Create an Azure AI Foundry connection in Power Automate

First the Target URI we can collect from the earlier shown Model + endpoints screens. Then The API key we can copy from there too.

Both the Model Deployment name and the Base Model Name I set to gpt-4.1

And the connection is now all up and running.

Building the flow with the Azure AI Foundry connector in Power Automate

To Build a quick example flow, I separated my conversation into a compose action.

A flow showing the Azure AI Foundry chat completion action
A flow showing the Azure AI Foundry chat completion action

And now when I run this flow, I got the following output:

[
  {
    "content_filter_results": {
      "hate": {
        "filtered": false,
        "severity": "safe"
      },
      "self_harm": {
        "filtered": false,
        "severity": "safe"
      },
      "sexual": {
        "filtered": false,
        "severity": "safe"
      },
      "violence": {
        "filtered": false,
        "severity": "safe"
      }
    },
    "finish_reason": "stop",
    "index": 0,
    "message": {
      "annotations": [],
      "content": "Thatโ€™s wonderful! Paris is a city full of history, art, and romance. Here are some must-see highlights and experiences for your trip:\n\n### Iconic Landmarks\n1. **Eiffel Tower**  \n   Go up for spectacular views, or enjoy a picnic in the Champ de Mars park.\n2. **Louvre Museum**  \n   Home to the Mona Lisa, Venus de Milo, and countless masterpieces.\n3. **Notre-Dame Cathedral**  \n   Even after the fire, the exterior and nearby รŽle de la Citรฉ are worth visiting.\n4. **Sainte-Chapelle**  \n   Stunning stained glass windowsโ€”a hidden gem near Notre-Dame.\n5. **Arc de Triomphe & Champs-ร‰lysรฉes**  \n   Climb to the top for a panoramic view down Parisโ€™s grand boulevards.\n\n### Charming Neighborhoods\n1. **Montmartre**  \n   Cobblestone streets, Sacrรฉ-Cล“ur Basilica, artistsโ€™ square (Place du Tertre), and lovely cafรฉs.\n2. **Le Marais**  \n   Trendy boutiques, historic Jewish quarter, delicious falafel, and the beautiful Place des Vosges.\n3. **Latin Quarter**  \n   Lively student area with bookshops (like Shakespeare and Company), bistros, and the Panthรฉon.\n\n### Art & Culture\n- **Musรฉe dโ€™Orsay**: Impressionist and Post-Impressionist masterpieces in a gorgeous former train station.\n- **Centre Pompidou**: Modern and contemporary art, and a funky building design.\n- **Opรฉra Garnier**: Stunning architecture and, if possible, catch a ballet or opera.\n\n### Parks & Outdoor Spaces\n- **Jardin du Luxembourg**: Beautiful gardens, great for a stroll or picnic.\n- **Tuileries Garden**: Between the Louvre and Place de la Concorde.\n- **Seine River**: Take a sunset cruise or a walk along the banks.\n\n### Food & Markets\n- **Parisian cafรฉs**: Try a croissant and coffee on a terrace.\n- **Rue Cler or Marchรฉ Bastille**: Traditional food markets.\n- **Pรขtisseries and boulangeries**: Taste macarons, รฉclairs, and baguettes.\n\n### Unique Experiences\n- **Catacombs of Paris**: Underground ossuariesโ€”spooky and fascinating.\n- **Versailles**: A short train ride awayโ€”donโ€™t miss the palace and gardens.\n- **Covered Passages**: 19th-century shopping arcades like Galerie Vivienne.\n\n### Tips\n- Paris is best explored on foot or via the easy-to-use Metro.\n- Book tickets for major attractions in advance to avoid long lines.\n- Try to learn a few basic French phrasesโ€”itโ€™s appreciated!\n\nLet me know your interests (art, food, shopping, history, etc.), and I can tailor recommendations even more! Bon voyage!",
      "role": "assistant"
    }
  }
]

That is great! However, before the flow suddenly worked I had quite a few flow runs that failed with a Resource not found error. This just disappeared after a while. Be very patient!

Failed flow run as model takes time to be available
Failed flow run as model takes time to be available

Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Related Posts

5 thoughts on “How to use the Azure AI Foundry connector in Power Automate

  1. Hi Pieter
    I have followed your instructions to the letter with the exception that my Tenancy is in the UK South. I have tried in a Development Environment and in the default environment and I still get “Resource Not Found” after 24 hrs. Did you ever find out what the problem was ?

    Regards

    Nigel

  2. This is awesome, any idea if we can link the charges to a single service account, without having to get all users to buy premium licenses?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.