Skip to content

Functions not returning anything. #3

@ghost

Description

Trying to work with these handy scripts, but it seems like these callback functions like

GmailUtils.processStarred('label:Expenses', 5, function(message) {
    // create a pdf of the message
    var pdf = GmailUtils.messageToPdf(message);
    // prefix the pdf filename with a date string
    pdf.setName(GmailUtils.formatDate(message, 'yyyyMMdd - ') + pdf.getName());
    // save the converted file to the 'Expenses' folder within Google Drive
    DriveUtils.getFolder('Expenses').createFile(pdf);
    // signal that we are done with this email and it will be marked as read
    return true;
  });

or

// limit this to 10 threads (may be more than 10 messages)
  GmailUtils.processStarred('label:領収証', 1, function(message) {
    messages.push(message);
    return true;
  });

are actually not returning anything. Has Google changed their api at all? Am I the only one who has these problems?

Will try to debug by myself, but just wanted to point out what's happening!
Thank you!

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