Detecting when someone starts at the subject line & adding one if so

I like to make snippets I create as dynamic as possible. Sometimes people may be using it in a reply to an email or they're adding it to an email they have already started to draft, in both cases they likely have a subject line. Other times they may be starting with a blank email so often include an option that allows them to start at the subject line where the snippet will paste in the pre-written subject line and then the rest of the content will go into the body of the email. This is done by using the toggle feature (asking if the person is starting at the subject line) and the +tab feature (if they are starting at the subject line in order to paste text into the subject line first and then the body).

This workaround has been working pretty well for me but I feel it's easily missed by users (or just clutters up the notes/instructions of the snippet when there are other toggles included).

It would be great if Text Blaze could detect if someone is starting from the subject line and insert a pre-written one if so. If there is no pre-written one, it would just skip to the body or give the user a warning/reminder to add one themselves.

Hi @Vanessa_Assaro-Aluis ,
Welcome to Text Blaze community.

If you are using Gmail, then something like this should solve the problem using Gmail command pack
You have to assume subject is empty if the command pack returns "New Message". This is a limitation due to how Gmail is.

{if: len({gmail-subject})==0 or {gmail-subject} == "New Message"}Some subject{key: tab}{endif}Some email body

or you can use your own selector. You have to add a condition to your shortcut like I did for /do

{if: len({site: text; selector=[name="subjectbox"]})==0 or {site: text; selector=[name="subjectbox"]} == "/do"}Some subject{key: tab}{endif}Some email body

Hope this helps.

2 Likes