XENTOM

Getting started

1. Prerequisites

  • Make sure the third-party service you want to integrate has a publicly accessible API.
  • Create a Xentom account.
  • Download and install the Xentom CLI.

2. Create a new integration

Run the following command in your terminal to create a new integration:

xentom init

3. Configure authentication

If the external API is not publicly accessible, authentication must be set up first. There are several options for this, such as using OAuth2 or environment variables (API key).

3.1 OAuth2

If the external service supports OAuth2, you can use it as an authentication method. This allows you to authenticate more quickly in the Workflow Editor with all the necessary permissions.

import { createIntegration, auth } from "@xentom/integration";

export default createIntegration({
// ...

auth: auth.oauth2({
authorizationUrl: "https://example.com/oauth2/authorize
tokenUrl: "https://example.com/oauth2/token",
}),

// ...
});

3.2 Environment Variables

Environment variables allow you to pass user-specific values, like an API key, to the integration. This key can then be used for authentication with an external service.

import { createIntegration, env } from '@xentom/integration';

export default createIntegration({
// ...

env: {
API_KEY: env.string({
description: 'The API key for the external service.',
isSensitive: true,
}),
},

// ...
});

4. Configure triggers and actions

Once the authentication is set up, you can start configuring triggers and actions for your integration. Triggers are events that start a workflow, while actions are tasks that are executed as a result of a trigger.

To simplify the development of integrations, we've added useful helpers in our CLI tool. One of these is the command for creating actions and triggers.

xentom action add

5. Deploy your integration

After you have configured your integration, you can deploy it to the Xentom platform. This will make it available in the Workflow Editor, where you can use it to create automated workflows.

To build and deploy the integration, run the following commands:

xentom build
xentom publish

6. Share your integration

If you think your integration could be useful for others, you can share it in the Xentom Marketplace. This way, other users can benefit from your work and use your integration in their workflows.

7. Conclusion

Congratulations! You have successfully created your own integration for Xentom. Now you can start building automated workflows that help you optimize your work processes and save time.