Back in May, Microsoft published an article on how to Generative AI Prompts to automate content processing. It’s quite impressive to see how the much the Create text with GPT using a prompt is evolving and with the new AI Hub prompt designer, creating and testing such prompts is easy. However, there are some things to consider if you’re looking to enhance your Power Automate flows and Power Apps with these prompts – content size, execution speed, and error checking.

To illustrate these, I will be using a simple workflow that I built that converts CSV content into JSON – a common use case as today Power Automate is not able to make that conversion without building elaborate parsing and looping flows.
The flow takes as input some CSV content (regardless if it’s comma or tab delimited and what type of newline characters it’s using). I’m then capturing the time before the conversation and right after. Pretty simple. Now let’s look at the actual constrains I encountered.
Content Size
Each model has a limit on the number of tokens you can pass it in a prompt.
- GPT 3.5 – 16k
- GPT 4o – 128k
Think about how large the file may be that you’re passing into the model to ensure you’re not exceeding this limit
Execution Speed
A Power Automate flow can run for 30 days without any issue. This may be sufficient for many GPT operations. However, there is a much shorter execution time of 2 minutes when a flow is being called from a Power App or another flow. Therefore, if the processing of the GPT is very complex, even with little amount of data, it may time out.
Error Checking
It’s always good practice to implement error checking into your flows, particularly in critical data processing steps. This is even more important in AI-based actions, where results may not always be deterministic. One thing you can do is to set the temperature of your prompt model to 0 to get more predictable results. However, in the flow itself, it’s also good to add some guardrails in case the response from the Create text with GPT using a prompt action is not what you expected.
All in all, the use of AI in our Power Automate flows will likely only increase over time but it’s important that we are aware on how to increase its overall benefits. You can learn more about about using AI Builder in your Power Automate workflows at Microsoft Learn.