How to Create Transformations

Add a new transformation in RudderStack.

This guide covers how to add a new transformation in the RudderStack dashboard.

To verify your transformation before you save a draft or publish it, see Test Transformations.

Required permissions

  • Admins have full access to create and manage transformations.
  • Members can have the following permissions depending on their workspace policy:
ResourcePermission
Description
TransformationsEditMake changes to the configuration of transformations
TransformationsConnectConnect a transformation to a destination
TransformationsCreate & DeleteCreate or delete transformations
To make a connection, that is, connect a transformation to a destination, the member must have both Edit and Connect permissions on both the resources.

Click here to see how these permissions appear in the workspace policy.

Permissions to manage transformations in RudderStack dashboard

Permissions for legacy RBAC system

In the legacy Permissions Management (RBAC) system:

  • Org Admins can create, edit, delete, and connect transformations to destinations
  • Members must have the Grant edit access permission in Transformations and Library toggled on to create, edit, delete, and manage transformations
  • Members with the Connections Admin or Connections Editor role in their workspace policy can only connect transformations to destinations
Transformations permissions in the legacy framework

Add new transformation

  1. Log in to the RudderStack dashboard.
  2. Go to Collect > Transformations and click Create Transformation.
  3. Name your transformation. It must contain at least 2 characters.
  4. In the Transformation window, select the language to write your transformation. RudderStack provides two options — JavaScript and Python 3.11.

Important considerations

  • RudderStack uses this Node.js version for JavaScript transformations and libraries.
  • Python transformations are available only in the RudderStack Growth and Enterprise plans.
  • JavaScript transformations run in an isolated environment — no Node.js modules (like fs, require) or browser APIs (like window, btoa) are available. Only standard JavaScript features are supported.
  1. Optional: Choose a transformation template that contains prefilled code for implementing specific use cases on your event data.
  2. Click Create to create the transformation — you will be automatically redirected to the Editor tab.
Create new transformation
  1. Add your transformation function. You can also add other functions and call them from within the transformEvent function.
Add transformation function
  1. Test your transformation to confirm it produces the output you expect.

Publish the transformation

After you add and test your transformation code:

  • Click Save draft to store unpublished changes without affecting production.
  • Click Publish to create a tagged version and make it Active.
You can publish a transformation without saving it as a draft first.
Save draft and Publish buttons for a transformation

Only a published Active transformation can be connected to a destination.

See Version and Deploy Transformations for more information on versioning and publishing a transformation.

See more


Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.