How to automatically set gmail filter via chrome extension? -



How to automatically set gmail filter via chrome extension? -

i implement next utilize case chrome extension:

user visits gmail exension checks current email body keyword if keyword present, gmail filter added , saved (adding label, archiving, details not of import here)

the first part sounds easier: there gmail api work , gmail.js project should create easier.

adding filter seems much harder. there email settings api doing exactly want sure usable business accounts (custom email domains, won't work gmail.com). want solution more universal.

one thing thought of utilize browser automation - upon seeing trigger keyword, script automatically clicks 'add filter' link, waits ajax, sets filter parameters , confirms.

an illustration of simulated user activity in this answer

this happen either on gmail page behind popup ('please wait, adjusting filters') or in background tab maintain interfering user's flow. seems ugly workaround me, though.

is there more straightforward or improve approach i'm missing?

after more experimentation , reviving older github project found out setting filter logged in user can achieved issuing specific post message gmail current session.

i don't understand parameters used in request (if has improve information, please share), found sample code helpful.

second issue, discussed in gmail.js community, gmail security policies prevent injecting own scripts. bypassed method shown in this boilerplate project

i compiled these solutions solve particular utilize case. here example project solution, should work out of box - , when in doubt, see readme.

google-chrome-extension gmail-api google-email-settings-api

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -