Skip to main content

Prerequisites

  • TypeScript knowledge
  • Understanding of the service you’re integrating
  • API documentation for the service

Step 1: Create Integration Folder

Create a new folder in packages/integration-platform/src/manifests/:
File structure:

Step 2: Define Types

Create types.ts for the integration’s data structures:

Step 3: Create the Manifest

Create index.ts:

Step 4: Write a Check

Create checks/your-check.ts:

Step 5: Add Variables (Optional)

If your check needs user configuration:

Step 6: Register the Manifest

Add to packages/integration-platform/src/registry/index.ts:

Step 7: Test It

  1. Start dev servers:
  2. Configure OAuth (if using OAuth):
    • Go to /admin/integrations
    • Find your integration → Configure OAuth
    • Add Client ID/Secret
  3. Connect the integration:
    • Go to /integrations
    • Find your integration
    • Click “Connect”
    • Authorize (if OAuth) or enter credentials
  4. Run checks:
    • Go to /cloud-tests (if it’s a cloud provider)
    • Or go to a task page and run the integration check
    • Verify findings appear correctly
  5. Check logs:
    • Look at API terminal for check execution logs
    • Verify no errors

Common Patterns

Pagination

Error Handling

Multiple Checks

Best Practices

Do’s

  • Use descriptive IDs: branch-protection, not check1
  • Map to tasks: Use taskMapping to auto-complete tasks
  • Friendly errors: Convert API errors to user-friendly messages
  • Log liberally: Use ctx.log() for debugging
  • Handle missing data: Not all orgs have all resources
  • Paginate when needed: Don’t assume small datasets
  • Type everything: Use TypeScript types for API responses

Don’ts

  • Don’t expose raw API errors to users in descriptions
  • Don’t assume variables exist: Check for undefined
  • Don’t use console.log: Use ctx.log() instead
  • Don’t create findings for missing resources: Just log it
  • Don’t hardcode URLs: Use baseUrl in manifest
  • Don’t skip error handling: Wrap API calls in try/catch

Examples to Reference

All integration source code is in packages/integration-platform/src/manifests/.

Need Help?

  • Check existing integration manifests for patterns
  • Review type definitions in src/types.ts
  • See the Contributing Guide for PR requirements