Skip to main content

Create a Transformer Library from a Repository

This guide walks through creating a Transformer Library whose code lives in an external Git repository (currently GitHub). Once connected, the file in the repository becomes the source of truth for the library, and the library is updated whenever the file changes — automatically when code is pushed, or on demand.

Who this is for

Integration engineers who want to manage reusable transformer code (helper functions, types, interfaces) in a Git repository instead of authoring it inline in the Studio editor.

Before you start

  • A repository is already connected on the Repositories page (see Repository Connections).
  • You have permission to edit Integration Flows configuration.
  • The repository contains the file you want to expose as a library (e.g. src/utils/helpers.ts).

Concept recap

TermMeaning
Repository-managed libraryA library whose code is owned by an external Git repository.
RepositoryThe connected Git repository that provides the code.
File pathThe location, inside the repository, of the file that backs the library.

Step-by-step

1. Open Library Modules

Navigate to Library Modules. The table lists every library and its latest version. The Add Module button (top right) starts the creation flow.

Library Modules list

2. Open the Create dialog

Select Add Module. The Create Library Module dialog opens with the source set to Manual.

Create dialog, manual source

3. Switch the source to "From Repository"

Select the From Repository option. This reveals two extra fields: the Repository selector and the File Path input.

note

The From Repository option is disabled when no repositories are connected — its label then reads From Repository (no repositories connected). Connect a repository first.

Create dialog, repository source selected

4. Pick a repository and the file path

  • Repository — choose one of your connected repositories.
  • Module Name — a friendly name. The Library Key is generated automatically and can be customised.
  • File Path — the path to the file inside the repository (e.g. src/utils/helpers.ts). The help icon explains the expected format.

Create dialog filled from repository

5. Confirm

The confirm button stays disabled until both a repository and a file path are provided (along with a valid name and key). On confirm, the library is created from the selected file and the dialog closes.

Keeping the library in sync

Once created, a repository-managed library is refreshed when the source file changes:

  • Automatically — when code is pushed to the repository, the library is updated and a new published version is created if the content changed. See Automatic synchronization.
  • Manually — use the Synchronize action in the library editor at any time. A new version is created only when the file has changed.

Validation rules

FieldRule
Module NameRequired. Must start with a letter and be unique.
Library KeyGenerated from the name; must be unique.
RepositoryRequired when the source is From Repository.
File PathRequired when the source is From Repository.

Troubleshooting

SymptomLikely causeFix
From Repository option is disabledNo repositories connectedConnect a repository on the Repositories page first.
Confirm button stays disabledMissing repository, file path, name, or a duplicate key/nameFill all required fields and make sure the name and key are unique.
Create failsInvalid file path or the file cannot be processedCheck the file path and branch, and make sure the file is valid.
Library not updating after a pushSource file unchanged, or the connection needs attentionOnly changed content creates a new version. Try a manual sync and check the repository connection.