{"id":928,"date":"2025-09-21T19:58:25","date_gmt":"2025-09-21T19:58:25","guid":{"rendered":"https:\/\/www.techpolaju.com\/blog\/?p=928"},"modified":"2025-09-21T19:58:26","modified_gmt":"2025-09-21T19:58:26","slug":"ai-draft-reply-flow","status":"publish","type":"post","link":"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/","title":{"rendered":"Master Power Automate AI Draft Reply Flow in 7 Steps for Effortless Email Replies"},"content":{"rendered":"\n<p>If you\u2019re tired of manually replying to routine emails, the AI Draft Reply Flow can save you time. In this guide, you\u2019ll build a flow that receives an email, sends its content to OpenAI, and creates a professional draft reply automatically in the same conversation thread.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"611\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-25-1024x611.png\" alt=\"AI Draft Reply Flow 7 Steps\" class=\"wp-image-936\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-25-1024x611.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-25-300x179.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-25-768x458.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-25.png 1315w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%8E%AF_What_Youll_Achieve\" >\ud83c\udfaf What You\u2019ll Achieve<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%A7%B0_Prerequisites\" >\ud83e\uddf0 Prerequisites<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%A7%B1_Step-by-Step_Build_the_AI_Draft_Reply_Flow\" >\ud83e\uddf1 Step-by-Step: Build the AI Draft Reply Flow<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_1_Create_a_New_Automated_Flow\" >\ud83d\udd39 Step 1: Create a New Automated Flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_2_Convert_Email_Body_from_HTML_to_Text\" >\ud83d\udd39 Step 2: Convert Email Body from HTML to Text<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_3_Compose_Prompt_for_OpenAI\" >\ud83d\udd39 Step 3: Compose Prompt for OpenAI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_4_Call_OpenAI_API_via_HTTP\" >\ud83d\udd39 Step 4: Call OpenAI API via HTTP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_5_Parse_the_JSON_Response\" >\ud83d\udd39 Step 5: Parse the JSON Response<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_6_Draft_an_Email_Message\" >\ud83d\udd39 Step 6: Draft an Email Message<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%94%B9_Step_7_Update_the_Draft_Email_Fix_Empty_Body\" >\ud83d\udd39 Step 7: Update the Draft Email (Fix Empty Body)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%93%88_Bonus_Tips_for_AI_Draft_Reply_Flow\" >\ud83d\udcc8 Bonus Tips for AI Draft Reply Flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%8F%81_Wrapping_Up\" >\ud83c\udfc1 Wrapping Up<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/#%F0%9F%92%A1_Related_Tutorials\" >\ud83d\udca1 Related Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%8E%AF_What_Youll_Achieve\"><\/span>\ud83c\udfaf What You\u2019ll Achieve<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>By following the AI Draft Reply Flow Steps, you will:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Capture new emails based on a subject filter<\/li>\n\n\n\n<li>Convert the email body HTML to plain text<\/li>\n\n\n\n<li>Send the cleaned text to OpenAI API to generate a reply<\/li>\n\n\n\n<li>Parse the AI\u2019s JSON output<\/li>\n\n\n\n<li>Draft a reply email automatically<\/li>\n\n\n\n<li>Update the draft to include the full AI-generated content<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%B0_Prerequisites\"><\/span>\ud83e\uddf0 Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A Microsoft 365 account with Power Automate<\/li>\n\n\n\n<li><strong>OpenAI account &amp; API key<\/strong>\n<ul class=\"wp-block-list\">\n<li>If you don\u2019t already have an account, sign up at <a href=\"https:\/\/platform.openai.com\/signup\" target=\"_blank\" rel=\"noopener\">https:\/\/platform.openai.com\/signup<\/a>.<\/li>\n\n\n\n<li>After signing in, go to <a href=\"https:\/\/platform.openai.com\/account\/api-keys\" target=\"_blank\" rel=\"noopener\">https:\/\/platform.openai.com\/account\/api-keys<\/a> to create and copy your API key.<br>\u26a0\ufe0f If your account has no free credits you\u2019ll need to add a payment method to purchase credits before the flow can work.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%A7%B1_Step-by-Step_Build_the_AI_Draft_Reply_Flow\"><\/span>\ud83e\uddf1 Step-by-Step: Build the AI Draft Reply Flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_1_Create_a_New_Automated_Flow\"><\/span>\ud83d\udd39 Step 1: Create a New Automated Flow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <a href=\"https:\/\/make.powerautomate.com\" target=\"_blank\" rel=\"noopener\">make.powerautomate.com<\/a><\/li>\n\n\n\n<li>Click <strong>Create > Automated Cloud Flow<\/strong><\/li>\n\n\n\n<li>Name it: AI Draft Reply Flow<\/li>\n\n\n\n<li>Choose trigger: <strong>When a new email arrives (V3)<\/strong><\/li>\n\n\n\n<li><strong>Add a subject filter:<\/strong> \n<ul class=\"wp-block-list\">\n<li>Click \u201c<strong>Advanced parameters<\/strong>\u201d and select \u201c<strong>Subject Filter<\/strong>\u201d to display it.<\/li>\n\n\n\n<li><strong>Subject Filter:<\/strong> Enter \u201cOpenAI API Test\u201d. This filter is only for testing so the flow runs on a limited number of emails. You can change the subject filter to match your own keyword or remove it entirely if you want the flow to run on <strong>all<\/strong> incoming emails.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"599\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-18-1024x599.png\" alt=\"When a new email arrives (V3) trigger\" class=\"wp-image-929\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-18-1024x599.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-18-300x175.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-18-768x449.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-18.png 1284w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_2_Convert_Email_Body_from_HTML_to_Text\"><\/span>\ud83d\udd39 Step 2: Convert Email Body from HTML to Text<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add an action: <strong>Html to text<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Content:<\/strong> Click the <strong>flash icon<\/strong>, then from the dynamic content list select <strong>Body<\/strong> from under the trigger <strong>\u201cWhen a new email arrives (V3)\u201d<\/strong><\/li>\n<\/ul>\n\n\n\n<p>This ensures the AI receives clean text.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"388\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-19-1024x388.png\" alt=\"HTML to Text power automate action\" class=\"wp-image-930\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-19-1024x388.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-19-300x114.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-19-768x291.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-19.png 1068w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_3_Compose_Prompt_for_OpenAI\"><\/span>\ud83d\udd39 Step 3: Compose Prompt for OpenAI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Add an action: Compose<\/strong> with the text below. Copy and paste the entire block into the Compose action.<br>If the <strong>dynamic contents<\/strong> don\u2019t appear automatically, click the <strong>flash icon<\/strong> and select the items from the dynamic content list.<br>\u2013 <strong>Subject<\/strong> comes from the trigger\u2019s dynamic content.<br>\u2013 <strong>Body<\/strong> comes from the <strong>Html to text<\/strong> action\u2019s output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Write a professional draft reply to the following email.\n\nEMAIL START\nSubject: <strong>@{triggerOutputs()?&#91;'body\/subject']}<\/strong>\nBody: <strong>@{body('Html_to_text')}<\/strong>\nEMAIL END\n\nExpected Output:\nReturn your response in the following JSON format (without additional text or explanation):\n{\n  \"Subject\": \"Your reply subject here\",\n  \"Body\": \"Your reply body here\"\n}\n<\/code><\/pre>\n\n\n\n<p>This prompt tells the AI exactly what to return.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"596\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-20-1024x596.png\" alt=\"Compose action\" class=\"wp-image-931\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-20-1024x596.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-20-300x175.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-20-768x447.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-20.png 1081w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_4_Call_OpenAI_API_via_HTTP\"><\/span>\ud83d\udd39 Step 4: Call OpenAI API via HTTP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add an action: <strong>HTTP<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Method:<\/strong> POST<\/li>\n\n\n\n<li><strong>URL:<\/strong> <code>https:\/\/api.openai.com\/v1\/chat\/completions<\/code><\/li>\n\n\n\n<li><strong>Headers:<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>Content-Type<\/code>: <code>application\/json<\/code><\/li>\n\n\n\n<li><code>Authorization<\/code>: <code>Bearer &lt;your OpenAI API key><\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Body:<\/strong> Copy and paste the entire block there.<br>If the <strong>dynamic content<\/strong> doesn\u2019t appear automatically, click the <strong>flash icon<\/strong> and choose the items from the dynamic content list.<br>\u2013 The <strong>Output<\/strong> comes from the <strong>Compose<\/strong> action\u2019s dynamic content.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"model\": \"gpt-5-nano\",\n  \"response_format\": {\n    \"type\": \"json_object\"\n  },\n  \"messages\": &#91;\n    {\n      \"role\": \"system\",\n      \"content\": \"You are an assistant that drafts professional email replies. Always respond only in valid JSON with the fields Subject and Body.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"<strong>@{outputs('Compose')}<\/strong>\"\n    }\n  ]\n}\n<\/code><\/pre>\n\n\n\n<p>This sends the email content to OpenAI for an AI-generated draft.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1001\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-21-1024x1001.png\" alt=\"HTTP action\" class=\"wp-image-932\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-21-1024x1001.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-21-300x293.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-21-768x751.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-21.png 1074w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_5_Parse_the_JSON_Response\"><\/span>\ud83d\udd39 Step 5: Parse the JSON Response<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add an action: <strong>Parse JSON<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Content:<\/strong> Copy and paste the expression below.<br>If you rename the <strong>HTTP<\/strong> action to something else, update the expression accordingly &#8211; replace any spaces in the new action name with underscores.<br><code>@{body('HTTP')['choices'][0]['message']['content']}<\/code><\/li>\n\n\n\n<li><strong>Schema:<\/strong> Copy and paste the JSON schema below into the action.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"type\": \"object\",\n  \"properties\": {\n    \"Subject\": {\n      \"type\": \"string\"\n    },\n    \"Body\": {\n      \"type\": \"string\"\n    }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>This extracts the Subject and Body from the AI\u2019s JSON.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"569\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-23-1024x569.png\" alt=\"Parse JSON action\" class=\"wp-image-934\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-23-1024x569.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-23-300x167.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-23-768x427.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-23.png 1079w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_6_Draft_an_Email_Message\"><\/span>\ud83d\udd39 Step 6: Draft an Email Message<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add an action: <strong>Draft an email message<\/strong><br><strong>Copy and paste the following expression into each field<\/strong> &#8211; or place your cursor in a field, click the <strong>flash icon<\/strong>, and select the value from the dynamic content list.<br>\ud83d\udca1For the <strong>To<\/strong> field, if the flash icon isn\u2019t showing, first click the <strong>gear icon<\/strong> and switch it to <strong>\u201cUse dynamic content\u201d<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>From:<\/strong> <code>@{triggerOutputs()?['body\/from']}<\/code><\/li>\n\n\n\n<li><strong>Subject:<\/strong> <code>@{body('Parse_JSON')?['Subject']}<\/code><\/li>\n\n\n\n<li><strong>Body:<\/strong> <code>@{body('Parse_JSON')?['Body']}<\/code><\/li>\n\n\n\n<li><strong>Advanced Params > Message Id:<\/strong><br><code>@{triggerOutputs()?['body\/id']}<\/code><\/li>\n\n\n\n<li><strong>Draft Type:<\/strong> reply<\/li>\n<\/ul>\n\n\n\n<p>This creates the draft reply in the same conversation thread, but sometimes the body content isn\u2019t saved. To fix this, we\u2019ll use the <strong>\u201cUpdate the Draft Email\u201d<\/strong> action in the next step.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"757\" src=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-24-1024x757.png\" alt=\"Draft an Email Message action\" class=\"wp-image-935\" srcset=\"https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-24-1024x757.png 1024w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-24-300x222.png 300w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-24-768x568.png 768w, https:\/\/www.techpolaju.com\/blog\/wp-content\/uploads\/2025\/09\/image-24.png 1045w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%94%B9_Step_7_Update_the_Draft_Email_Fix_Empty_Body\"><\/span>\ud83d\udd39 Step 7: Update the Draft Email (Fix Empty Body)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add an action: <strong>Update an email draft message<\/strong><br><strong>Copy and paste the following expression into each field<\/strong> &#8211; or place your cursor in a field, click the <strong>flash icon<\/strong>, and select the value from the dynamic content list.<br>\ud83d\udca1For the <strong>To<\/strong> field, if the flash icon isn\u2019t showing, first click the <strong>gear icon<\/strong> and switch it to <strong>\u201cUse dynamic content\u201d<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Message Id:<\/strong> <code>@{outputs('Draft_an_email_message')?['body\/Id']}<\/code><\/li>\n\n\n\n<li><strong>To:<\/strong> <code>@{triggerOutputs()?['body\/from']}<\/code><\/li>\n\n\n\n<li><strong>Subject:<\/strong> <code>@{body('Parse_JSON')?['Subject']}<\/code><\/li>\n\n\n\n<li><strong>Body:<\/strong> <code>@{body('Parse_JSON')?['Body']}<\/code><\/li>\n<\/ul>\n\n\n\n<p>This ensures the draft reply body actually contains the AI content.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%93%88_Bonus_Tips_for_AI_Draft_Reply_Flow\"><\/span>\ud83d\udcc8 Bonus Tips for AI Draft Reply Flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use additional filters (From address, importance) to refine which emails trigger the flow.<\/li>\n\n\n\n<li>Add logging to a SharePoint list for each AI-generated reply.<\/li>\n\n\n\n<li>Monitor API usage to stay within OpenAI limits.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%8F%81_Wrapping_Up\"><\/span>\ud83c\udfc1 Wrapping Up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Your Power Automate AI Draft Reply is now ready. Every time a matching email arrives, Power Automate will call OpenAI, draft a professional reply, and save it as a reply draft in the same thread &#8211; saving you hours of manual work.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%F0%9F%92%A1_Related_Tutorials\"><\/span>\ud83d\udca1 Related Tutorials<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/populate-word-document\/\">\ud83d\ude804 Easy Steps \u2013 Populate Word Document Without Premium License<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/automate-email-to-task\/\">\ud83d\udd04\u00a0Effortless 8-Step Power Automate Email to Task flow Guide<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/power-automate-email-export-in-5-steps\/\">\ud83d\ude80\u00a0Effortless Power Automate Email Export in 5 Steps<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019re tired of manually replying to routine emails, the AI Draft Reply Flow can save you time. In this guide, you\u2019ll build a flow that receives an email, sends its content to OpenAI, and creates a professional draft reply automatically in the same conversation thread. \ud83c\udfaf What You\u2019ll Achieve By following the AI Draft &#8230; <a title=\"Master Power Automate AI Draft Reply Flow in 7 Steps for Effortless Email Replies\" class=\"read-more\" href=\"https:\/\/www.techpolaju.com\/blog\/power-automate\/ai-draft-reply-flow\/\" aria-label=\"Read more about Master Power Automate AI Draft Reply Flow in 7 Steps for Effortless Email Replies\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-928","post","type-post","status-publish","format-standard","hentry","category-power-automate"],"_links":{"self":[{"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/posts\/928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":4,"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/posts\/928\/revisions"}],"predecessor-version":[{"id":940,"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/posts\/928\/revisions\/940"}],"wp:attachment":[{"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/categories?post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techpolaju.com\/blog\/wp-json\/wp\/v2\/tags?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}