For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installing custom scripts

Introduction

Creating a script is a two-stage process:

  1. Tell us about your script — set the basics: name, type, language and runtime.

  2. Build & test — write the script (manually or with AI), and test it with your own sample inputs.

When you're happy with a script, it's ready to be deployed and used in process flows and connectors.

Need to know

  • The maximum memory size for a custom script is 512MB.

  • The maximum size of a custom script is 4GB.

  • Script names must be unique — you can't add two scripts with the same name.

  • A script can hold up to 10 versions. Once the limit is reached, you must delete old versions before new ones can be added.

  • Saving and deploying are separate actions — you can save versions of a script as often as you like without affecting anything that's live.

Creating a new script

Follow the steps below:

Step 1 Log in to the Patchworks dashboard and select Process Flows from the left-hand navigation menu, followed by Scripts.

Step 2 Choose to create a new script — the tell us about your script page is displayed:

Step 3 Complete the fields summarised below:

Field
Summary

Name

A unique name for your script.

Description

A short summary of what the script does — shown in the script library.

Script type

The type of script you're building: General, Pre-auth, Post-auth, Pre-request, Post-request or Pagination. The type sets the starter template and the inputs the script is written against — so you start from a shape that matches the job. It's a guide, not a restriction: it doesn't limit where the script can be attached later.

Language

Your preferred coding language — see supported languages.

Runtime version

The runtime that the script runs on — for example, Node 24 for JavaScript.

Step 4 Click next — your script is created with a starter template for the chosen type, and the build & test page is displayed.

Building & testing your script

From the build & test page, you can work however suits you best — the pages below walk through each approach:

Once you're happy with your script, see Deploying scripts & managing versions to release it.

Last updated

Was this helpful?