You have no favorites... yet!
Use the Library tree on the left to select a Choreo to call from your gateway device.
Use the Library tree on the left to select a Choreo to call from your edge device via the gateway.
Library . Google . Gmailv2 . Drafts . GetDraft
Retrieves a specific draft from a user's mailbox.
/*
TembooTask class placeholder
*/
/*
TembooTask header placeholder
*/
Since you've changed your device configuration, you'll need to tell us about this new device.
This feature is in experimental mode - pricing coming soon.
Send your code straight to a GitHub repository.
Your code will be visible by others in your repos. Keep credentials private by saving a Profile or commit code with Placeholder inputs.
The following files will be added to this repo:
You'll be able to edit and share your code from TI's CCS Cloud IDE.
The following will be sent to CCS Cloud:
/*
Your auto-generated code will appear here once you've configured your device above.
*/
/*
A header file containing your Temboo account information will appear here once you've
configured your device above.
*/
/*
Please log in to generate proxy server code for use with the JavaScript SDK.
*/
This Choreo retrieves a specific draft from a user's mailbox. The documentation for this Gmail resource can be found here.
The optional Format input can be passed to request variations in the response that your application may need. The default value of this input is "full", which returns the parsed email message content in the payload field. When set to "minimal", only email message metadata such as identifiers and labels is returned. When set to "raw", the entire email message content is returned as a Base64 encoded string in the raw field. This includes the identifiers, labels, metadata, MIME structure, and small body parts
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.compose 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:
Here is an example of acceptable inputs:
ClientID: {YOUR CLIENT ID}
ClientSecret: {YOUR CLIENT SECRET}
RefreshToken: {YOUR REFRESH TOKEN}
DraftID: 1474361082775554945
The following is a sample of the JSON information returned by this Choreo:
{ "id": "1474361082775554945", "message": { "id": "1475fb99b9d176de", "threadId": "1475fb99b9d176de", "labelIds": [ "DRAFT" ], "snippet": "this is a test -- Aaron Jennings | Temboo | 104 Franklin Street NYC | www.temboo.com", "historyId": "3843918", "payload": { "mimeType": "multipart/alternative", "filename": "", "headers": [ { "name": "MIME-Version", "value": "1.0" }, { "name": "Received", "value": "by 10.140.27.162 with HTTP; Tue, 22 Jul 2014 13:18:24 -0700 (PDT)" }, { "name": "To", "value": "Aaron Jennings <aaron.jennings@temboo.com>" }, { "name": "Date", "value": "Tue, 22 Jul 2014 16:18:24 -0400" }, { "name": "Message-ID", "value": "<CAEqmo6_5_KDLT3tJ-o=Pb=bRN-crvb+Op603sVmHJGzXb4T2Uw@mail.gmail.com>" }, { "name": "Subject", "value": "test draft" }, { "name": "From", "value": "Aaron Jennings <aaron.jennings@temboo.com>" }, { "name": "Content-Type", "value": "multipart/alternative; boundary=001a1138040402227004fecdedee" } ], "body": { "size": 0 }, "parts": [ { "partId": "0", "mimeType": "text/plain", "filename": "", "headers": [ { "name": "Content-Type", "value": "text/plain; charset=UTF-8" } ], "body": { "size": 91, "data": "dGhpcyBpcyBhIHRlc3QNCg0KLS0gDQpBYXJvbiBKZW5uaW5ncyB8IFRlbWJvbyB8IDEwNCBGcmFua2xpbiBTdHJlZXQgTllDIHwgd3d3LnRlbWJvby5jb20NCg==" } }, { "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": 254, "data": "PGRpdiBkaXI9Imx0ciI-dGhpcyBpcyBhIHRlc3Q8YnIgY2xlYXI9ImFsbCI-PGRpdj48YnI-PC9kaXY-LS0gPGJyPjxkaXYgZGlyPSJsdHIiPkFhcm9uIEplbm5pbmdzIHzCoFRlbWJvbyB8IDEwNCBGcmFua2xpbiBTdHJlZXQgTllDIHzCoDxhIGhyZWY9Imh0dHA6Ly93d3cudGVtYm9vLmNvbS8iIHN0eWxlPSJjb2xvcjpyZ2IoMTcsODUsMjA0KSIgdGFyZ2V0PSJfYmxhbmsiPnd3dy50ZW1ib28uY29tPC9hPjxicj4NCjwvZGl2Pg0KPC9kaXY-DQo=" } } ] }, "sizeEstimate": 1018 } }
https://ACCOUNT_NAME.temboolive.com/callback/google
© 2025 Temboo, Inc Privacy Terms