Imports
Using imports in frontmatter or markdown allows you to modularize and reuse workflow components across multiple workflows.
Syntax
Section titled “Syntax”Imports can be specified either in frontmatter or in markdown. In frontmatter the imports: field is used:
---on: issuesengine: copilotimports: - shared/common-tools.md - shared/mcp/tavily.md---
# Your Workflow
Workflow instructions here...In markdown, use the special {{#import ...}} directive:
---...---
# Your Workflow
Workflow instructions here...
{{#import shared/common-tools.md}}Path Formats
Section titled “Path Formats”Import paths support local files (shared/file.md, ../file.md), remote repositories (owner/repo/file.md@v1.0.0), and section references (file.md#SectionName). Optional imports use {{#import? file.md}} syntax in markdown.
Paths are resolved relative to the importing file, with support for nested imports and circular import protection.
Frontmatter Merging
Section titled “Frontmatter Merging”Imported files can only define tools:, mcp-servers:, and services: frontmatter (other fields trigger warnings). These fields are merged with the main workflow’s configuration.
Example
Section titled “Example”# Base workflow---on: issuesengine: copilotimports: - shared/mcp/tavily.md------mcp-servers: tavily: url: "https://mcp.tavily.com/mcp/?tavilyApiKey=${{ secrets.TAVILY_API_KEY }}" allowed: ["*"]---The imported MCP server configuration is merged into the final workflow, making it available to the AI engine.
Related Documentation
Section titled “Related Documentation”- Packaging and Updating - Complete guide to managing workflow imports
- Frontmatter - Configuration options reference
- MCPs - Model Context Protocol setup