Jump to content
AlfredFreak

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

Share this post


Link to post

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.

Share this post


Link to post

It would be great to support Google Apps, so it will be easy to check personal and few project mailboxes.

Thanks!

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

Great script.

 

Is the following possible?
1. Setup a message that opens already addressed and subjected so that I can email a specific person with one keystroke?

2. I'd like to insert a clipboard image to the message. 

 

Thanks!

Share this post


Link to post

Thank you, Englebert! Great script. Works well with non-google app gmail accounts as well. Exactly what I was looking for!

Share this post


Link to post

Hi, there's no download link available…again :)
You've got gmail, so you've got 15Go on Google drive…
Can you please give us a strong link with it ?
Thanks in advance

Share this post


Link to post

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
×