home logo Similartool.AI
Homeright arrowAI Newsright arrowhow-to-implement-openai-s-chatgpt-in-power-automate-desktop

How to Implement OpenAI's ChatGPT in Power Automate Desktop

By Anders Jensen     Updated Feb 27, 2024

Learning to integrate OpenAI's ChatGPT into Power Automate Desktop is a game-changer for automation developers in 2023. I'm Anders Jensen from I Love Automation, and I'm here to walk you through the process.

1. Getting Started with the Endpoint

The first step is to secure the most up-to-date API endpoint by visiting the URL provided in the video description. This endpoint is dynamic, so ensure you're getting the latest one directly from the source each time you set up the flow.

Once you have the endpoint, it's time to open Power Automate Desktop. Here, navigate to the actions tab and add an 'Invoke web service' action, which will serve as the REST API call to interact with ChatGPT.

In the action settings, paste in your endpoint URL and configure the method as POST. This will dictate that your interaction with the API involves sending data to the service and waiting for a response.

2. Setting Headers and Preparing the Request Body

Proper headers are crucial. For authorization, add a 'Bearer' token followed by a space, then your personal API key obtained from the OpenAI platform after logging in. Remember to grab a fresh key from the platform to prevent unauthorized access issues.

When constructing the request body, grab the optimal JSON structure from the helping document. It contains elements like the 'model' you're calling, in this case, 'text-davinci-003', and a placeholder for the prompt you'll replace with dynamic input later on.

Carefully consider the 'max_tokens' setting—it determines how verbose ChatGPT's response will be. Set the 'temperature' to control random variations in responses. Finally, configure the 'n' parameter for the number of completions you want per prompt.

3. Community Engagement and Troubleshooting

Enhancing your RPA journey isn't just about implementing the latest tools; it's also about community engagement. A Discord has been set up to network and collaboratively solve RPA challenges. The link is in the video's description.

Some users may encounter issues such as exceeding their quota. This can be addressed by checking your plan details on OpenAI's platform. New subscribers may also be eligible for $18 of free credit, so be sure to verify this if it's not reflected in your account.

There's been some confusion about whether ChatGPT's OpenAI API is the same as the Pro accounts. Be aware that the authentication process during setup indeed associates your flow with an OpenAI API account, which may be separate from other accounts or services.

4. Advancing Capabilities and Seeking Support

As the tool evolves, keep an eye out for new products like extensions and plugins that integrate ChatGPT on various platforms, designed to boost productivity and the efficacy of prompt crafting across multiple scenarios.

For those who successfully implemented the integration, it's a joyful advancement as it alleviates the need to navigate ChatGPT's web interface, streamlining workflows directly through Power Automate Desktop.

If you encounter errors, such as missing model parameters in your API call, ensure that the model is specified correctly in the request body. The helping document and OpenAI documentation are good resources for troubleshooting these issues.


If you’re keen to make your Power Automate Desktop flows smarter with the power of ChatGPT, this guide is for you. We’ll cover getting the latest API endpoint, setting up an Invoke web service action with the correct headers and body content, parsing the response from ChatGPT, and utilizing this in a workflow. Join the automation revolution and enhance your RPA capabilities with ChatGPT!