web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Building Copilot Agent...
Copilot Studio
Answered

Building Copilot Agent Auto Email Drafts Shared Mailbox

(0) ShareShare
ReportReport
Posted on by 4
Hello to anyone who sees this post.
 
I've been trying to build a simple agent in copilot studio that reads a shared mailbox, if it is a quotation request from a potential customer, not spam or anything else, then it proceeds and generates an automatic DRAFT reply to the customer, based on its knowledge data, for example asking the customer to clarify the quotation request, asking for extra details. This should be a draft, so a real human being can just review it, change if needed and submit. This is to speed up the sales process, so that communicating with customers can be faster, less typing, standardized and having a better tone.
 
I've tried many different ways and am still failing to get the agent to work. There is an issue with shared mailbox, that the "draft email" tool will draft the email in the member account, not inside the actual shared mailbox email, meaning its useless, people will not see the drafts in the shared mailbox. I am not sure if it would be better to use a different tool, or power automate to design the whole thing, or a prompt, or mix of both a tool and power automate to do all this. Also, wondering if converting a shared mailbox to a regular mailbox would be better so that then the "draft email" tool can use the credential from that regular mailbox. But then, would that compromise anything regarding a whole sales team using a regular mailbox account for incoming customer request emails??? Lots of questions, little answers after many hours of fiddling with it. If anyone has any sort of success with something similar, please share anything that can help out :D 
I have the same question (0)
  • Verified answer
    Sam_Fawzi Profile Picture
    943 Super User 2026 Season 1 on at
     
    I hit this exact wall, so hopefully this saves you the hours I lost.
     
    The short version: this isn't something you're misconfiguring, and it's not really fixable at the agent/flow layer. The Office 365 Outlook "Draft an email" action always writes the draft to the Drafts folder of whatever identity owns the connection. "From (Send As)" only changes the sender stamped on the message when it eventually sends, it does NOT change where the draft is stored. So the draft lands in your personal (or the service account's) mailbox, never the shared one. The "Send an email from a shared mailbox (V2)" action doesn't help either because it sends immediately, with no draft variant.
     
    The reason no connector action solves it: all the Outlook connector actions are scoped to "my" mailbox by design. The only interface that lets you address a different mailbox and write into its folders is Microsoft Graph.
     
    What actually works, two Graph calls via "Invoke an HTTP request" (or HTTP with Entra ID):
    1) Create a threaded draft reply directly in the shared mailbox:
    POST https://graph.microsoft.com/v1.0/users/{shared-mailbox-address}/messages/{originalMessageId}/createReply
     
    2) Patch in your generated body:
    PATCH https://graph.microsoft.com/v1.0/users/{shared-mailbox-address}/messages/{draftId}
    { "body": { "contentType": "HTML", "content": "<your reply text>" } }
    The draft shows up in the shared mailbox Drafts folder, in-thread, ready for a human to review and send. Use createReply rather than a plain POST /messages so it stays threaded , matters a lot for a customer inbox.
     
    How I'd split it:
    • Copilot Studio agent (or a prompt) does the thinking: classify quote request vs spam vs other, generate the reply grounded in your KB.
    • Power Automate does the mechanics: trigger on new mail in the shared mailbox then call the agent then the two Graph calls above.
    Don't convert the shared mailbox to a regular mailbox, it needs a license, you have to manage MFA/sign-in for what's really a team inbox, and you lose the delegated multi-user access that makes it work for a sales team. It doesn't get you anything Graph doesn't already.
    On permissions: you can't use the shared mailbox itself as a connection (no interactive sign-in). Either an app registration with Mail.ReadWrite locked down to just that mailbox with an Exchange Application Access Policy (my pick for an unattended flow), or a service account with Full Access to the shared mailbox.
    Also heads up,  the Copilot-in-Outlook "shared mailbox" support Microsoft shipped this spring is a different thing (it's for a licensed human drafting in the client), so don't get your hopes up that it fixes the autonomous path. It doesn't.
    Hope this helps!
  • KS-22072015-0 Profile Picture
    4 on at
    You are an amazing human being, 🙏 thank you so much for responding to this and sharing your invaluable knowledge! I can't wait to try your solution, will post once I get there. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
sannavajjala87 Profile Picture

sannavajjala87 210 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 182

#3
Valantis Profile Picture

Valantis 133

Last 30 days Overall leaderboard