Lightyear Docs

Integrations

What is an integration?

An integration connects your product with another app, like Salesforce or Google Sheets, allowing communication with user data.

  • Purpose: Enable your product to interact with data in other apps.
  • Current Focus: Primarily syncing data, such as importing contacts from HubSpot or sending invoices to QuickBooks.
  • Future Features: Plans to support richer interactions beyond data syncing.

Multiple integrations with the same app

  • Flexibility: Create multiple integrations for a single app.
  • Why?: Large apps like HubSpot offer diverse features, allowing distinct integrations for different workflows (e.g., one for syncing contacts, another for tickets).
  • Real-World Practice: Typically, there's a 1:1 relationship between an integration and an app, but flexibility exists for complex use cases.

Defining a sync integration

import { defineSyncIntegration } from "@runlightyear/lightyear";
 
defineSyncIntegration({
  name: "todoApp",
  title: "Todo App",
  customApp: "todoApp",
  collection: "taskManagement",
  frequency: {
    incremental: 1, // every minute
    full: 60 * 24, // every day
  },
});

On this page