How to Use File Pickers in Configuration Flows?

Learn how to add file pickers to configuration flows, set file type restrictions, and map their output to 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.

  • 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.

3. Configure File Picker Selector

  • In the Options section, choose the Selector type.

  • Select a file picker:

    • Google Drive File Picker

    • Dropbox File Picker

    • Microsoft OneDrive File Picker

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?