When using for loop actions in Agent.ai, you might run into issues if you’re working with multi-select dropdowns. The problem usually comes down to format: for loop expects a very specific type of input, and the raw output from a multi-dropdown list might not be an exact match.This guide walks you through how to inspect your input, transform it using a built-in LLM, and successfully run a loop with multi-dropdown values.
To verify this, add a Create Output action immediately after your multi-dropdown input and display the variable. This lets you confirm the exact format before using it in a loop.
To convert this into a usable format, insert an LLMaction before the the loop action. Use a prompt that extracts only the value fields and returns a plain list of strings.
Once the LLM returns the cleaned-up list, pass it into your for loop action. The loop should now work as expected.Have questions or need help with your agent? Reach out to our support team or community.