Plugins
Parser Plugins
Import conversations from custom platforms
Parser Plugins
Parser plugins enable importing conversations from platforms not natively supported by Chatelope.
How Parsers Work
- User uploads an export file (ZIP, JSON, etc.)
- Plugin detects if it can handle the file
- Plugin parses the file format
- Plugin returns normalized conversation data
- Chatelope imports the conversations
Available Parsers
Official Parsers
Built into Chatelope:
- ChatGPT
- Claude
- Gemini
Community Parsers
Install from the plugin directory:
| Parser | Platform | Status |
|---|---|---|
| slack-parser | Slack | Verified |
| teams-parser | Microsoft Teams | Verified |
| discord-parser | Discord | Community |
| telegram-parser | Telegram | Community |
Using Parser Plugins
After Installation
Once installed, parsers appear in the import flow:
- Go to Import
- New platform appears in the list
- Select it and upload your export
- Parser handles the rest
Selecting Parsers
If multiple parsers can handle a file:
- Chatelope shows options
- Select the correct parser
- Proceed with import
Parser Settings
Configure parser behavior:
- Go to Settings > Plugins
- Find the parser plugin
- Click settings icon
Common settings:
- Date format - How dates are parsed
- Timezone - Default timezone for imports
- Attachment handling - How to process files
Creating Parser Plugins
See Creating Plugins for the full SDK guide.
Quick Example
import { defineParser, ParsedConversation } from '@chatelope/plugin-sdk';
export default defineParser({
id: 'my-platform-parser',
name: 'My Platform',
version: '1.0.0',
// Check if this parser can handle the file
detect: async (file) => {
return file.name.endsWith('.json');
},
// Parse the file and return conversations
parse: async (file): Promise<ParsedConversation[]> => {
const content = await file.text();
const data = JSON.parse(content);
return data.conversations.map(conv => ({
sourceId: conv.id,
source: 'my-platform',
title: conv.title,
createdAt: new Date(conv.created),
messages: conv.messages.map(msg => ({
role: msg.type === 'user' ? 'user' : 'assistant',
content: msg.text,
timestamp: new Date(msg.time),
})),
}));
},
});Parser Interface
interface Parser {
id: string;
name: string;
version: string;
icon?: string;
detect(file: File): Promise<boolean>;
parse(file: File): Promise<ParsedConversation[]>;
// Optional hooks
onProgress?(percent: number): void;
validateExport?(file: File): Promise<ValidationResult>;
}Conversation Schema
interface ParsedConversation {
sourceId: string;
source: string;
title: string;
createdAt: Date;
updatedAt?: Date;
messages: ParsedMessage[];
metadata?: Record<string, unknown>;
}
interface ParsedMessage {
role: 'user' | 'assistant' | 'system';
content: string;
timestamp?: Date;
attachments?: ParsedAttachment[];
}Testing Parsers
Local Testing
Test your parser locally:
- Install plugin in development mode
- Import sample exports
- Verify conversation data
Sample Data
Create test exports:
import { createTestExport } from '@chatelope/plugin-sdk/testing';
const testFile = createTestExport({
conversations: [
{ title: 'Test', messages: [...] }
]
});Best Practices
- Handle errors gracefully - Invalid files should fail cleanly
- Support large files - Use streaming for big exports
- Preserve metadata - Keep platform-specific info
- Document format - Explain what exports you support
- Version your parser - Handle format changes over time