Skip to main content

What actually is a Glue?

A Glue is a single TypeScript file that can respond to external events and take actions. We run your Glue code using Deno both locally and in the cloud.

The nouns

Glues: represents a single script you write that can respond to external events and take actions Deployments: represents a deployed version of your Glue code. There is only ever one live deployment for a Glue. Triggers: configuration for events you want to listen to for a particular external service. For example, if you want to listen for Stripe payment failures, you’ll create a trigger for the onStripePaymentFailed event. Triggers are specified completely in your code as well as the handling code. CredentialFetchers: give you credentials to an account you’ve authenticated with. This is typically used to when you use a client library that requires credentials. For example, if one of the actions you want to take when you is to send a slack message, you’ll interact with Slack using the standard Slack client library which requires credentials. Accounts: credentials Glue will store for services you use in your Glues. An account can be used by multiple Glues. It has a selector (email address, account id, etc.), optional scopes and the actual credentials. For OAuth based accounts, Glue will handle refreshing your access tokens. Executions: represents a single run of your Glue. The input data and any logging your Glue does is stored for later viewing. If your Glue throws an error, the execution is considered Failed.

How your Glue runs

Glue handles all the plumbing of setting up webhooks, delivering events, recording executions, logging data, versioning, and scaling compute to run your code. Your code is responsible for the business logic and that’s it. In order to do this, Glue acts as in intermediary between your code and the external services you want to interact with. You tell Glue what events you want to listen to and how you want to handle them. Glue will then set up webhooks for you and run your code when those events happen.