Template Instructions
Creating powerful chatbot abilities just got dramatically faster. Template Instructions let you reference pre-built, thoroughly tested instruction patterns from ChatBotKit's ability catalog, eliminating the need to write complex integration code from scratch every time you want to connect with services like Google Calendar, Notion, Slack, or dozens of other platforms.
What Are Template Instructions?
Template Instructions are reusable patterns stored in ChatBotKit's ability catalog that encapsulate the complexity of integrating with third-party services. Instead of writing detailed instructions for every API call, authentication flow, and error handling scenario, you simply reference a template by name and provide the specific parameters your use case needs.
Think of templates as building blocks for your skillsets. Each template has been designed, tested, and optimized for a specific operation—like searching Google Calendar, querying a Notion database, or posting a Slack message. You get production-ready functionality without the development overhead.
How It Works
Using Template Instructions is straightforward and comes in two formats depending on your needs:
Simple Reference Format
For templates without parameters, simply reference the template by name:
@google/calendar/search
This automatically uses the template's default configuration and handles all the complexity of connecting to Google Calendar's API.
YAML Format with Parameters
When you need to customize behavior, use the YAML format to specify parameters:
The YAML format gives you full control over parameter values while still leveraging the template's built-in authentication, error handling, and API integration logic.
Real-World Benefits
Rapid Development: Create a Google Calendar integration ability in minutes instead of hours. No need to research API documentation, handle OAuth flows, or debug API quirks.
Consistency: All abilities using the same template follow identical patterns, making your skillsets more predictable and easier to maintain. When a template is updated to fix a bug or improve performance, every ability using it benefits automatically.
Reliability: Templates are thoroughly tested and follow best practices. They handle edge cases, rate limiting, and error scenarios that you might miss when building integrations from scratch.
Security Built-In: Templates reference authentication secrets properly, reducing the risk of accidentally exposing credentials or implementing insecure authentication flows.
Available Templates
ChatBotKit's ability catalog includes templates for popular services:
- Google Services: Calendar, Drive, Gmail, Sheets, and more
- Productivity Tools: Notion, Slack, Microsoft 365, Dropbox
- Development Platforms: GitHub, GitLab, Jira
- Communication: Email, messaging platforms, notifications
- Data & Analytics: Database queries, search operations
- Pack Templates: Collections of related abilities for comprehensive service access
Each template includes detailed documentation about its parameters, authentication requirements, and usage examples.
Practical Example
Here's a complete ability definition using a template instruction:
This creates a production-ready ability that:
- Authenticates with Google Calendar using OAuth
- Handles API rate limiting and errors gracefully
- Processes search queries with proper parameter encoding
- Returns results in a consistent format
- Follows Google's API best practices
Parameter Flexibility
Templates support different parameter types to match your needs:
Direct Values: Simple strings, numbers, or booleans that are substituted directly into the template.
Field Definitions: Dynamic parameters using field notation (like $[query ys|description]) that get resolved based on user input or conversation context.
Optional Parameters: Parameters that can be omitted, allowing templates to use sensible defaults while giving you the option to customize behavior when needed.
Getting Started
To use Template Instructions in your abilities:
- Browse the ability catalog to find templates for the services you want to integrate
- Check the template's required parameters and authentication needs
- Add the template instruction to your ability with appropriate parameters
- Test your ability to ensure parameters are correctly configured
Template Instructions work seamlessly with all instruction types, so you can combine them with simple instructions, complex instructions, or use them in pack templates for multi-step workflows.
Best Practices
Start with Templates: Before writing custom integration code, check if a template already exists for your use case. Templates save development time and reduce bugs.
Provide Required Parameters: Ensure all required parameters are specified. Templates will throw errors if mandatory parameters are missing.
Use Field Notation for Dynamic Values: Leverage field definitions ($[name|description]) for parameters that should be populated from user input or conversation context.
Test Parameter Substitution: Verify that your parameter values are correctly substituted by testing the ability with various inputs.
Ready to accelerate your ability development? Explore the ability catalog and start building powerful integrations in minutes with Template Instructions.