Skip to content

delete_message fails due to NULL response #79

@josibake

Description

@josibake

Per the google API documentation regarding DELETE:

If successful, this method returns an empty response body.

This causes gmail_query to fail, as it is expecting a non-empty response

Example


use_secret_file("email-automation.json")

msgs <- messages(label_ids = "Label_14")
local_path <- "."

for (ids in msgs[[1]]$messages) {
  id <- ids$id
  msg <- message(id)
  save_attachments(msg, path = local_path)
  delete_message(id)
}

Error
Error in class(result) <- class : attempt to set an attribute on NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions