Execute code with the Python Tool

Use the Python Tool to execute custom python code in V7 Go projects and add automation without consuming tokens.

Set up a code property

  1. Add a new property and set the Tool to Python Tool
  1. Configure the property type. In other words, set output format for your python snippet. The available options for this are: Text, JSON, Single Select, Multiple Select, and User.

  2. Add a python snippet to the prompt field and use @ to open up the list of properties that can be used as input variables.

Python Tool tips & tricks

  • Use the variable result = rather than print to output results in JSON, Single Select, Multiple Select, and User type properties. Single Select, Multiple Select, and User outputs can be formatted as lists. For example, if I had three single select options (”High,” “Medium,” and “Low”), I’d format my snippet to include: result = ["High", "Medium", "Low"]
  • The Python Tool includes all of the standard python libraries, as well as:
    • numpy
    • pandas
    • beautifulsoup4
  • When using the Text property type, results are output as text rather than integers, so when working with numbers it will be necessary to convert them to integers (for example result = int(@example) ) in order to perform numerical operations.