Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/manusapis/Agix/llms.txt

Use this file to discover all available pages before exploring further.

Beyond Stripe and SQL, Agix ships five connectors for the most common CRM, analytics, and productivity platforms. Each connector follows the same IConnector interface — authenticate once with connect(), then call sync() with a resource name to write rows into the active sheet. This uniform pattern means the skills you learn for one connector transfer directly to every other.

Common connector pattern

All five connectors on this page extend BaseConnector and are instantiated through the same factory function:
import { createConnector, getSupportedConnectors } from "@/services/connectors/connector.factory";

// Retrieve the full list of registered connector types
const types = getSupportedConnectors();
// ["stripe", "salesforce", "hubspot", "google-analytics", "notion", "airtable", "sql"]

// Instantiate any connector by its ConnectorType identifier
const salesforce = createConnector("salesforce");
const hubspot    = createConnector("hubspot");
const ga         = createConnector("google-analytics");
const notion     = createConnector("notion");
const airtable   = createConnector("airtable");
Once instantiated, every connector exposes the same lifecycle:
// 1. Authenticate
await connector.connect({
  type: "salesforce",       // replace with the relevant ConnectorType
  name: "Production Org",
  credentials: { /* service-specific keys */ },
  enabled: true,
});

// 2. Sync a resource into the active sheet
const result = await connector.sync({
  connector: "salesforce",
  resource: "Opportunity", // object name, table, report ID, or database ID
});

console.log(result.rowsInserted, result.rowsUpdated, result.syncedAt);

// 3. Disconnect when finished
await connector.disconnect();

Connector reference

SalesforceConnector pulls records from your Salesforce org. Set ConnectorType to "salesforce". Use sync() with resource set to a Salesforce object name (e.g. "Opportunity", "Lead", "Account", "Case") to load that object’s records into the sheet.Common use cases:
  • Load open opportunities into a sheet and ask Agix to rank them by close probability.
  • Pull the Lead object and analyse conversion rates by source, region, or sales rep.
  • Sync Account records to build an account-health dashboard that updates on a schedule.
ConnectorType identifier: "salesforce"
import { createConnector } from "@/services/connectors/connector.factory";
import type { ConnectorConfig, SyncRequest } from "@/types/connector.types";

const connector = createConnector("salesforce");

const config: ConnectorConfig = {
  type: "salesforce",
  name: "Sales Org",
  credentials: {
    instanceUrl: "https://yourorg.my.salesforce.com",
    accessToken: "...",
  },
  enabled: true,
};

await connector.connect(config);

const request: SyncRequest = {
  connector: "salesforce",
  resource: "Opportunity",
  since: "2024-01-01T00:00:00Z", // optional: incremental sync
};

const result = await connector.sync(request);
// result.rowsInserted + result.rowsUpdated = total opportunity records synced
The optional since field on SyncRequest lets you perform incremental syncs — only records modified after the supplied ISO timestamp are pulled, keeping sheet updates fast even for large orgs.

getSupportedConnectors()

To enumerate every registered connector type at runtime — for example when building a dynamic connector-selection UI or validating user input — call getSupportedConnectors() from the factory:
import { getSupportedConnectors } from "@/services/connectors/connector.factory";

const types = getSupportedConnectors();
// ["stripe", "salesforce", "hubspot", "google-analytics", "notion", "airtable", "sql"]
The returned array reflects the live registry map, so any connector added to connector.factory.ts will automatically appear here without further changes.

Build docs developers (and LLMs) love