Is it possible to retrieve the body of the email being replied to in a conversation even we have multiple emails in conversation.
I am attempting to retrieve the email body in compose mode for an Outlook add-in using office.js/MS Graph. However, I'm not able to obtain the specific email body from the conversation when I click to reply. Can anyone help me to write JavaScript solution for this?
I tried this API https://graph.microsoft.com/v1.0/me/messages?$filter=conversationId eq '${conversationId}' but it is fetching whole conversation, but I want only body of the specific email which I want to reply.
The JavaScript API for Office (OfficeJS) doesn't provide anything for that. The best what you can do is to try to explore what MS Graph API provides for dealing with conversations. Office web add-ins deal with with currently opened item only, i.e. work under the context of currently opened or composed item only.
Also you may try to parse the message body text and extract the required part on your own.