This repository contains python scripts to perform Gmail and Google Sheets operations.
Install Google API python library, simply use pip
or easy_install
:
pip install --upgrade google-api-python-client
or
easy_install --upgrade google-api-python-client
How to send email with and attachment:
python gmail.py --action "send" --from-addr "From Address" --to-addr "To Address" \
--credentials "location of credentials file" --attachment "Location of attachment file"
How to read a google sheet:
python gsheets.py --action "read" --spreadsheet-id "Spreadsheet ID" --range-name "Range Name" \
--credentials "location of credentials file" --subject "Owner gmail account for the spreadsheet"