Jump to content

Gmail in Chrome Workflow


Recommended Posts

Hi, I made this for myself and thought I'd share.

 

I'm a heavy Gmail user, and I think Gmail works best in Chrome. I wanted to always have a Gmail tab open, and to *not* open multiple Gmail tabs when I use the workflow from other applications.
 
I also wanted the Gmail tab to always be pinned to the left. It can't be done via AppleScript, so I'm using a Chrome Extension called Auto Pin URL. Get it if you want the Gmail tab pinned left (it's not required for the workflow to function. Without it, your Gmail tab will be *wherever* in Chrome):

 

 

Here is the URL you will need to add to Auto Pin URL:

 

Here's the features of the workflow (keyword / explanation):

 

gm - GMail. Whatever you're doing, this brings Chrome to the front and activates the Gmail tab. If there's no Gmail tab, it will create one (and Auto Pin URL will move it to the far left). I have assigned it Shift-Control-z

 

gmn - GMail New. Open a new compose window. (This is the lone exception in that it opens a new tab. I don't like the new compose window you get by typing c in gmail.) I have assigned Shift-Control-x. This tab auto closes once you send the mail.

 

gms - GMail Search

 

gmf - GMail From. Search for sender

 

gmt - Gmail To. Search for recipient

 

gmc - GMail Contacts. Search Gmail contacts

 

gmgi - GMail Inbox ("gi" is Gmail's default Inbox shortcut)

 

gmgt - GMail Sent. Sent items. ("gt" is Gmail's default Sent Mail shortcut)

 

gmga - GMail All Mail. All mail. ("ga" is Gmail's default All Mail shortcut)

 

NOTE: I made this for my Google Apps account. Haven't tested it on a regular gmail account, but I bet it works fine. I'm no AppleScript expert, so my code may be crappy. Buy hey, this workflow works great for me.

 

Download here:

 

Edited by AlfredFreak
Link to comment

Hey, great workflow!!

 

Had a couple of questions/feature requests:

 

- Is there any way to activate *only* the chrome window that contains the gmail tab?

- Noticed that if you have multiple chrome windows open this workflow will not give focus to the gmail tab if another window had it. This means that keyboard commands etc will be registered with the last active chrome window instead of gmail.

 

Any way to add these features?

 

Thx

 

Both of these may be doable. Since I almost always use tabs, and very rarely use two windows, I didn't encounter these issues while making/using the workflow. I'll look into it when I have some time.

Link to comment
  • 4 weeks later...
  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...

Thanks, that's great. However, although I understand your preference to open a new email in a new tab, it takes significantly more time to load a new page in a new tab. Would you have a suggestion as to how I can modify the script so it behaves as if I pressed "c" in the Gmail UI? 

 

Thank you for your work

Link to comment
  • 1 month later...
  • 1 month later...

Not a Alfred workflow but to do new compose mail I use keyboard maestro to activate chrome, keystroke "CMD+1" to go to first tab (pinned chrome tab) and then type keystroke "c".  Works great.

 

I noticed that it reload the gMail window every time.  IE do search for "bob" gmail window reloads with results.  Is there anyway to get it so that it just does a search without doing a refresh?  Would be much faster.  Thanks.

Link to comment
  • 3 months later...
  • 1 year later...
  • 3 months later...
  • 4 months later...
  • 7 months later...
  • 8 months later...
  • 11 months later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...