How to Handle Outlook Add-in Workflows After Sending an Email
Question details
The user needs a way to continue executing tasks in an Outlook add-in after an email is sent, despite the compose pane closing automatically.

- Product
- Microsoft Outlook
- Device & OS
- not provided
- Scenario
- Developing or running a custom Outlook add-in that requires executing background tasks, such as saving email data to a third-party system, immediately after the user sends an email.
- Observed behavior
- In the new Outlook interface, the compose task pane unloads and closes as soon as the email is sent and the application switches to read mode, which abruptly stops any client-side add-in workflow.
Ensure you have an active Microsoft Azure account with administrative privileges to register applications and configure Microsoft Graph API webhook subscriptions.
Implement a Server-Side Workflow Using Microsoft Graph
Use Microsoft Graph change-notification subscriptions to monitor the Sent Items folder instead of relying on the client-side task pane.
Because the new Outlook unloads the compose pane upon sending, a client-side solution is unreliable. A server-side architecture ensures your add-in can securely and reliably trigger post-send actions without relying on the user's active interface.
Log in to the Azure portal, register your custom application, and grant it the necessary Microsoft Graph API permissions to read mail.
Configure a Microsoft Graph change-notification subscription targeting the user's Sent Items folder using the endpoint /users/{user-id}/mailFolders('SentItems')/messages.
Specify the changeType parameter as 'created' so that your webhook only triggers when a newly sent message is added to the folder.
When your server receives a notification from the webhook, use Microsoft Graph to securely retrieve the specific message and execute your workflow, such as saving it to a third-party CRM system.
Implement a background job on your server to periodically renew the Microsoft Graph subscription before its expiration time to maintain continuous monitoring.

Looking for a Lightweight and Free Office Suite?
While configuring complex server-side workflows for Microsoft Outlook, you might be seeking a more streamlined, user-friendly office suite for your daily document needs. WPS Office provides a complete, lightweight alternative that is highly compatible with major document formats.

Frequently Asked Questions
Why does the Outlook add-in task pane close after sending an email?
In the new Outlook, the interface shifts from compose mode to read mode immediately after an email is sent. This state change forces the compose task pane to unload, stopping any active client-side processes associated with it.
Can I force the Outlook compose pane to stay open after sending?
No, the new Outlook architecture does not support keeping the compose task pane open after the sending action is completed. Developers must rely on server-side tracking to handle post-send events.
Are there other ways to detect sent emails besides Microsoft Graph webhooks?
While Microsoft Graph change notifications are the recommended and most efficient approach, you can also implement a polling mechanism via a background service to periodically check the Sent Items folder for new messages.




