This Choreo retrieves an individual thread from a user's mailbox. The documentation for this Gmail resource can be found here.
Note: this method requires that you request one of the following scopes during the OAuth process:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
The Fields input can be used to reduce the number of fields returned in the response. The syntax for using this parameter is loosely based on XPath. Below are some points to remember when using this input:
- Fields should be separated by commas.
- When fields are nested within other fields, you can refer to them using a path (i.e. urls/value).
- Specify field sub-selectors to request only specific sub-fields by using parentheses "( )" after any selected field.
Here is an example of acceptable inputs:
ClientID: {YOUR CLIENT ID}
ClientSecret: {YOUR CLIENT SECRET}
RefreshToken: {YOUR REFRESH TOKEN}
ThreadID: 1475ada1f4ba86ba
The following is a sample of the JSON information returned by this Choreo:
{
"id": "1475ada1f4ba86ba",
"historyId": "3838093",
"messages": [
{
"id": "1475ada1f4ba86ba",
"threadId": "1475ada1f4ba86ba",
"labelIds": [
"SENT",
"INBOX"
],
"snippet": "foo",
"historyId": "3838026",
"payload": {
"mimeType": "multipart/alternative",
"filename": "",
"headers": [
{
"name": "MIME-Version",
"value": "1.0"
},
{
"name": "Received",
"value": "by 10.140.27.162 with HTTP; Mon, 21 Jul 2014 14:35:49 -0700 (PDT)"
},
{
"name": "Date",
"value": "Mon, 21 Jul 2014 17:35:49 -0400"
},
{
"name": "Delivered-To",
"value": "aaron.jennings@temboo.com"
},
{
"name": "Message-ID",
"value": "\u003cCAEqmo68ESRzXn3LTzOs0AQAbjk3aamesfWtsVxnbD0ugr_qxrg@mail.gmail.com\u003e"
},
{
"name": "Subject",
"value": "test thread"
},
{
"name": "From",
"value": "Aaron Jennings \u003caaron.jennings@temboo.com\u003e"
},
{
"name": "To",
"value": "Aaron Jennings \u003caaron.jennings@temboo.com\u003e"
},
{
"name": "Content-Type",
"value": "multipart/alternative; boundary=001a113525d2063b6804febae4f6"
}
],
"body": {
"size": 0
},
"parts": [
{
"partId": "0",
"mimeType": "text/plain",
"filename": "",
"headers": [
{
"name": "Content-Type",
"value": "text/plain; charset=UTF-8"
}
],
"body": {
"size": 5,
"data": "Zm9vDQo="
}
},
{
"partId": "1",
"mimeType": "text/html",
"filename": "",
"headers": [
{
"name": "Content-Type",
"value": "text/html; charset=UTF-8"
}
],
"body": {
"size": 28,
"data": "PGRpdiBkaXI9Imx0ciI-Zm9vDQo8L2Rpdj4NCg=="
}
}
]
},
"sizeEstimate": 674
},
{
"id": "1475ada4d55729b8",
"threadId": "1475ada1f4ba86ba",
"labelIds": [
"SENT",
"INBOX",
"UNREAD"
],
"snippet": "bar On Mon, Jul 21, 2014 at 5:35 PM, Aaron Jennings <aaron.jennings@temboo.com> wrote: foo --",
"historyId": "3838071",
"payload": {
"mimeType": "multipart/alternative",
"filename": "",
"headers": [
{
"name": "MIME-Version",
"value": "1.0"
},
{
"name": "Received",
"value": "by 10.140.27.162 with HTTP; Mon, 21 Jul 2014 14:36:01 -0700 (PDT)"
},
{
"name": "In-Reply-To",
"value": "\u003cCAEqmo68ESRzXn3LTzOs0AQAbjk3aamesfWtsVxnbD0ugr_qxrg@mail.gmail.com\u003e"
},
{
"name": "References",
"value": "\u003cCAEqmo68ESRzXn3LTzOs0AQAbjk3aamesfWtsVxnbD0ugr_qxrg@mail.gmail.com\u003e"
},
{
"name": "Date",
"value": "Mon, 21 Jul 2014 17:36:01 -0400"
},
{
"name": "Delivered-To",
"value": "aaron.jennings@temboo.com"
},
{
"name": "Message-ID",
"value": "\u003cCAEqmo68mGro4kz+AO9Kgp4JkRHEx23naoUZQ55cjK-7vCJ-i=A@mail.gmail.com\u003e"
},
{
"name": "Subject",
"value": "Re: test thread"
},
{
"name": "From",
"value": "Aaron Jennings \u003caaron.jennings@temboo.com\u003e"
},
{
"name": "To",
"value": "Aaron Jennings \u003caaron.jennings@temboo.com\u003e"
},
{
"name": "Content-Type",
"value": "multipart/alternative; boundary=20cf3074b02cbfcb0404febae425"
}
],
"body": {
"size": 0
},
"parts": [
{
"partId": "0",
"mimeType": "text/plain",
"filename": "",
"headers": [
{
"name": "Content-Type",
"value": "text/plain; charset=UTF-8"
}
],
"body": {
"size": 185,
"data": "YmFyDQoNCg0KT24gTW9uLCBKdWwgMjEsIDIwMTQgYXQgNTozNSBQTSwgQWFyb24gSmVubmluZ3MgPGFhcm9uLmplbm5pbmdzQHRlbWJvby5jb20-DQp3cm90ZToNCg0KPiBmb28NCj4NCg0KDQoNCi0tIA0KQWFyb24gSmVubmluZ3MgfCBUZW1ib28gfCAxMDQgRnJhbmtsaW4gU3RyZWV0IE5ZQyB8IHd3dy50ZW1ib28uY29tDQo="
}
},
{
"partId": "1",
"mimeType": "text/html",
"filename": "",
"headers": [
{
"name": "Content-Type",
"value": "text/html; charset=UTF-8"
},
{
"name": "Content-Transfer-Encoding",
"value": "quoted-printable"
}
],
"body": {
"size": 640,
"data": "PGRpdiBkaXI9Imx0ciI-YmFyPC9kaXY-PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPjxicj48YnI-PGRpdiBjbGFzcz0iZ21haWxfcXVvdGUiPk9uIE1vbiwgSnVsIDIxLCAyMDE0IGF0IDU6MzUgUE0sIEFhcm9uIEplbm5pbmdzIDxzcGFuIGRpcj0ibHRyIj4mbHQ7PGEgaHJlZj0ibWFpbHRvOmFhcm9uLmplbm5pbmdzQHRlbWJvby5jb20iIHRhcmdldD0iX2JsYW5rIj5hYXJvbi5qZW5uaW5nc0B0ZW1ib28uY29tPC9hPiZndDs8L3NwYW4-IHdyb3RlOjxicj4NCjxibG9ja3F1b3RlIGNsYXNzPSJnbWFpbF9xdW90ZSIgc3R5bGU9Im1hcmdpbjowIDAgMCAuOGV4O2JvcmRlci1sZWZ0OjFweCAjY2NjIHNvbGlkO3BhZGRpbmctbGVmdDoxZXgiPjxkaXYgZGlyPSJsdHIiPmZvbw0KPC9kaXY-DQo8L2Jsb2NrcXVvdGU-PC9kaXY-PGJyPjxiciBjbGVhcj0iYWxsIj48ZGl2Pjxicj48L2Rpdj4tLSA8YnI-PGRpdiBkaXI9Imx0ciI-QWFyb24gSmVubmluZ3MgfMKgVGVtYm9vIHwgMTA0IEZyYW5rbGluIFN0cmVldCBOWUMgfMKgPGEgaHJlZj0iaHR0cDovL3d3dy50ZW1ib28uY29tLyIgc3R5bGU9ImNvbG9yOnJnYigxNyw4NSwyMDQpIiB0YXJnZXQ9Il9ibGFuayI-d3d3LnRlbWJvby5jb208L2E-PGJyPg0KPC9kaXY-DQo8L2Rpdj4NCg=="
}
}
]
},
"sizeEstimate": 1737
}
]
}