-
-
Save ajdinmust/288a97eee7f910f3a6535e601e694558 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setupNodeEvents(on, config) { | |
on("task", { | |
"gmail:check": async (args) => { | |
const { from, to, subject } = args; | |
const email = await gmail.check_inbox( | |
path.resolve(__dirname, "credentials.json"), | |
path.resolve(__dirname, "token.json"), | |
{ | |
subject: subject, | |
from: from, | |
to: to, | |
include_body: true, | |
wait_time_sec: 10, | |
max_wait_time_sec: 30, | |
} | |
); | |
return email; | |
}, | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment