The Gmail command pack allows you to automate common tasks in Gmail like automatically including the recipient name in your message or automatically CCing or BCCing someone. See some examples here.
If you're using Gmail, we would love to get your thoughts:
Are you using it? If no, why not?
How's your experience? What do you like about it, and what can we do to improve?
Gmail command pack user here. I like how it works, I use it on a daily basis. It is very basic and combines nicely with the normal Text Blaze commands.
Possible improvements would be:
-Be able to apply a label to an email
-Attach files (not a link)
-When using Add CC, double check if email address is already added
We use the Gmail Command Packs to include project managers in outgoing emails using the Cc and Bcc functions.
We also use the flow to include a Bcc for scheduled outgoing emails. That way you can monitor that the emails were sent on schedule. Very helpful tool.
Yes, big fan! I use CC and Subject line functionality, but the biggest reason I love using it is because of the visibility into "my email". I can have a single snippet say different things based on the "From" email address. I can also block snippets from being used if they are being sent from the wrong email address.
For example, if I should send an email from accounting@ but haven't changed the send-from email address on the gmail side, TB won't let me import the snippet.
This is hugely helpful for avoiding looking like the idiot I am. It's similar to the "attached" check that gmail will do to make sure it is actually attached.
Great question, I had fun figuring this one out. It's possible as follows (note: Gmail commands don't preview correctly in the community):
Hi {if: greetingcount<4}{gmail-firstname: type=multiple},{else}everyone,{endif}
{greetingcount=count(split({gmail-firstname: type=multiple}, ",")); trim=yes}
This is creating a new variable called greetingcount that is counting the number of names that are generated in the Gmail Recipient First Name command. I did that by breaking the string into a list via split( using the comma as the delimiter, and then using count( to count the number of items in the list. Using {if} and {else} lets me customize the text entered based on the number of names in greetingcount.
I can do this without even bothering to create greetingcount, actually:
Hi {if: count(split({gmail-firstname: type=multiple}, ","))<4}{gmail-firstname: type=multiple},{else}everyone,{endif}
Hi, Andrew! I'm having an issue where my snippet will only evaluate/operate on the visible (actually seen on the screen) names/addresses in the Gmail "to:" field. If I have more than a few recipients, and Gmail auto-groups all but the first few (e.g. bill@co.com, jim@co.com, tim@co.com [[[6 more]]]), the snippet will return "Hi, Bill, Jim, and Tim,", rather than "Hi, everyone,". If I expand the draft to full-screen however (not a popout), making more names/addresses visible, the snippet performs as expected ("Hi, everyone,"). Do you have any advice on how to get the TB snippet to evaluate all of the names/addresses, and not just those that are only visible on the screen?
Good question! It seems like Gmail decides whether to use the [x more] text depending on the size of your window, so there's not always going to be a perfect solution to this.
Operating under the assumption that, if the "[x more]" text appears in the recipients field you ALWAYS want to say "Hi everyone", I was able to create this snippet:
{if: (contains({site: text; selector=.id form > div > table > tbody > tr > :last-child}, " more")) OR count(split({gmail-firstname: type=multiple}, ","))>4}Hi everyone,{else}Hi {gmail-firstname: type=multiple},{endif}
That uses "Hi everyone" if the [x more] text appears OR if the recipient list is greater than 4, otherwise it just uses the first names.
Note: this snippet uses the website command's CSS selector, so the above-snippet only works for replies. If you need this for new compose emails as well, let me know in what format you write your new emails. Gmail uses a different CSS section for each different compose option (regular pane; full-screen pane; pop-out pane) and I'd have to choose the right one.
I just noticed your screenshot was a new compose in the regular pane, here's a snippet that should work for that following the same criteria described in my last post:
Thanks for posting these, Andrew! I'm still fiddling with them to get them just right. May I ask what method you use to identify the correct selector paths? I am familiar with using the selector feature in the console and I also have the Selector Gadget extension, but I'm not sure how to go from using those to actually completing the formulas as you have. Do you have a good resource that could instruct on how to make that decision? Thanks!
We've got a really easy way to do that built into the site command:
Just have another tab open with an example of a page you'd want to read from (e.g. Gmail with a compose window open) before clicking on that blue "select from website" button so you can switch tabs like I do in my gif. Once you're there it'll have that easy mouse-over selector.
Hi, Andrew!
I forgot that I had figured that out the other day. One of the issues I was running into with the snippets you shared was that it (one or both, I don't remember) seemed to factor in additional email composition frames if more than one was open. I was trying to see if I could identify a different selector that would be unique to the individual message, but I wasn't successful, and I basically accepted that that isn't possible. Thanks again for your help!
I second this request as being able to attach a file based on a snippet would be helpful as I often have attachments that are updated regularly that would require to be sent to specific users.
Yes, working in the google environment you can send a link to the attachment but this requires that the permissions of the document be opened up to the user that it would be sent through and is not always the case.
I had a go at automating this, because it seems like it should be doable with a well-targeted sequence of tabs, clicks and entering the exact name of the file you wish to include (as an attachment, rather than a link to a shared document). However, the modal that pops up when you go to select a file from your drive does not exist on the page when the snippet starts from (presumably) a compose window.
A GMail compose window is stuffed with JavaScript functions that make the interface dynamically respond to your navigating and clicking things. That makes it useful, but extremely hard to automate with a tool like TB that sits inbetween the DOM and device driver level simulation of keypresses and mouse events.
Maybe TB could deal with this kind of UI trouble by "reloading" itself mid-snippet. I.e. "{tab}{tab}{space}{ui-reset}{tab}{tab}" -- which would be navigating to a button; activating it with a space, then reloading the page context and then continuing navigating to wherever in the modal that just popped up. (yes, this would be a fairly significant feature request..)
Hi @Peter_Smulders welcome to the forum! Yes you are right that the attachment popup is a separate iframe hence the Text Blaze snippet does not continue "into" it as it was started from a different frame. We plan to fix this and are eager to implement it but we have no ETA on the same sadly.