DeepSeek is making waves in the world of Large Language Models (LLM) for two big reasons. First, it’s incredibly cost-effective, much more affordable compared to other top-tier reasoning models. The savings are significant when you compare it to higher-priced alternatives. Second, DeepSeek’s performance is impressive, even though it uses lower-cost hardware and training than some of the bigger U.S.-based companies. Plus, DeepSeek’s R1 model is open-source, so anyone can play around with it!
Now, let’s get to the fun part: connecting DeepSeek with Power Automate! Automating tasks with AI is easier than ever, and with DeepSeek’s chat and reasoning models, you can get your workflows running smoothly.

By the end of this guide, you will have a Power Automate flow that sends a query to DeepSeek and gets a response. Let’s get started!
What is the DeepSeek API?
DeepSeek’s API offers two main features:
- Chat Completion Model: This is great for handling conversations and generating relevant responses.
- Reasoning Model: This model shines when you need to make logical decisions or solve problems.
Both are budget-friendly and easy to integrate, making them perfect for all sorts of tasks.
What You’ll Need Before You Start
Before jumping in, make sure you have these:
- DeepSeek API Key: Sign up on DeepSeek’s platform to grab your API key.
- Power Automate Account: You will need access to Microsoft Power Automate.
- Basic Power Automate Knowledge: If you know how to create flows, this will be a breeze.
Step-by-Step Guide to Connect DeepSeek API with Power Automate

Step 1: Get Your DeepSeek API Key
- Log in to your DeepSeek account.

- Go to the API settings and create your key.

- Copy that key—you will need it in the next steps.
- Top up the account with a minimum of 2 USD.
Step 2: Set Up a Flow in Power Automate
- Log in to Power Automate.
- Click Create and select Instant Cloud Flow.

- Name your flow and choose a trigger (for example, “Manually trigger a flow”).

Step 3: Add an HTTP Action to Call DeepSeek
- Click + New Step and search for HTTP.
- Configure the action like this:

URI: https://api.deepseek.com/chat/completions
Headers:
Content-Type: application/json
Authorization: Bearer (PASTE THE API KEY COPIED HERE)
Body:
{
"model": "deepseek-reasoner",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Tell me a joke about HR"}
],
"stream": false
}
Step 4: Capture the output
- Add a Compose Action
- Copy the below function
body('HTTP')?['choices'][0]['message/content']
You take take a step further and add an action to send the response to an email, Teams message, or wherever you need it.
- Test the flow to make sure everything works!

Here’s the output:
“Sure! Here's a light-hearted HR joke for you:
Why did the HR manager go to art class?
Because they wanted to learn how to draw the line between professional and personal! 😄”
Now, let’s try using the reasoning model with a small tweak to the API request. All you need to do is change the model name to “deepseek-reasoner.” Just to make things interesting, I have given a bit of a tricky question this time.
Here’s the modified API request:
{
"model": "deepseek-reasoner",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "A company has a budget of $10,000. They spend 30% on marketing, 20% on R&D, and the rest on salaries. How much is spent on salaries?"}
],
"stream": false
}
I also added another Compose Action to capture the “reasoning.”

Use the function below in the new Compose Action (notice that I have renamed it to “Reasoning”).
body('HTTP')?['choices'][0]['message/reasoning_content']
- Test the flow again.
Here’s the output.
The company allocates 30% of its $10,000 budget to marketing and 20% to R&D. Together, these account for 50% of the budget. The remaining 50% is allocated to salaries.
**Calculations:**
- **Marketing:** 0.30 × $10,000 = $3,000
- **R&D:** 0.20 × $10,000 = $2,000
- **Total for Marketing + R&D:** $3,000 + $2,000 = $5,000
- **Salaries:** $10,000 - $5,000 = **$5,000**
**Answer:** $5,000 is spent on salaries.
Here is its thinking process aka “reasoning”
Okay, let's see. The company has a total budget of $10,000. They spend 30% on marketing and 20% on R&D. The rest goes to salaries. I need to figure out how much is spent on salaries.
First, I should calculate the percentages spent on marketing and R&D. Then, subtract those amounts from the total budget to find the salaries. Alternatively, maybe I can find the percentage allocated to salaries first and then calculate the amount. Let me think which way is better.
So, total budget is $10,000. Marketing is 30%, R&D is 20%. So combined, that's 30 + 20 = 50%. Therefore, the remaining percentage should be 100% - 50% = 50%. So salaries would be 50% of the total budget. Then 50% of $10,000 is $5,000. That seems straightforward.
Wait, let me double-check. If I calculate each expense separately first. Marketing: 30% of 10,000. That's 0.3 * 10,000 = $3,000. R&D: 20% of 10,000 is 0.2 * 10,000 = $2,000. Adding those two gives 3,000 + 2,000 = $5,000. Subtract that from the total budget: 10,000 - 5,000 = $5,000 for salaries. Yeah, same answer. So either way, the salaries are $5,000. That makes sense. Both methods give the same result, so I think that's correct. I don't see any mistakes here. The key was realizing that the remaining percentage after marketing and R&D is 50%, which applies to the total budget.
What Can You Do with DeepSeek and Power Automate?
Here’s how integrating DeepSeek can make your workflows smarter:
- Automate repetitive tasks with intelligent responses.
- Add conversational AI to your processes.
- Improve decision-making using DeepSeek’s reasoning abilities.
Whether it’s customer support, data analysis, or other tasks, DeepSeek’s API integration can help your team work more efficiently.
Wrapping It Up: Why You Should Try It Now
Integrating DeepSeek with Power Automate is a game-changer when it comes to automating smarter workflows. Its low cost and powerful reasoning capabilities give you endless possibilities. So why not give it a shot? Start experimenting today and see how much more efficient your tasks can be!
Got Questions or Success Stories?
Tried integrating DeepSeek with Power Automate yet? Or maybe you have got a cool use case to share? Drop a comment below and let’s chat!