Is it possible to query for the first, or all emails from a particular conversation id using the Microsoft Graph? If not, how about with the classic Exchange API?
Scenario: I am creating an application where I am interested in tracking the user who started an email thread, and the content of their initial message.
When querying for mail using the Microsoft Graph, I can get back an id unique to that email, and a conversationId unique to that email thread. The body returns the full email thread so far, but it is none trivial to parse (are there tips to parsing the returned HTML?), and may not always be accurate if people are adjusting the mail that gets sent back and forth.
Maybe the solution here is to parse the full body HTML, but I have not seen any documentation on best practices here. Any tips?
To get all mails with same conversationId, you can use
GET https://graph.microsoft.com/v1.0/me/messages?$filter= conversationId eq 'yourConversationId'
Microsoft Graph is using OData. So you can use query parameters to customize responses.
For how to use query, please check this document.
Related
I am working on integration with Microsoft Graph and can't find a way to list all replies for specific email so the user can respond to it
we have implemented this idea on Gmail API through the thread concept
but in Microsoft Graph we found that the thread word has different use
I have found something in common between the original mail and its replies which is conversationId but it's impossible to get and filter all sent messages and also received ones to just find the mails have the same conversationId
I'm not sure where you got the idea that you can't filter on conversationId but it absolutely can be. The following will return any messages matching the conversation:
/v1.0/me/messages?$filter=conversationId eq '{conversationId}'
/v1.0/users/{id|userPrincipalName}/messages?$filter=conversationId eq '{conversationId}'
With respect to the Qualtrics API (v3) documentation (https://api.qualtrics.com/docs/overview) there does not appear to be any means to send a GET request through a REST client to get the individual survey responses for a specific survey (I suppose that the developers figured that no would be interested in decoupling the survey results from the admin panel).
The reason why I would like to be able to submit a GET request to get survey results is for real-time data visualization purposes that do not depend on me exporting the data every so often to re-update the visualization. If Qualtrics does not support such a GET request, which service (perhaps SurveyMonkey or its ilk) best facilitates what I'm trying to build? Or do I have to build an entire survey module from scratch? (shudders)
I agree that v3.0 has some big short comings. I have no idea what they are thinking. There should be a way to retrieve a specific response using Response ID.
You can still use v2.5 of the api to do what you want.
SurveyMonkey has a REST API that allows you to fetch all your responses.
You can fetch all your responses by doing:
GET /v3/surveys/<survey_id>/responses
Which will give you a skinny payload (usually IDs only, and maybe a name or title but not in this case).
You can then get a specific response by doing:
GET /v3/responses/<response_id>
You can also fetch all responses as fatter payloads by doing:
GET /v3/surveys/<survey_id>/responses/bulk
Or, depending on your use case, for example if you have some visualization that you want to update in real-time without polling for responses you can set up a webhook.
POST /v3/webhooks
{
"name": "My Response Webhook",
"event_type": "response_completed",
"object_type": "survey",
"object_ids": ["<survey_id1>", "<survey_id2>", ...],
"subscription_url": "https://mycallback.url"
}
Where subscription_url is your callback url, and then whenever any new responses for the defined surveys come in you'll be notified to the subscription_url provided and you can then know to refresh your charts.
I have done that by getting contacts, in every contact there are object of Response history where you can get the information of a survey assigned to a respondents.
I want to use the SurveyMonkey API to trigger a SM collector to send an email directly after one of our technicians has completed his work. To this effect I am using the create_recipients API method. To send a custom message I need to provide the email_message_id. I cannot find this id. When I leave out the id SM sends the default message which is in english (I need dutch). Can anyone tell me where to find this id?
I contacted the Surveymonkey Support desk; they told me that the "email_message_id" will be visible if you use the "Send_Flow" API-call. It appears that the message_id is not otherwise (easily) obtainable.
UPDATE -- 3/3/2016
Have now, in fact, created a flow in which the resulting JSON returns the e-mail message. So the way to go is to use 'send-flow' in combination with 'create_recipients'.
With many thanks to Alfred from Surveymonkey Support.
The v2 API has no way to retrieve the email_message_id of a collector. That will be possible in v3 which should be available soon. Until then it is still possible to find the email_message_id in the HTML. Here's how to find that ID in the code for the collector, via chrome's developer tools:
Go into the Email Collector
Find the message under "Message History"
Right-click on the row and select "Inspect" (Assuming you're using Chrome)
You'll see something to the effect of <li id="27713004"> (The ID will be unique to your message)
I can get the Information of user data and email address from google api with help from this link.
But my task is to get all user mails from a Gmail account, and display them in a table view.
I checked the Gmail API but can't get enough reference.
Is there any way to do it ?
You probably want to look into threads. While normally a programmer would probably think of background processes when talking about threads, Google refers to "groups" of messages as threads (how it groups an email and replies into a single message in the client). While the API Reference for threads has an example in Java, it shouldn't be too hard to translate it into Obj-C if you're already set up to make other calls to the Google API.
Specifically, look into the list method (linked above). Alternatively, you could use messages.list but they will be much less organized. Also know that I'm pretty sure you'll need to increase the maxResults as I believe the default max is 100.
Twitter's REST API returns a in_reply_to_status_id value for tweet statuses, yet the Search API does not.
What puzzles me is, if you search using the http://search.twitter.com/ webpage directly, tweets that are in reply to another tweet contain a "Show Conversation" link, but when searching using the API directly, there doesn't seem to be any data suggesting that a conversation exists (with JSON, at least).
How does this search page know which tweets are part of a conversation, and what would be the best way to emulate this behaviour (JSON preferred) in a rate-friendly way? I imagine I would have to do additional calls or something...?
related_results is officially dead along with the v1 API. It appears official Twitter apps use a call to /1.1/conversation/show.json?id=___ as mentioned here https://dev.twitter.com/discussions/17647 however it appears to be blocked from non-Twitter clients.
Just check the JSON field "to_user", which contains screen_name of the #replied person. If its null, you can assume its not a reply. You could also check, if the tweet string starts with a #username, which
http://search.twitter.com/search.json?q=%40aplusk
When you use the search.twitter.com, look for a field name in_reply_to_status_id This contains the original status_id to which this tweet was a reply. Next, there is a currently unsupported/undocument api call to get the whole conversation:
https://api.twitter.com/1/related_results/show/169145505824256000.json?include_entities=1
The value (169145505824256000) is the status_id you want to retrieve the conversation for.
An update on this as I was just faced with the same problem. The Twitter v1.1 API should now return valid in_reply_to_status_id values. But the unsupported v1 related_results has now gone forever.
You can see information about this, and some suggestions about using the streaming API, at https://dev.twitter.com/discussions/11292