Upload multiple files to IQ Bot using Loop action

Automate uploading multiple files by inserting the Upload Document action into a Loop action.


Follow these steps to upload multiple documents:

  1. In the Actions palette, double-click or drag the Loop action from the Loop package.
  2. In the Loop Type field, select the Iterator option.
  3. In the Iterator field, select For each file in folder from the drop-down list.
  4. In the Folder path field, select the folder path.
  5. In the Assign file name and extension to this variable field, create or select a dictionary variable to store the names and extensions of the files in the selected folder path.
    For this example, we will use a dictionary variable named dictFile.
  6. In the Actions palette, double-click or drag the Upload Document action from the IQ Bot package.
  7. Complete the information, except the File Path field.
  8. In the File path field, enter a dynamic file path using a variable.
    1. Add a file path pointing to the folder, for example C:\input\.
    2. Add the dynamic file name string: $dictFile(name)$.$dictFile(extension)$.
    The name and extension keys are predefined. When inserted and run in a loop, the action iterates through the entire folder and calls all files in the folder one at a time. The File path value looks like this: C:\input\$dictFile(name)$.$dictFile(extension)$
  9. Click Save.

Next steps

To read results from variable, use the Message box action.