How to Set up a Custom Configuration Flow?

Learn how to create a custom file picker inside a configuration flow, set file type restrictions, and dynamically map selected files or folders to your widget fields.

Configuration flows in Fastn allow you to define variables, map values, and build reusable configurations that can be used in widgets or other flows.

1. Create a Configuration Flow

  • Go to the Widgets section in Fastn.

  • Click the arrow next to the Add Widget button (top-right corner).

  • Select Add Configuration Flow.

  • Enter a name for your configuration flow and click Build.

This creates a configuration flow where you can add steps such as data mapping and field selectors.

2. Add a Data Mapping Step

  • Inside the flow, add a Data Mapping Step.

The Data Mapper defines the variables and parameters that will be dynamically passed into your target app or flow.

  • Click the three dots on this step to access options:

    • Advanced Action

    • Add Parent Key

    • Set Default Value

    • Options

The Options setting lets you configure fields that support labels, selectors, and values.

  • Configure the following sections:

General Section

Define how this field behaves and appears in the configuration pop-up:

  • Label – Sets the display name in the widget UI.

  • Disable this field – Prevents user edits.

  • Mark as new ID field – Assigns a unique identifier for the configuration.

  • Hide this field in configuration pop-up – Keeps advanced fields hidden from the user.

  • Conditionally hide this field – Hide based on the value of another field (useful for dependent selections).

Selections Section

This is where you make the configuration dynamic:

3. Configure Custom Selector

  • In the Options section, choose the Custom Selector type.

  • Select a file picker:

    • Google Drive File Picker

    • Dropbox File Picker

    • Microsoft OneDrive File Picker

Using Custom Flow for Advanced File Picker

If you want to create a file picker with a more flexible and dynamic interface, use a Custom Configuration Flow as your Selection Type.

With Custom Configuration Flows, you can design any kind of configuration flow, adding your own fields, layouts, and UI elements. This makes it ideal for cases where you need more control over the interface and logic than standard dropdown selectors can provide.

In this case, we’re using a Custom Flow to build a File Picker, because the UI is more customizable and allows you to define the exact structure and behavior you need. You can add any fields, apply your own design, and adjust the flow dynamically to fit your use case.

4. Add File Type Restrictions

  • After choosing your file picker, click the File Types (+) icon.

  • Add file types (e.g., .csv, .xlsx, .pdf, .jpg).

  • Save your settings.

This ensures the widget will only accept the file types you’ve defined.

5. Map Output to a Field

If you have a widget field (e.g., files), map the file picker output to it. The selected files will be stored in this field, and the restrictions will enforce allowed file types.

Result: The widget can now collect files from users while respecting the restrictions you set.

Last updated

Was this helpful?