Skip to content

Instantly share code, notes, and snippets.

View dmgrinko1's full-sized avatar

Dmytro Hrynko dmgrinko1

  • Ukraine
  • 06:44 (UTC +03:00)
View GitHub Profile
@jkotchoff
jkotchoff / emailed_zip_file_extractor.rb
Created November 29, 2016 00:23
Rails example of how to connect to the Gmail API using Ruby and download a Zip File attachment and then unzip contents from the zip archive
class EmailedZipFileExtractor
# This class downloads an email from gmail and extracts a file out of a .zip attachment
require 'google/apis/gmail_v1'
require 'googleauth'
require 'zip'
# These credentials come from creating an OAuth Web Application client ID
# in the Google developer console
#