Skip to content
Get started
Guides

Sources

Connect external data to your AI tasks

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.

When a task runs with connected sources:

  1. 0ct initializes connections to each source
  2. Sources are exposed to the AI as callable tools
  3. AI can query sources as needed during execution
  4. Fresh data is incorporated into the task output
  • Linear - Issues, projects, cycles, roadmaps
  • Todoist - Tasks, projects, labels
  • Asana - Tasks, projects, workspaces
  • GitHub - Repositories, issues, PRs, commits
  • GitLab - Projects, merge requests, pipelines
  • Slack - Channels, messages, users
  • Discord - Servers, channels, messages
  • Notion - Pages, databases, blocks
  • Google Drive - Files, folders, documents
  • Any API - Custom MCP server configuration
  1. Navigate to Sources in the sidebar
  2. Click Add Source
  3. Choose an integration from the registry
  4. Click Connect to start OAuth flow
  5. Authorize access in the popup
  6. Source is ready to use!
import Oct from '0ct';
const client = new Oct({
apiKey: process.env.OCT_API_KEY
});
// Create a source
const 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.

0ct includes auto-discovery of popular MCP servers. When adding a source:

  1. Search by name or description
  2. Matching integrations appear with setup instructions
  3. OAuth-enabled integrations offer one-click connection
ServiceDescriptionAuth Type
LinearProject trackingOAuth
GitHubCode hostingOAuth
SlackTeam communicationOAuth
NotionWorkspace docsOAuth
TodoistPersonal tasksOAuth
DiscordCommunity chatOAuth

Most sources use OAuth for secure authorization:

// OAuth sources are configured in the dashboard
// The SDK can list and manage them
const sources = await client.promptly.sources.list();

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'
}
}
});

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'
}
});
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']
});
await client.promptly.tasks.update('task_xyz', {
sources: ['source_github_abc', 'source_linear_def']
});

Each source exposes different tools to the AI:

  • list_repositories - Get repositories
  • list_issues - Get issues with filters
  • list_pull_requests - Get PRs
  • get_file_contents - Read file content
  • search_code - Search across repos
  • list_issues - Get issues
  • list_projects - Get projects
  • get_cycle - Get current cycle
  • list_team_members - Get team
  • list_channels - Get channels
  • get_messages - Read channel messages
  • search_messages - Search across workspace
const sources = await client.promptly.sources.list();
for (const source of sources.data) {
console.log(`${source.name} (${source.type}): ${source.status}`);
}
const result = await client.promptly.sources.test('source_abc123');
if (result.success) {
console.log('Connection healthy!');
} else {
console.log('Error:', result.error);
}
await client.promptly.sources.update('source_abc123', {
name: 'Renamed Source',
config: {
// Updated configuration
}
});
await client.promptly.sources.delete('source_abc123');

Use descriptive names that indicate the source and scope:

  • GitHub - Main Repo
  • Linear - Engineering Team
  • Source 1

Request only the permissions you need:

  • Read-only access for reporting tasks
  • Write access only when tasks need to create/update

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));
}

OAuth tokens may have expired. Re-authorize in the dashboard.

Some APIs have rate limits. Reduce task frequency or source queries.

Check that the OAuth scope includes required permissions.