How do I create a custom workflow library?

Note: This is a beta feature.  

Sometimes it's useful to create a custom workflow library that can be called by your workflow.  This is useful if you want to store common functions or variables.

Here's how you can create and use a custom workflow library.

Step 1: Log In Your Medium One platform account

Step 2: Create A Custom Workflow Library

Navigate to this URL directly:

Click on Create New Library


Create a library:

- Set library name to Env

- Create function getVar() using example below and click Save

def getVar(var):
if var == "env":
return "staging"


You should see the new library like so:



Step 3: Call Workflow Library from a Workflow

Refer to the following example to call the workflow library. 

from my import Env
log(Env.getVar("env")) # print out value from Env.getVar("env")