Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save multiple emails at the same time, save emails on user send email event and drag and drop - Technical advice required #4059

Closed
C6900811 opened this issue Jan 26, 2024 · 6 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)

Comments

@C6900811
Copy link

Dear Community,

We are working on a new M365 Outlook Add-in (Web Add-in) and we would like to do three things:

Save multiple emails at the same time from Outlook to our Platform via the Add-in (user selects multiple emails via the UI). How can we fetch multiple emails at the same time through Graph API as .msg or .eml files on our platform? How can we get a list of selected emails from O365? Is there any way be which we pass the selected message ID and get the all the selected emails in single request?

Save emails on "Send" event, when user is writing a new email and sending it, we would like to save it to our Platform via the Add-in. Is there a way to do that? (it can be instant or asynchronous)

Drag and drop files or emails to the Add-in, when user receive a new email and wants to save it to a specific folder on our platform, user would like to drag and drop it so that it takes the minimum amount of time. If it's not possible to do it through the Add-in, do you have any alternative path in mind?

We have made some technical research, but we couldn't find an adequate process to do it. Do you have any recommendations or advice?

Thank you!!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 26, 2024
@exextoc exextoc added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 26, 2024
@exextoc exextoc self-assigned this Jan 26, 2024
@C6900811
Copy link
Author

It looks like with the Viva Insight Application, you managed to keep the Add-in panel visible (ours is disappearing when selecting multiple emails). Could you please give us some guidance on how to do it?
image

@besiler
Copy link

besiler commented Feb 9, 2024

  1. This is the Graph API for getting multiple emails: https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http. When using this API, you can $filter to get just the emails you want by their IDs. However, this API returns HTML versions of the emails. You can also use this API to get the MIME (.EML) versions of the emails: https://learn.microsoft.com/en-us/graph/api/message-get?view=graph-rest-1.0&tabs=http. I'm not sure if that API will return multiple emails per call or not, however. Our team supports the Office JS APIs used to get data from the Outlook client, so we don't have all the answers about Graph.
  2. For saving the email on send, you can either use an event-based add-in to save at the moment of send from Outlook or you can wait until after the message is successfully sent to get it from Exchange through Graph. If you use the event-based approach to save on send, this doc covers how to add that to your add-in: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch. There's also an example of a similar scenario: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough?tabs=jsonmanifest. Please be aware that if you use this method of saving on send in the client, there may be other add-ins running on send as well that can modify the message after your add-in processes it. Getting the message after send from Graph through the APIs above ensures you would get the final version. You may run into an issue here where Exchange assigns the ID of a message after Exchange receives it (that is, after the client has sent it), so the client doesn't know the ID beforehand.
  3. Drag and drop does sound like a good way for users to identify which messages they want to save, but we don't support it today. A similar approach might be having the users open your task pane, select the messages they want, and then provide a "save" button in the task pane that saves the selected messages to your backend through the Graph APIs.
  4. Did you already add support for multiselect as documented here? https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/item-multi-select? If so, we'll maybe need your manifest to repro the issue. This isn't the expected behavior, so if you check over that multiselect doc and nothing looks out of place in your add-in let's discuss repro steps out of this public forum so we don't overshare data.

@besiler
Copy link

besiler commented Feb 15, 2024

@C6900811 By the way, Tina who works with you as a cloud architect has reached out directly as well to see if you need any help with structuring the graph queries. Let us know if you need a direct connection to her

@millerds
Copy link

millerds commented Jul 9, 2024

Did all that make sense?

@millerds millerds added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Jul 24, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label Jul 29, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)
Projects
None yet
Development

No branches or pull requests

4 participants