This script Allow you to grab all the documentation (pdf,docx,jpg ...) sent by teachers during interval of time and organize it in folders for each subject in Google Drive
Step 1) Create a .gs file in Google Drive
Step 2 ) Paste the code from "DocCrawlerEsiMail.gs"
step 3 ) change value of these variables
// email of teacher , subject he teach
var ENS_MOD = [ ['teacherEmail1','Subj1'] , ['teacherEmail2','Subj2'] , ['teacherEmail3','Subj3'] ];
var Date_Before = "2018/2/6"; // yyyy/mm/dd
var Date_After = "2017/10/1"; // yyyy/mm/dd
var folderName = "SIQ2CS_S1";
Step 4 ) Run the Script
link to script in Google Drive : https://script.google.com/d/10yguAhoHY2gsCjEhWGBHmpgZZoyqQUisfhWeCst--r5Xg8zxQywoEwId/edit?usp=sharing&pli=1