I’ve written a plugin that builds an array of URLs based on input provided to the plugin, whose last lines of code are:
instance.publishState(“array_of_urls”, urlArray)
instance.triggerEvent(“array_of_urls_is_returned”)
The purpose of the plugin is to allow users to upload and import a CSV file without having to re-edit it. They create a CSV file, they upload it, they identify which CSV file column heading identifies the URL, then they select Import.
Within the plugin, the Exposed state “array_of_urls” is identified as a text list.
Within the workflow where the plugin is used, I then write the array/list to the console.log using the plugin “Write to console”. It looks good.
As you can see, this plugin then triggers a new Workflow Event.
So, as the first action in that workflow event, I write the array/list to the console.log using the plugin “Write to console”. It looks the same. Still good.
The next action in that workflow is “Schedule an API Workflow on a list”.
To create the action “Schedule an API Workflow on a list” I have to specify “Type of things”, and “List to run on”.
And that is where I run into this obstacle.
I can’t find a combination of “Types of things”, and “List to run on” that work together.
The goal is to create DB records, one per URL, in a thing named “UrlProcessingQueue”, so I put that in “Types of things”.
The “List to run on” is, of course, the text list containing the URLs, but I’m not able to enter it. When I enter “The CSVImport’s array of URLs”, that is not a complete expression. I’m required to provide more, but none of the selections I can provide at this point make sense.
The message I’m seeing is: “Schedule API Workflow on a list: List to run on should be List of UrlProcessingQueries but right now it is a List of texts”.
Has anyone figured out how to pass a Javascript array to an API Workflow as a list?