gm_messages function

Get a list of messages

Get a list of messages

Get a list of messages possibly matching a given query string.

gm_messages( search = NULL, num_results = NULL, label_ids = NULL, include_spam_trash = NULL, page_token = NULL, user_id = "me" )

Arguments

  • search: query to use, same format as gmail search box.
  • num_results: the number of results to return.
  • label_ids: restrict search to given labels
  • include_spam_trash: boolean whether to include the spam and trash folders in the search
  • page_token: retrieve a specific page of results
  • user_id: gmail user_id to access, special value of 'me' indicates the authenticated user.

Examples

## Not run: # Search for R, return 10 results using label 1 including spam and trash folders my_messages <- gm_messages("R", 10, "label_1", TRUE) ## End(Not run)

References

https://developers.google.com/gmail/api/reference/rest/v1/users.messages/list

See Also

Other message: gm_attachment(), gm_delete_message(), gm_import_message(), gm_insert_message(), gm_message(), gm_modify_message(), gm_save_attachments(), gm_save_attachment(), gm_send_message(), gm_trash_message(), gm_untrash_message()

  • Maintainer: Jennifer Bryan
  • License: MIT + file LICENSE
  • Last published: 2023-06-30