Polls for new email periodically, and notifies you when one arrives. You can ask the agent to read out the mail or the subject.
- node v0.10
- bunyan for pretty printed logs
Clone this repo and run npm install
Follow the full instructions Google Developers. site. They are briefly reproduced below.
You need to first create or select a project in the Google Developers Console and enable the API.
Alternatively, you can activate the Gmail API yourself in the Developers Console by doing the following:
- Go to the Google Developers Console.
- Select a project, or create a new one.
- In the sidebar on the left, expand APIs & auth. Next, click APIs. In the list of APIs, make sure the status is ON for the Gmail API.
- In the sidebar on the left, select Credentials.
In either case, you end up on the Credentials page and can create your project's credentials from here.
- From the Credentials page, click Create new Client ID under the OAuth heading to create your OAuth 2.0 credentials.
- Next, select your Client ID type as Installed application.
- Your application's Client ID and relevant auth settings are now listed.
- Click on the Download JSON button, and save the file to
auth.json
in the agent folder.
- Launch the agent
node index.js --logfile gmail.log 2>&1 | bunyan
- On the first run, the agent will open a browser window to login. If you later wish to change the signed-in account, remove
tokens.json
from the agent folder.
GPLv3