Enable input & select variables in dataset

When a variable is created in the run-script command with Agent AI and used in the dataset. The UI doesn’t show the variable because it’s not created by a native command. The workflow still works, and it’s saved in the Json, but it’s not showing in the UI, can only be modified with the ai.

Can you give us the possibility to input or select a variable?

Thank you

Thank you for reporting this. To help us implement the best solution could you please provide the list of commands you are using in the Web Automation tab when this happens?

This will help us ensure the manual input or selection option works perfectly for your use case.

Here is the explanation of a use case:

Architecture Choice Explanation: Using run_script for Comment Extraction (comments_text)

Context

For the AI to analyze a Facebook post, it needs the post text (description) but also the comments from other users to understand the contest mechanics (e.g., “answer the question”, “tag 3 friends”). We therefore needed to extract all visible comments from the Facebook popup and send them to the OpenRouter API in the HTTP request body (user prompt).

Issues Encountered with Native extract_data Commands

1. Multi-element Extraction vs. Simple Variable (Concatenation)

The native extract_data command is designed to iterate over a list of elements (via item_selector) and create one data row (dataset entry) for each element.
However, we did not need a dataset of comments. We needed to concatenate all comments into a single string (variable comments_text), separated by a custom delimiter (\n---\n), to inject it directly into the JSON body of our HTTP request (http_request).

The extract_data command does not allow concatenating multiple DOM results into a single string variable with a custom separator. It stores results in an array or dataset, which is then very complex to convert into a simple string to interpolate into a JSON variable.

2. Dynamic DOM Filtering

Facebook comments are loaded dynamically and their HTML structure is highly nested (spans inside divs inside articles). Sometimes, stray text such as “Loading…” or “See more comments” buttons end up in the selectors.
With extract_data, it is difficult to apply a complex filter (e.g., if (t && !t.includes('Loading'))) on the fly during extraction to clean up the text.

Workaround: The extract-clean-comments Script

To solve these problems, we replaced the native extraction with a run_script command named extract-clean-comments.

This script:

  1. Uses page.evaluate() to execute code directly within the Facebook page context.
  2. Targets the open dialog container (div[role='dialog']).
  3. Selects all comment spans with a precise selector (div[role='article'] span:has(div[style='text-align: start;'])).
  4. Filters the text to ignore loading states (!t.includes('Chargement')).
  5. Joins all valid texts into a single string with our custom delimiter (\n---\n).
  6. Stores the final result directly in a simple state variable (state.variables.comments_text = comments).

This comments_text variable can then be used very easily and without formatting risk in the body parameter of our http_request command.

Suggested Improvements for RTILA X

  1. Add a “Concatenate” option in extract_data: It would be very useful to be able to extract a list of elements and store them in a single text-type variable (string) with a chosen separator, instead of systematically creating dataset rows. (e.g., an option output_type: "concatenated_string" and separator: "\n---\n").
  2. Allow script-based filtering during extraction: Add a pre-filtering option in the extract_data properties to exclude text based on a regex or keyword (e.g., exclude_text: ["Loading", "See more"]).
{
                  "command": "run_script",
                  "name": "extract-clean-comments",
                  "params": {
                    "script": "export default async function(page, context, state, helpers) {\n  const comments = await page.evaluate(() => {\n    const dialog = document.querySelector(\"div[role='dialog'][aria-labelledby]\");\n    if (!dialog) return 'Aucun commentaire';\n    const spans = dialog.querySelectorAll(\"div[role='article'] span:has(div[style='text-align: start;'])\");\n    const list = [];\n    spans.forEach(el => {\n      const t = el.innerText.trim();\n      if (t && !t.includes('Chargement')) list.push(t);\n    });\n    return list.length > 0 ? list.join('\\n---\\n') : 'Aucun commentaire';\n  });\n  state.variables.comments_text = comments;\n  return { success: true };\n}"
                  },
                  "then": []
                },```