> For the complete documentation index, see [llms.txt](https://docs.rewst.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rewst.help/rewst-documentation/documentation/automations/workflows-in-rewst/option-generator-workflows.md).

# Option generator workflows

{% hint style="info" %}
Were you a Rewst Classic user? The new way to set up and use option generator workflows in the platform is to ask the Rewst Agent to do the work for you. The below information and steps will help you understand what they are and why to use them, essential knowledge for talking to the Rewst Agent.
{% endhint %}

An *option generator workflow* is a workflow whose only job is to produce the list of choices that appear in a form field's drop-down instead of you hard-coding a static list. Think of a form field like "Which company?" You could type all your companies in by hand, but then you have to edit the form every time a company is added or renamed. Instead, you point that drop-down at a workflow. When someone opens the form, Rewst quietly runs that workflow, it goes and asks your PSA "give me the list of companies," and the answer becomes the drop-down list. Always current, no manual upkeep needed.&#x20;

An options workflow must use the [Request Options trigger](/rewst-documentation/documentation/automations/nodes/nodes-triggers.md#request-options). If you build it with a form or manual trigger, the drop-down won't be able to use it.

## Create an option generator workflow

#### Part 1: Build the workflow

1. Navigate to to **Automations > Workflows** in the left side menu of your Rewst platform and create a new workflow. Name it something obvious like `Options - Companies` .
2. Drag and add the [**Request Options** trigger](/rewst-documentation/documentation/automations/nodes/nodes-triggers.md#request-options) to the Workflow Builder Canvas as the starting node.
3. Connect one action node that fetches the list you want — for example, a list companies action from your PSA integration, or list users from Microsoft.
4. Publish the workflow. Note that a workflow that has never been published falls back to its latest draft. Once a version is published, later unpublished edits are ignored.&#x20;

#### Part 2: Point your form field at the workflow

1. Open your form and click the drop-down field you want to populate.
2. In the field's settings, find the **Options** area and switch the source from a manual/static list to **Workflow**.
3. Pick the workflow you just published.
4. Now, tell Rewst which piece of each record to use.&#x20;

   * **Value:** the hidden bit the automation actually uses. This is usually `id`.
   * **Label:** the friendly bit the human sees. This is usually `name` or `displayName`.

   When a company record comes back as `id: 19297, name: "Pedro Aviary"` , the user sees `Pedro Aviary`, and your workflow receives `19297`.
5. Use the field's preview to confirm that real names appear, then publish the form.

{% hint style="info" %}
Helpful hints

* Empty doesn't always mean something is broken. If the workflow runs fine but the list is empty, it usually means there genuinely aren't matching records, not that you wired it wrong.
* Long lists are paged. Rewst won't dump 5,000 records at once. Instead, it loads more as the user searches or scrolls.
  {% endhint %}

## What is a dependent drop-down?

The most common follow-up to a simple option generator workflow is to ask the Agent to "Pick a company, then only show contacts at that company." Setting this up is the same idea as a basic option generator workflow, with one addition. The second workflow accepts an **i**npu&#x74;**,** like `companyId`, and on the form you bind the first drop-down's answer into that input. When someone changes the company, the contacts list re-runs and refreshes itself.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rewst.help/rewst-documentation/documentation/automations/workflows-in-rewst/option-generator-workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
