Logo Text Blaze
  • Products
    • Text Blaze
      Snippets and templates
    • AI Blaze
      AI writing and editing
    • Data Blaze
      Tables and sheets
    Downloads
    • Add to Chrome
    • Windows app
    • MacOS app
  • By function
    • Support & operations
    • Sales
    • Healthcare
    • Education
    • Recruiting
    • Marketing
    Business
    • For teams
  • Resources
    • Documentation
    • Community forum
    • Gallery
    • Contact us
  • Pricing

Documentation

No search results

Text Blaze

Loading...

Data Blaze

Loading...

Community Forums

Loading...
Add to Chrome –  It's Free! Go to Dashboard ›
Docs > Guides
  • Guides
    • Quick Start
    • Sharing Snippet Folders
    • Dynamic Commands
    • Date and Time
    • Autopilot
    • Forms
    • Formulas
    • Rules & Validation
    • Tables in Snippets
    • Connect Other Apps
    • Tidying Whitespace
    • Lists
    • Read Data from Websites
    • Teams and Organizations
  • Tutorial Videos
  • Gallery
  • Frequently Asked Questions
  • Formula Reference
  • Dynamic Commands
    • Using Dynamic Commands
    • {=} (Formula Command)
    • {button}
    • {click}
    • {clipboard}
    • {cursor}
    • {error}
    • {formdate}
    • {formmenu}
    • {formparagraph}
    • {formtext}
    • {formtoggle}
    • {if}
    • {import}
    • {key}
    • {link}
    • {note}
    • {repeat}
    • {run}
    • {site}
    • {snippet}
    • {time}
    • {user}
    • {wait}
  • Connected Snippets
    • Connected Snippets Overview
    • {image}
    • {urlload}
    • {urlsend}
    • {dbselect}
    • {dbinsert}
    • {dbupdate}
    • {dbdelete}
  • Command Packs
    • Capitalize
    • Gmail
    • LinkedIn
    • Randomize

What's on this Page

  • Selecting website contents text
    • Selections are placeholders
    • Choosing the website content
  • Uses for website contents text
    • Merge website contents data into your snippet
    • Power conditional rules or validation
  • Additional tips for the website command
    • Different behavior based on website URL
    • Handling errors or missing data
    • Shortening selected text by splitting it or using regex
Guides

Read Data from Websites

Summary: Read data from websites where snippets are used. This data can be merged directly into the text of your snippets, or used to power rules inside your snippet.

Quick Overview Video

Copying and pasting data is a waste of time, especially when the data is already available on the website where you’re using your snippets. This is common with tools like EMRs, CRMs, customer support ticketing systems, and other databases.

The website command will retrieve this information from the page where you’re using the snippet.

If you’d like to retrieve information from another app or service but aren’t using your snippet on that website, using the urlload command is more appropriate.

It is also possible to retrieve text from your Clipboard or from your Text Blaze user profile automatically.

Selecting website contents text

When selecting website contents text, Text Blaze lets you mouse over a website's components to select the one you need to use in your snippet.

The text you select must be visible on the page where you use your snippet, and not hidden behind other website elements (such as requiring a click or a mouse-over to show that data).

Selections are placeholders

The website contents text option will always retrieve the text inside the area that you selected. When configuring this command in your snippet, think of your selection as a placeholder that will be dynamically filled in each time the snippet is used.

As an example, using the website contents text command and selecting the value of this dropdown from Zendesk will retrieve the value of that dropdown for any Zendesk ticket I use the snippet in.

Zendesk fields

The command is looking at that specific portion of the Zendesk ticket page, and adding whatever text is listed in that dropdown as the value. This is, basically, telling Text Blaze "look at this part of the website, and pull in whatever it says there".

Choosing the website content

Before adding the website command, it is helpful to already have another tab open on the page from which you’d like to retrieve the contents. For instance, if I plan to retrieve information from a LinkedIn profile page, start by opening another tab with anyone’s LinkedIn profile page in it.

Once that tab is open, follow these instructions:

  • Step 1: click the website command, and then the website contents text option
  • Step 2: click the blue "select from website" button
  • Step 3: switch to the tab where the contents you’d like to retrieve is located. As you mouse over the different components of the website, you’ll see it highlighted in yellow. Once you’ve highlighted the portion you want to use, click your mouse.
  • Step 4: click the blue "insert into snippet" button

Site selector in action

Uses for website contents text

Merge website contents data into your snippet

This is the most-common use-case for this feature. Following the instructions in the previous section will result in the selected data being merged directly into the text of the snippet.

Below is an example of this working in a snippet that retrieves someone’s current company from their LinkedIn profile page. The same process can easily be applied to data inside your EMR, CRM, customer support tool, or other databases.

The website contents command will only work successfully on a page that contains the data that the command is looking for. Due to this, snippet examples inside this Guide will not show successful results.
Reading information from a LinkedIn profile

Hi {linkedin-firstname},

I see that you're currently {site: text; selector=:last-child > .artdeco-list__item div > .full-height > span > :nth-child(1)} at {site: text; selector=:nth-child(1) > .text-align-left .inline-show-more-text}. That's great experience for a new role I'm hiring for at Text Blaze, so I wanted to reach out and see if you're interested in discussing this opportunity with me further.

_

Using the site selector in LinkedIn

Power conditional rules or validation

Sometimes it won’t be necessary to add the actual text into your snippet. Instead, Text Blaze can retrieve that text and use it to power conditional rules. By adding the website contents command inside an if/else command, Text Blaze can detect data on a page and follow the rules that you define to determine what the snippet should do.

Keep in mind that the website contents command will only work on pages that contain the selected data, so these examples won’t work in this guide.

The below snippets are examples of how to structure snippets this way. There are gifs below that show them in action.

This snippet is meant to be used inside of Hubspot when leaving a note on a Contact record.

The snippet looks at the "Lifecycle Stage" field in my Hubspot instance and generates different text depending on which stage the contact is in.

Reading lifecycle stage in Hubspot
{if: {site: text; selector=[data-selenium-test="property-input-lifecyclestage"]}="Lead"}This contact is still a Lead and needs further nurturing. BDR to send sequence ABC in attempt to qualify them further.{elseif: {site: text; selector=[data-selenium-test="property-input-lifecyclestage"]}="Customer"}This contact is already a customer and we should not send them further sales outreach.{else}Contact needs further investigation{endif}
_

Using the site selector in HubSpot

This snippet is meant to be used inside of Zendesk when responding to a ticket.

The snippet looks at the field that shows the number of contacts in the last 30 days, and displays a warning to the support agent if that field says there have been more than 5 contacts.

Reading the number of contacts in Zendesk

{note}{if: {site: text; selector=.grid-ticket-fields-panel [data-garden-id="forms.input"]}>5}{error: Warning! This user has contacted us more than 5 times in the last 30 days. They may need special assistance, so be proactive in offering help!}{endif}{endnote} Hi {site: text; selector=.requester [data-garden-id="typography.ellipsis"]},

Thanks for getting in touch with product support. To further assist you, could you please provide the following information about your issue?

{formparagraph}

_

Using the site selector in Zendesk

Additional tips for the website command

Different behavior based on website URL

Examples up to this point have been looking at the contents of websites. Another common use-case is to have a snippet perform different actions based on the URL where the snippet is used.

Like the previous examples, doing this uses the if/else command with the website command inside of it.

This time, we’ll instead use the website URL option for the website command. Depending on your use, you may want to use the website path or website domain option instead.

The below snippet determines if the snippet is being used inside of LinkedIn or inside of Gmail, and results in different text being generated depending on which is true.
Greeting based on the website
{if: contains({site: url}, "linkedin")}Hi {formtext: name=firstname}, I hope you don't mind my reaching out via LinkedIn about Text Blaze.{elseif: contains({site: url}, "mail.google")}Hi {formtext: name=firstname}, I know you get a lot of emails, so I hope you don't mind one more from me.{endif}
_

Handling errors or missing data

Sometimes a website contents text command will not find matching data, or the data won’t be what the snippet was expecting.

Rather than resulting in a complete error, the catch function can replace that error with a default text of your choosing.

Adding the catch function to your snippet will display the selected text if a match is found, or will display that default value if no match is found.

Catching an error in the site selector
Here's the first contact that LinkedIn says we have in common: {=catch({site: text; selector=.app-aware-link > .hoverable-link-text > :nth-child(1) > :nth-child(1)}, "we don't have any contacts in common")}
_

Using the site selector in Zendesk

Shortening selected text by splitting it or using regex

Sometimes you may want only a portion of the text that is selected with this command. For instance, a website might store both the first and last name together, but you only need the first name.

Splitting the text into a list and selecting one item is one option. The example below pulls the name from the website, splits the text everywhere there's a space into a list of items and then pulls the first item in the list:

Splitting text using the split function
{=split({site: text; selector=[data-selenium-test="highlightTitle"]}, " ")[1]}
_

Using regex, specifically the extractregex function can also help to retrieve only the specific text that you need.

Regex can be tricky to get the hang of. If you need assistance with regex, don’t hesitate to contact support@blaze.today.

Here’s an example of shortening the selection of a full name to just a first name:

Pulling part of a text using regex
{=extractregex({site: text; selector=[data-selenium-test="highlightTitle"]}, "(\w+)\s")}
_

About

Plans and Pricing
Sharing Snippets
Text Blaze for Business
Forms
Autopilot
Dynamic Commands
Command Packs
Text Blaze for Windows
Text Blaze for macOS

Support

Get Started with Text Blaze
Contact Us
Documentation
Community Forum
Blog
Gallery
Engineering Blog

Solution for

Business
Customer Support
Recruiters
Education
Healthcare
Sales
Property Managers
AI

Other

Privacy Policy
Terms of Service
Open Source Licenses
Affiliate
© Blaze Today Inc