powered by
Get a list of messages possibly matching a given query string.
messages(search = NULL, num_results = NULL, label_ids = NULL, include_spam_trash = NULL, page_token = NULL, user_id = "me")
query to use, same format as gmail search box.
the number of results to return.
restrict search to given labels
boolean whether to include the spam and trash folders in the search
retrieve a specific page of results
gmail user_id to access, special value of 'me' indicates the authenticated user.
https://developers.google.com/gmail/api/v1/reference/users/messages/list
Other message: attachment, delete_message, import_message, insert_message, message, modify_message, save_attachments, save_attachment, send_message, trash_message, untrash_message
attachment
delete_message
import_message
insert_message
message
modify_message
save_attachments
save_attachment
send_message
trash_message
untrash_message
# NOT RUN { #Search for R, return 10 results using label 1 including spam and trash folders my_messages = messages("R", 10, "label_1", TRUE) # }
Run the code above in your browser using DataLab