How to Connect Your Azure GPT Instance/Execute KI with Power Automate

In my last blog post, I showed you how to set up your very own GPT instance in Azure. Pretty cool, right? But setting it up is just the beginning. Today, I’ll take it one step further and show you how to actually talk to your AI—this time via Power Automate.

Now, you might be asking: “Why would I even need that?” Well, the real magic lies in automation. Imagine combining AI-generated responses with your daily workflows. You could:

  • Automate email replies with a touch of personality
  • Build an intelligent chatbot for internal tools
  • Enrich approval flows with AI-driven summaries

Or just… have a little fun experimenting with creative use cases! Honestly, the possibilities are endless. Let’s dive in.

What You’ll Need

Before we jump into the “how-to,” let’s make sure you’ve got everything in place:

  • An existing GPT instance in Azure, including an API key (check my previous blog for the full setup guide).
  • Power Automate Premium (or any license that supports premium connectors).

Step 1: Grab the Essentials from Azure

We’ll pick up right where we left off: in the playground of your model.

Click on “View Code.” Then, switch the language to JSON (top-right corner). Of course, if you prefer, you can check out the code examples for other programming languages too.

Now hit “Key Authentication.” This will reveal two golden nuggets:

  • Endpoint
  • API Key

Copy those down — we’ll need them soon.

Bild1
Bild2

Step 2: Build a Flow in Power Automate

Time to make things happen in Power Automate.

  1. Create a new flow (manual trigger is fine for testing).
  2. Add an HTTP action.
  3. In the URI, paste the Endpoint URL you grabbed earlier.
  4. Under Headers, add -> Key: api-key | Value: your copied API key

In the Body, paste in your sample prompt. Something like this:

{
  "messages": [
    {
      "role": "user",
      "content": "Tell me a joke!"
    }
  ]
}
Bild4

Step 3: Test and Enjoy!

Run the flow, and boom—you’ll get your AI-generated response right in Power Automate.

Bild 5

To put the response in a variable you can parse it with a json action or get it directly with an expression formular:

body('HTTP')?['choices'][0]['message']['content']
Bild6
Bild7

And that’s it! You’ve just built your very first AI-powered automation flow.

Leave a Reply

Your email address will not be published. Required fields are marked *