.do

Integrations.do

Connect to thousands of external services with unified abstractions

The .do platform provides unified access to thousands of external services through two core interfaces: api for searches and actions, and on for event triggers and callbacks.

Quick Example

import { api, on } from 'sdk.do'

// Actions - Execute operations on external services
await api.Stripe.Payment.create({
  amount: 9999,
  currency: 'usd',
  customer: 'cus_123'
})

// Triggers - React to external events
on.Stripe.Payment.succeeded(async payment => {
  await api.Slack.Message.send({
    channel: '#sales',
    text: `Payment received: $${payment.amount / 100}`
  })
})

// Unified Nouns - Work across providers
await api.Customer.create({
  email: '[email protected]',
  name: 'John Doe',
  provider: 'stripe'  // or 'salesforce', 'hubspot'
})

Core Concepts

Nouns - Unified Abstractions

Work with unified business concepts (Customer, Order, Payment, Email) that work across multiple providers.

// Same API, different providers
await api.Customer.create({ ...data, provider: 'stripe' })
await api.Customer.create({ ...data, provider: 'salesforce' })
await api.Customer.create({ ...data, provider: 'hubspot' })

Benefits:

  • Provider-independent code
  • Switch providers without refactoring
  • Multi-provider workflows
  • Type-safe abstractions

Learn more about Nouns →

Actions - Mutations & Effects

Execute operations that create, update, or delete data on external services.

// Create resources
await api.Stripe.Customer.create({ email, name })
await api.Github.Issue.create({ owner, repo, title, body })
await api.Shopify.Product.create({ title, price, inventory })

// Update resources
await api.Salesforce.Lead.update({ leadId, status: 'qualified' })

// Delete resources
await api.Stripe.Customer.delete({ customerId })

Learn more about Actions →

Searches - Read Operations

Query and retrieve data from external services without mutations.

// Search for resources
const customers = await api.Stripe.Customer.search({ email: '[email protected]' })
const issues = await api.Github.Issue.list({ owner, repo, state: 'open' })
const products = await api.Shopify.Product.search({ title: 'widget' })

// Get specific resources
const customer = await api.Stripe.Customer.get({ customerId: 'cus_123' })
const pr = await api.Github.PullRequest.get({ owner, repo, pullNumber: 42 })

Learn more about Searches →

Triggers - Event Callbacks

React to events from external services using on for event subscriptions.

// Payment events
on.Stripe.Payment.succeeded(async payment => {
  await send.Order.fulfill({ orderId: payment.metadata.orderId })
})

// GitHub events
on.Github.PullRequest.opened(async pr => {
  await api.Slack.Message.send({
    channel: '#dev',
    text: `New PR: ${pr.title}`
  })
})

// Shopify events
on.Shopify.Order.created(async order => {
  await api.Email.send({
    to: order.customer.email,
    template: 'order-confirmation'
  })
})

Learn more about Triggers →

Providers - Service-Specific Details

Access provider-specific features and capabilities when needed.

// Stripe-specific subscription management
await api.Stripe.Subscription.create({
  customer: 'cus_123',
  items: [{ price: 'price_123' }],
  trial_days: 14
})

// GitHub-specific repository management
await api.Github.Repository.create({
  name: 'my-repo',
  private: true,
  auto_init: true
})

// Shopify-specific inventory management
await api.Shopify.Inventory.update({
  productId: '123',
  locationId: '456',
  quantity: 100
})

Learn more about Providers →

Architecture Patterns

api vs on

api - For searches (reads) and actions (mutations/effects):

// Searches - Query data
const customers = await api.Customer.search({ email: '[email protected]' })
const orders = await api.Order.list({ customerId: 'cus_123' })

// Actions - Create/update/delete
await api.Customer.create({ email, name })
await api.Order.update({ orderId, status: 'shipped' })
await api.Payment.refund({ paymentId, amount })

on - For triggers (event subscriptions and callbacks):

// React to external events
on.Customer.created(async customer => {
  console.log('New customer:', customer.email)
})

on.Payment.succeeded(async payment => {
  await send.Order.fulfill({ orderId: payment.orderId })
})

on.Order.shipped(async order => {
  await api.Email.send({
    to: order.customer.email,
    template: 'shipping-confirmation'
  })
})

Unified vs Provider-Specific

Unified Nouns - Provider-agnostic business concepts:

// Works with ANY payment provider (Stripe, PayPal, Square)
await api.Payment.create({
  amount: 9999,
  currency: 'usd',
  customer: 'cus_123',
  provider: 'stripe'  // Configurable
})

// Same event from ANY provider
on.Payment.succeeded(async payment => {
  // Works whether from Stripe, PayPal, or Square
  await processPayment(payment)
})

Provider-Specific - Access unique features:

// Stripe-specific: subscription trials
await api.Stripe.Subscription.create({
  customer: 'cus_123',
  items: [{ price: 'price_123' }],
  trial_days: 14  // Stripe-specific
})

// GitHub-specific: pull request merging
await api.Github.PullRequest.merge({
  owner: 'acme',
  repo: 'platform',
  pullNumber: 42,
  merge_method: 'squash'  // GitHub-specific
})

Integration Categories

Payment & Finance

Communication

CRM & Sales

E-commerce

Development Tools

Cloud & Infrastructure

Example Workflows

Multi-Provider Checkout

import { api, on } from 'sdk.do'

async function checkout(cart, config) {
  // Create customer (works with any CRM)
  const customer = await api.Customer.create({
    email: cart.email,
    name: cart.name,
    provider: config.crmProvider  // 'salesforce' | 'hubspot' | 'stripe'
  })

  // Process payment (works with any payment provider)
  const payment = await api.Payment.create({
    amount: cart.total,
    currency: 'usd',
    customer: customer.id,
    provider: config.paymentProvider  // 'stripe' | 'paypal' | 'square'
  })

  // Create order (works with any e-commerce platform)
  const order = await api.Order.create({
    customerId: customer.id,
    items: cart.items,
    total: cart.total,
    provider: config.commerceProvider  // 'shopify' | 'woocommerce'
  })

  // Send confirmation (works with any email provider)
  await api.Email.send({
    to: customer.email,
    template: 'order-confirmation',
    data: { order, payment },
    provider: config.emailProvider  // 'sendgrid' | 'mailchimp' | 'ses'
  })

  return { customer, payment, order }
}

// Listen for payment success from ANY provider
on.Payment.succeeded(async payment => {
  await send.Order.fulfill({ orderId: payment.orderId })
})

GitHub to Slack Automation

// React to GitHub pull requests
on.Github.PullRequest.opened(async pr => {
  // Notify team in Slack
  await api.Slack.Message.send({
    channel: '#dev',
    text: `🔔 New PR: ${pr.title}`,
    attachments: [{
      title: pr.title,
      title_link: pr.html_url,
      author_name: pr.user.login,
      text: pr.body,
      color: '#36a64f'
    }]
  })
})

// React to PR merges
on.Github.PullRequest.merged(async pr => {
  await api.Slack.Message.send({
    channel: '#dev',
    text: `✅ Merged: ${pr.title} by ${pr.merged_by.login}`
  })
})

E-commerce Order Processing

// Listen to orders from any e-commerce platform
on.Order.created(async order => {
  // Process payment
  const payment = await api.Payment.create({
    amount: order.total,
    currency: 'usd',
    customer: order.customerId,
    provider: 'stripe'
  })

  // Send confirmation email
  await api.Email.send({
    to: order.customer.email,
    template: 'order-confirmation',
    data: { order },
    provider: 'sendgrid'
  })

  // Track in CRM
  await api.Customer.update({
    customerId: order.customerId,
    lastOrderDate: new Date(),
    totalSpent: order.total,
    provider: 'salesforce'
  })

  // Notify team
  await api.Slack.Message.send({
    channel: '#sales',
    text: `💰 New order: $${order.total} from ${order.customer.email}`
  })
})
  • Nouns - Unified business abstractions
  • Actions - Mutations and effects
  • Searches - Read operations
  • Triggers - Event callbacks
  • Providers - Provider-specific details
  • api - API SDK reference
  • on - Event subscription reference