Skip to content

amp-labs/connectors

Repository files navigation



Add enterprise-grade integrations to your SaaS this week. Bi-directional and customer-configurable.

Ampersand Overview

Ampersand is a declarative platform for SaaS builders who are creating product integrations. It allow you to:

  • Read data from your customer’s SaaS
  • Write data to your customer’s SaaS
  • Coming soon: subscribe to events (creates, deletes, and field changes) in your customer’s SaaS

Ampersand Connectors

This is a Go library that makes it easier to make API calls to SaaS products such as Salesforce and Hubspot. It handles constructing the correct API requests given desired objects and fields.

It can be either be used as a standalone library, or as a part of the Ampersand platform, which offers additional benefits such as:

  • Handling auth flows
  • Orchestration of scheduled reads, real-time writes, or bulk writes
  • Handling API quotas from SaaS APIs
  • A dashboard for observability and troubleshooting

Examples

See the examples directory for examples of how to use the library.

Provider Auth Connector Deep Connector AuthN Notes
Salesforce example example OAuth2 + Auth Code
Adobe example OAuth2 + Client Creds
Anthropic example API Key
Blueshift example Basic Auth

Supported connectors

Browse the catalog to see a list of all the connectors that Ampersand supports, and which features are supported for connector.

How to initialize a Connector

// Example for Salesforce
client, err := salesforce.NewConnector(
    salesforce.WithClient(context.Background(), http.DefaultClient, cfg, tok),
    salesforce.WithWorkspace(Workspace))

Auth connectors

Auth connectors allow you to proxy through requests to a SaaS provider via Ampersand.

Adding a new provider

To add a new basic connector that allows proxying through the ampersand platform, you need to add a new file to the providers package.

Initialization

Note: If your provider requires variables to be replaced in the catalog (providers.yaml), there is a defined list of options that will replace placeholders with actual values. Error message will indicate what options are missing.

For example, a provider may use {{.workspace}} in the base URL which needs to be replaced with an actual customer instance name. In that case, you would initialize the connector like this:

conn, err := connector.NewConnector(
    providers.SomeProvider,
    connector.WithClient(context.Background(), http.DefaultClient, cfg, tok),
    connector.WithWorkspace(Workspace), // {{.workspace}}
)

This will automatically replace workspace catalog variable with an actual value that you have specified in the option.

Releases

No releases published

Packages

No packages published

Languages