Custom Connectors Overview
Overview
Prismatic is extensible and allows for developer users to develop their own custom connectors. Connectors that Prismatic users develop are proprietary to their organization, and are private.
Connectors are NodeJS/TypeScript projects that accomplish specific tasks or connect to an outside service. Connectors are comprised of:
- Connections which contain things like passwords, API keys or OAuth 2.0 connection information. Your customers fill in their authentication information for connections when they deploy your integration.
- Actions which are purpose-built functions that you can use in your integration. You might build "Create Widget" or "List Gadgets" actions in a custom connector, and each action can be used as a step within an integration.
- Triggers determine when an integration should run, and how it should handle requests. You might create a custom trigger that configures webhooks in a third-party app when a customer configures an instance of your integration, and responds to webhook requests from the third-party appropriately.
- Data Sources fetch data dynamically during the config wizard experience. For example, you might create a data source that fetches a list of projects in a CMS, and presents the projects as a dropdown menu in the config wizard.
Sample connector code is referenced throughout these docs.
For a sample connector that wraps an HTTP-based API, see our quickstart on Wrapping an API in a Custom Connector.
Custom connector library
Prismatic provides a NodeJS package, @prismatic-io/spectral, which provides TypeScript typing and some utility functions. Source code for Spectral is available on github.
NodeJS Version Support: While many versions of NodeJS may work for connector development, we recommend using the latest LTS (long-term support) version of NodeJS. You can find the latest LTS version on the NodeJS download page.
The terms connector and component are used interchangeably in the Prismatic platform. Generally, if a component connects to a third-party API, we call it a connector. But, not all components connect to external APIs. The Change Data Format component, for example, converts data between common formats (JSON, XML, etc), and the Math component provides a variety of math utility functions, but neither component makes a network request to a third-party app.