11-27-2025 06:08 PM
Part of my workflow involves claiming an MX into a network.
I create a list of all suitable MX in inventory, and let the user choose one using "Create Prompt". At this point, I now have a string which is the serial number of the MX I want to add to the network.
I would now like to use the atomic "Meraki - Claim Network Devices". However, it requires an *array* of strings.
I can't figure out how to add a string to an array, or how to convert a string to an array.
I've tried creating a local variable which is an array of strings - but I can't find any operations that let me append to that array.
Help!
11-28-2025 01:25 AM
I can think of three options.
You can try adding the "Create Array" action before calling "Meraki - Claim Network Devices," just put your string variable in square brackets.
Try using "Compose with json()" or try using the "Add to array variable" action to add your string.
11-30-2025 09:49 AM
I don't see any action to create an array?
>just put your string variable in square brackets.
Once I select a variable, it won't let me edit the field anymore to add brackets.
I can't see any actions like "Compose with JSON".
I ended up creating a one-line "Create With Python" script action like:
output = ["variable"]
It kinda seems wrong to drop back to coding when everything else is GUI point and click based.
12-01-2025 09:25 AM
@Philip D'Ath
In the Set Variables activity, you can combine free form text and other variables to create an array:
12-01-2025 09:22 AM
@Philip D'Ath We're working on enhancements for Arrays. Currently, you can use a standard string to capture data, and you can append a string using a Set Variables Activity by selecting the string as the Variable to update and then select the same string as the New value along with the new string to append.
You can also assign a sting into a String Array, but you may need to format the String Array so that it is proper JSON, To do this I've used a Python Activity to clean up and properly format the JSON Array.
12-01-2025 09:50 AM
Good tip! I might try this out next time.
12-01-2025 09:27 AM
I'd also suggest checking out and posting questions in the Cisco Workflows Community
12-01-2025 09:50 AM
I find the Cisco Community hard to use. It's like drowning in a sea of content.
12-01-2025 11:39 AM
CC: @AmyReyes
12-01-2025 11:48 AM
Here is an example challenge. Pretend you have not used Cisco Community before. Starting from the home page, tell me how long it takes you to find the "Cisco Workflows" community.
https://community.cisco.com/
I have used the Cisco Community. I couldn't find it. I gave up.
12-01-2025 12:54 PM
@Philip D'Ath instead of Arrays, you may want to consider using Table Activities in Workflows. You can Read your table from JSON, and then add or update rows.
Do keep in mind Persist Table. If you want to make changes to a table later, it must be made persistent. Otherwise, you will only be able to read from the table.
Recommend that you manually add columns individually in the Columns to Read section of the Table activity properties.
If you populate column headers from their source data the columns will only be populated at run time and you cannot use the column headers when creating a For Each loop.
12-01-2025 01:12 PM
Thanks for the tip. 🙂
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide