[SOLVED!] Bulk Loading Option Sets

If you’re looking to load a large number of option sets with additional attributes, you’ll find @arturio’s Chrome plugin works great, and I 100% recommend it if you only have text ot numerical attributes.

Looking for an alternate solution to help load other types of attributes (in my case nested option sets) I’ve turned to automation and been able to successfully load complex option sets with Browserflow Chrome plugin.

It’s not as straightforward as @arturio’s solution, but with a bit of work, you can save yourself a lot of time loading complex option sets.

Here’s how to do it:

  1. Imagine you have an option set “Shapes” with an embeded option set “Colours”
  2. First set up your “Colours” option set as you normally would, and create a new option set called “Shapes” with an attribute called “Colour” that references the “Colours” option set.
  3. Set up a simple table in Google Sheets with your complex option set, including an additional Modify Text field with the expression =LOWER(REGEXREPLACE(A2, "\s", "_")) which will convert spaces to underscores and change everything to lowercase - this is used to find the “modify attributes” button when adding attributes - it’s worth noting that other changes may also happen here (e.g. ‘&’ becomes ‘_’ and the text may be appended with a numeral), so it’s always good to inspect the HTML to be sure)
    image
  4. Follow this useful tutorial to get an idea of how to set up your flow Tutorial: Data Entry - Browserflow
  5. Connect your spreadsheet (Loop Spreadsheet Rows) and set up your fields as follows:
  6. Set up your remaining steps as follows - of course, if you are using different attribute types, you’ll need to change what’s here, but note carefully that you have to be a little clever with your HTML selectors, to ensure you click the right fields, so play around and test first.

To understand what each step in my flows is doing:

  • Loop Spreadsheet Rows - this is telling Browserflow to loop line by line through the spreadsheet and note the values in each column
  • Click - Click in the New Option field in Bubble
  • Type Text - Enter the display field for the option set (from the spreadsheet)
  • Click - Click Create
  • Click - Click the appropriate Modify Attribute field (from the Modify Text value)
  • Click - Click the “Colour” attribute dropdown
  • Click - Click the option that contains the appropriate colour from out spreadsheet
  • Click - Click Save
  • End - End the loop and go to the next line in the spreadsheet

To run, navigate to your new option set (in this case “Shapes”) and run your new automation

I hope that helps!

1 Like

A better and more useful formula to find the modify button (Step 3): =LOWER(REGEXREPLACE(A2, "[^a-zA-Z0-9]", "_"))

This is great, thanks for recommending. I’m using it, but figuring out how to select the proper “modify attributes” button is a challenge.

I’ve had no issues with the above formula in Google Sheets - it has worked without fail every time.

If you change the name of your option after creating it, it will retain the original link. e.g. if your option is My Optyon the modify link will be my_optyon if you then correct this to My Option the link will still be my_optyon

Here’s a selector that works reliably for selecting the modify attributes button. It accounts for the numbers that bubble appends to items you’ve already added before.

div[key^=“$modify”] .modify-attr-btn

1 Like