A snippet is a reusable block of text or code that eliminates repetitive typing by expanding a short trigger into a full passage. In marketing and sales workflows, it functions as pre-written content stored in your CRM that inserts into emails, chat windows, or activity logs via a keyboard shortcut. [First known use of snippet dates to 1664] (Merriam-Webster), though modern usage spans from software development to customer relationship management.
What is Snippets?
In CRM contexts like HubSpot, a snippet is a short, reusable text block attached to contact, company, or deal records. You create these inside the platform and invoke them with a shortcut (typically starting with the # symbol) to populate common phrases without retyping.
The concept originates from programming, where a snippet represents a small amount of source code stored in an IDE or editor and inserted into a larger codebase. [Snippets break into static, dynamic, and scriptable categories based on interactivity] (Wikipedia). Static snippets insert fixed text immediately. Dynamic snippets contain placeholders (like {%first_name%} or $1) that prompt you for replacement values at insertion time. Scriptable snippets execute runnable code or shell commands to generate content dynamically.
Why Snippets matters
- Accelerate outbound workflows: Insert entire follow-up paragraphs in two keystrokes instead of 30 seconds of typing. This compounds across high-volume sales or support queues.
- Standardize messaging: Teams share identical value propositions, disclaimers, or technical specifications, reducing brand voice drift across individual contributors.
- Scale personalization: Combine shortcuts with personalization tokens to auto-populate recipient names or company details without manual copy-pasting from CRM records.
- Reduce mobile friction: [The HubSpot mobile keyboard limits access to 100 snippets] (HubSpot Knowledge Base), keeping the most current phrases available for field sales reps logging activities from phones.
- Prevent rendering errors: Pre-approved HTML or formatted text in snippets avoids broken links or formatting mistakes common in rushed manual entry.
How Snippets works
Creating a snippet (HubSpot CRM):
1. Navigate to CRM > Snippets.
2. Click Create snippet.
3. Enter an internal name and the body text (rich text supported).
4. Define a shortcut trigger (e.g., #followup).
5. Add personalization tokens if needed.
6. Save. [HubSpot restricts snippets to 2,500 characters per block] (HubSpot Knowledge Base).
Insertion methods:
- Type # followed by your shortcut in any text editor, chat window, or email composition area.
- Click the snippets icon at the bottom of the text editor and select from the dropdown menu.
- Personalization tokens only populate when used on the Email tab of contact, company, deal, or ticket records; they remain blank in chat or general notes.
Programming context: Developers store code fragments in IDEs like Eclipse, VS Code, or Vim. The editor expands a short abbreviation into a full function prototype or control structure. Placeholders receive user input post-insertion, allowing variable names or parameters to update throughout the generated code simultaneously.
Types of Snippets
| Type | Definition | Best Used When |
|---|---|---|
| Static | Fixed text that inserts exactly as stored, requiring no input at insertion time. | Inserting standard disclaimers, signatures, or boilerplate greetings. |
| Dynamic | Contains placeholders (e.g., {%first_name%}, $1) that you replace during insertion. |
Customizing a template with recipient-specific details or unique dates. |
| Scriptable | Executable code or shell commands that run at insertion to generate or modify content. | Running automation, fetching data from APIs, or transforming text (e.g., converting titles to uppercase in specific instances). |
Best practices
Limit length rigorously. Keep text under the 2,500-character ceiling. Longer content belongs in email templates, not snippets.
Replace curly brackets. [Creating a snippet with curly brackets instead of personalization tokens causes issues with HubSpot's template rendering service] (HubSpot Knowledge Base). Remove literal { or } characters or convert them to proper personalization token syntax.
Design shortcuts for recall. Use mnemonic triggers like #coldintro or #pricingfaq rather than abstract codes. Consistent naming conventions across team members prevent duplicate snippet creation.
Organize with folders. Group snippets by funnel stage (awareness, consideration, retention) or by campaign to reduce search time.
Reserve tokens for emails. Personalization tokens (e.g., {{contact.firstname}}) only render in the Email tab of records. Using them in chat or activity logs displays the raw code rather than the value, creating unprofessional-looking messages.
Common mistakes
Mistake: Exceeding account limits. [Free HubSpot accounts created after September 18, 2024, face a three-snippet limit, while older accounts retain five] (HubSpot Knowledge Base). Attempting to create beyond your seat limit blocks saving. Fix: Audit existing snippets for redundancy before hitting the cap, or upgrade to a Sales/Service Hub Core Seat for unlimited creation.
Mistake: Expecting dynamic updates post-insertion. Unlike preprocessor macros or functions, changing a snippet definition does not retroactively update text already inserted into emails or notes. Fix: Treat snippets as copy-paste helpers, not linked variables. Update sent communications manually if the master snippet changes.
Mistake: Using snippets with double-byte characters (e.g., Japanese, Chinese) without checking length. These consume more storage per character, causing you to hit the 2,500 limit faster than with Latin text. Fix: Test save early when working with non-Latin scripts to verify character count compliance.
Mistake: Over-scripting. Complex scriptable snippets with multiple OS interactions or GUI dialogs slow down insertion and may trigger security warnings in locked-down environments. Fix: Keep scriptable snippets simple, such as single-command shell executions or basic text transformations.
Examples
Example scenario (Sales outreach):
A B2B marketer creates a snippet named "Case Study Intro" with shortcut #casestudy. The body reads: "Hi {{contact.firstname}}, saw {{company.name}} expanded into APAC. Here is how a similar firm cut onboarding time by 40%." When composing a follow-up email, the rep types #casestudy, and the personalization tokens auto-fill from the CRM record. The entire paragraph appears in under one second.
Example scenario (Technical support):
A support agent maintains a dynamic snippet for debugging steps. The snippet contains: "Please clear your cache at $1 and restart $2." Upon insertion, the IDE (or advanced text expander) prompts the agent to enter the browser name for $1 and the application name for $2, generating customized instructions without retyping the full protocol.
Example scenario (Campaign consistency):
The marketing team stores UTM-tagged links in static snippets to ensure every outreach email uses identical tracking parameters. The snippet contains: https://example.com/?utm_source=sales&utm_medium=email&utm_campaign=q2. Inserting this prevents typos in manual UTM construction.
FAQ
What is the difference between a snippet and a template? A snippet is a short block (under 2,500 characters) intended for partial insertion into a larger message. A template is a complete, pre-written email or document ready to send with minimal modification. Snippets compose templates; they do not replace them.
Can I use snippets in chat or only email? Yes. You can insert snippets in live chat conversations, notes, activity logs, and emails. However, personalization tokens only populate in the Email tab of contact, company, deal, or ticket records. In chat or logs, tokens appear as raw code.
Why does my snippet shortcut not work on mobile? The HubSpot mobile keyboard displays only the 100 most recent snippets you have accessed. If your snippet is older or rarely used, it may not appear in the mobile list. Desktop insertion shows all snippets regardless of age.
What happens if I edit a snippet after inserting it into an email? Nothing. Snippets function as copy-and-paste macros. Once inserted, the text becomes static content in your message. Editing the master snippet definition does not update existing drafts or sent emails.
Are code snippets the same as marketing snippets? Conceptually similar but technically distinct. Programming snippets (stored in IDEs like VS Code or Chrome DevTools) insert source code and may include scriptable logic. Marketing snippets (in HubSpot or CRMs) insert formatted text and support personalization tokens but do not execute code.
How do I share snippets with my team? In HubSpot, snippets are user-specific by default; users see only their own when using the mobile keyboard. To share, clone snippets or establish naming conventions so teammates can recreate identical shortcuts locally. Enterprise seats with proper permissions allow broader management and duplication.