Passing Python List into Workflow

I am creating a List of Lists of Strings in Python. The child lists contain names, addresses. Using the Get Python Object activity, how would I use these lists in the workflow. What .NET datatype should I use? I tried using
image but that didn’t work. Any help would be appreciated.

Hi @chris.shanor,

Welcome to the community!

In my previous tests, handling return values from one programming language to another ( in this case python to .net ) is always cumbersome. Therefore, I suggest you change the return value to a json string. Here is a post where I given an example.

In short :

import json

def YourFunction():
     YourList = [1, 2, 3]
     return json.dumps(YourList)

Call you YourFunction in UiPath. Desearlize the json string to access the Jsonarray.

1 Like

Thank you @jeevith , this solution worked perfectly!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.