Include data from the web page where you're using your snippets

One of the lesser-known, but really powerful, commands in Text Blaze is the website command. This is definitely one of my personal favorite commands!

It's a favorite because this feature is a huge time-saver, especially if you're working in a system like a CRM or Support tool. You likely already have a lot of data accessible to you in those scenarios, so why not automatically retrieve it using Text Blaze?

Here's a gif showing how easy it is to select the data that you want to add to your snippets:
sitehowto

This post will specifically demonstrate the ability to read the contents of a page as part of your snippet, but this command can also do a few other things, including reading/parsing the HTML of a site, or reading the URL (which can be really useful in if statements for having a snippet do different things based on the site it's used on).

KEEP IN MIND THAT NONE OF THESE EXAMPLE SNIPPETS WILL WORK HERE ON THE COMMUNITY. Since they're all reading data from sites using CSS selectors, they'll only work on the pages that they were built for. Here's a video of these snippets in action!

Select data from a LinkedIn profile page
This snippet reads the current company as well as the #1 listed skill from someone's LinkedIn profile page. It is using the LinkedIn command pack to get their first name, but that's possible through the site selector as well.

In this case, the data from the site is being merged directly into the text of my snippet.

linkedin1

Hey {linkedin-firstname},

I hear you're doing great things at {site: text; selector=:nth-child(1) > .text-align-left .inline-show-more-text} and was wondering if you're looking for a new role? I'm a recruiter with a great agency and you seem like the perfect fit for a position that I have open. I noticed the top skill on your LinkedIn profile is {site: text; selector=.artdeco-list__item:nth-child(1) [data-field="skill_card_skill_topic"] .hoverable-link-text > :nth-child(1)}, which would be extremely useful in this role.


Reading data from a support tool
In the support tool Intercom, a wide variety of customizable attributes are listed on the right-side of the page when replying to a request. For this example, I'm using the site command inside of an if statement to determine how to reply to the message.

By reading the Intercom attribute "Product Tier", I can have a different response generated automatically that is appropriate for the user I'm replying to:

intercom1

{if: {site: text; selector=:nth-child(9) > .overflow-hidden}="Enterprise"}Yes, you do have access to that! That feature is accessible through the side menu. Look for it in the list of features about 2/3rds of the way down the list.
{else}Sorry but that feature is not included in your plan. To access this, you must be on an Enterprise plan. Let me know if you'd like to upgrade.{endif}

Here's a similar example that warns the support agent using the snippet that this person has been in contact with Support a lot lately. This snippet is reading, from Intercom, how many support requests they've had recently. If it's over 10, a warning is displayed to give them extra attention:

intercom2

{if: {site: text; selector=:nth-child(8) > .overflow-hidden}>10}{note}{error: Note! This customer has been in touch with support more than 10 times in the last 30 days. They may have additional requests open. Please treat them with extra care}{endnote}{else}{endif: trim=left}
Hey {site: text; selector=.font-brand > :nth-child(1)},

Thanks for getting in touch with the Support team. I understand you have an issue with {formmenu: widgets; cogs; buttons; name=issuetype}.


One of the reasons that this is one of my favorite commands is because it's so flexible and requires no coding knowledge. Selecting the portion of CSS you'd like to have as part of your snippet is as simple as pointing your mouse at it. Once selected, this will dynamically merge the data into the snippet for any page that matches (e.g. each unique LinkedIn profile or each unique Intercom support interaction).

If you've used this command before, or have ideas about how you might use it now, reply here to share how!

7 Likes

Wow, this is pretty impressive. Thanks for taking the time for the in-depth examples, much appreciated.

Going to have to brainstorm how we can use this.

2 Likes

I attend professional development with my fellow educators and we are always sharing different ways to be more efficient. I have a lot of colleagues that use another very popular text extender application. One thing that I noticed that the application does is that it's able to grab data from an open tab and insert it in a different tab where I activated my snippet. I believe this is not yet available with TextBlaze. Any idea if this is in the works? Thank you!

2 Likes

Hi @EduSnip_Trailblazer2
I would love to learn more about the need for a feature like this.
Would you mind creating a post for this in the "Feature Ideas" category and share some use cases?
Thanks!

1 Like

You got it!

1 Like

I absolutely love the Site Selector tool! I have used it quite a bit. My teams and I spend the majority of our days working out of Salesforce. The problem with Site Selector in Salesforce is that it is not reliable due to how Salesforce codes their parent tabs, sub tabs, and when multiple parent tabs are open. Thus far, the only 100% reliable solution I have found is regex.

YES! This! Please!!!

1 Like

I use Text Blaze every work day to make typing up support tickets faster and easier. I would love if I could utilize even more data from my support ticket form, and save time copy and pasting from boxes/forms to the main ticket table. This is how an empty ticket looks:

Once I fill in the Caller Name and Location, I often have to copy-paste them into the ticket form in the description box. Once a caller name is entered, the form also populates an email that I also have to copy-paste into the description box.

Is there any way for TextBlaze to pick up this information once I've entered it? Would I have to go into the website HTML for TB to be able to find it?

Hi @Nikki_Bennett Welcome to the forum! :slight_smile: Depending on the layout of the website this may or may not be possible. Have you tried following the demo GIF in Andrew's post above (here's the link again) and see if it works for you? Here's a demo video for the same feature (slightly different user interface because it's older). Let me know if it works for you.

I'm really excited about starting to make use of this feature! I see ways to use the text from a website in if/then scenarios. Is there a way to manipulate/format the text from a website? I would like to extract a date, which is formatted 05/07/2024, and then manipulate it using datetimeadd, but I'm not sure how to get the date pulled from the website into a format that datetimeadd can work with.

Hey @megan.gendell,
Are you able to extract the date from the website?
If yes, you can use the following (I'm creating a variable that should be replaced with your date picker)

{extracted_date="05/07/2024"}
{target_date=datetimeadd(datetimeparse(extracted_date, "MM/DD/YYYY"), 9, "D")}
{time: YYYY-MM-DD; at={=target_date}}

Thank you! Yes, I can extract the date from the website (so cool!), but I can't seem to figure out how to give it a name so I can use it in formulas. Right now it just looks like:

{site: text; selector=[name="Item.Tasks[5].ActiveDate"]}

and then the date appears in that spot in the snippet.

I JUST figured out how to click the equal sign in the formula editor to name variables in general so maybe there's something like that I'm missing here?

You can include your site command directly in a formula. For example if you want to upper case the contents, you could use:

{=upper( {site: text; selector=[name="Item.Tasks[5].ActiveDate"]} )}

Turns out I was opening the website I wanted to use wrong! I've got it working now and it is really great :smiley: Really saves important seconds when I need them and I can't wait to share with my team that also uses TextBlaze

2 Likes

@Nikki_Bennett Hi! What ticket system are you using? I am looking for one that is for projects & requests sent to me by colleagues, not something for our Enterprise. Thank you!