Sources
Connect external data to your AI tasks
Sources
Section titled “Sources”Sources connect 0ct to your external data, enabling AI tasks to access real-time information during execution. Using the Model Context Protocol (MCP), tasks can query your tools just like you would.
How Sources Work
Section titled “How Sources Work”When a task runs with connected sources:
- 0ct initializes connections to each source
- Sources are exposed to the AI as callable tools
- AI can query sources as needed during execution
- Fresh data is incorporated into the task output
Supported Integrations
Section titled “Supported Integrations”Project Management
Section titled “Project Management”- Linear - Issues, projects, cycles, roadmaps
- Todoist - Tasks, projects, labels
- Asana - Tasks, projects, workspaces
Development
Section titled “Development”- GitHub - Repositories, issues, PRs, commits
- GitLab - Projects, merge requests, pipelines
Communication
Section titled “Communication”- Slack - Channels, messages, users
- Discord - Servers, channels, messages
Productivity
Section titled “Productivity”- Notion - Pages, databases, blocks
- Google Drive - Files, folders, documents
Custom
Section titled “Custom”- Any API - Custom MCP server configuration
Connecting a Source
Section titled “Connecting a Source”Via Dashboard
Section titled “Via Dashboard”- Navigate to Sources in the sidebar
- Click Add Source
- Choose an integration from the registry
- Click Connect to start OAuth flow
- Authorize access in the popup
- Source is ready to use!
Via SDK
Section titled “Via SDK”import Oct from '0ct';
const client = new Oct({ apiKey: process.env.OCT_API_KEY});
// Create a sourceconst source = await client.promptly.sources.create({ name: 'My GitHub', type: 'github', organizationId: 'org_abc123', config: { // Configuration depends on source type owner: 'my-org', repo: 'my-repo' }});Note: Most sources require OAuth authentication in the dashboard. The SDK is best for managing sources after they’ve been connected.
MCP Registry
Section titled “MCP Registry”0ct includes auto-discovery of popular MCP servers. When adding a source:
- Search by name or description
- Matching integrations appear with setup instructions
- OAuth-enabled integrations offer one-click connection
Popular Integrations
Section titled “Popular Integrations”| Service | Description | Auth Type |
|---|---|---|
| Linear | Project tracking | OAuth |
| GitHub | Code hosting | OAuth |
| Slack | Team communication | OAuth |
| Notion | Workspace docs | OAuth |
| Todoist | Personal tasks | OAuth |
| Discord | Community chat | OAuth |
Source Configuration
Section titled “Source Configuration”OAuth Sources
Section titled “OAuth Sources”Most sources use OAuth for secure authorization:
// OAuth sources are configured in the dashboard// The SDK can list and manage themconst sources = await client.promptly.sources.list();API Key Sources
Section titled “API Key Sources”Some sources accept API keys directly:
const source = await client.promptly.sources.create({ name: 'Custom API', type: 'api', config: { baseUrl: 'https://api.example.com', headers: { 'Authorization': 'Bearer your-api-key' } }});Custom MCP Servers
Section titled “Custom MCP Servers”For advanced use cases, connect any MCP-compatible server:
const source = await client.promptly.sources.create({ name: 'Custom MCP', type: 'mcp', config: { serverUrl: 'https://mcp.example.com', transport: 'http' }});Using Sources in Tasks
Section titled “Using Sources in Tasks”Attach During Creation
Section titled “Attach During Creation”const task = await client.promptly.tasks.create({ name: 'GitHub Activity Report', prompt: ` Review recent GitHub activity: - List merged PRs from the past week - Summarize key changes - Identify any open issues needing attention `, modelId: 'openai/gpt-4o', frequency: 'weekly', scheduledDay: 'monday', scheduledTime: '09:00', sources: ['source_github_abc123']});Update Existing Task
Section titled “Update Existing Task”await client.promptly.tasks.update('task_xyz', { sources: ['source_github_abc', 'source_linear_def']});Source Capabilities
Section titled “Source Capabilities”Each source exposes different tools to the AI:
GitHub Example Tools
Section titled “GitHub Example Tools”list_repositories- Get repositorieslist_issues- Get issues with filterslist_pull_requests- Get PRsget_file_contents- Read file contentsearch_code- Search across repos
Linear Example Tools
Section titled “Linear Example Tools”list_issues- Get issueslist_projects- Get projectsget_cycle- Get current cyclelist_team_members- Get team
Slack Example Tools
Section titled “Slack Example Tools”list_channels- Get channelsget_messages- Read channel messagessearch_messages- Search across workspace
Managing Sources
Section titled “Managing Sources”List Sources
Section titled “List Sources”const sources = await client.promptly.sources.list();
for (const source of sources.data) { console.log(`${source.name} (${source.type}): ${source.status}`);}Test Connection
Section titled “Test Connection”const result = await client.promptly.sources.test('source_abc123');
if (result.success) { console.log('Connection healthy!');} else { console.log('Error:', result.error);}Update Source
Section titled “Update Source”await client.promptly.sources.update('source_abc123', { name: 'Renamed Source', config: { // Updated configuration }});Delete Source
Section titled “Delete Source”await client.promptly.sources.delete('source_abc123');Best Practices
Section titled “Best Practices”Naming Conventions
Section titled “Naming Conventions”Use descriptive names that indicate the source and scope:
- ✅
GitHub - Main Repo - ✅
Linear - Engineering Team - ❌
Source 1
Access Scopes
Section titled “Access Scopes”Request only the permissions you need:
- Read-only access for reporting tasks
- Write access only when tasks need to create/update
Connection Health
Section titled “Connection Health”Monitor source status regularly:
const sources = await client.promptly.sources.list();
const unhealthy = sources.data.filter(s => s.status !== 'connected');if (unhealthy.length > 0) { console.log('Sources need attention:', unhealthy.map(s => s.name));}Troubleshooting
Section titled “Troubleshooting””Source disconnected”
Section titled “”Source disconnected””OAuth tokens may have expired. Re-authorize in the dashboard.
”Rate limited”
Section titled “”Rate limited””Some APIs have rate limits. Reduce task frequency or source queries.
”Permission denied”
Section titled “”Permission denied””Check that the OAuth scope includes required permissions.
Next Steps
Section titled “Next Steps”- Create Skills - Add reusable instructions
- Configure Destinations - Set up result delivery
- Explore Tasks - Advanced task configuration