Update Tags in Notion with multiple results from a Text Parser

My specific goal is to take a path from Dropbox, e.g. ‘/onyx/TabUltra/Notebooks/tester multiple/spam/now/Clean to do.pdf’ and use the folder names as tags for a Notion database item that I’m creating. Excluding the first two folders (and the filename).

So for the example above, the tags would be:
Notebooks
tester multiple
spam
now

I’ve tried multiple approaches with regex, text parsers and array aggregators but no luck as yet. The two problems I’m facing are:

  1. How to only get the items from after TabUltra
  2. How to format it so that my multi select Tags property in Notion will accept the input

Blueprint in case it’s helpful:
blueprint (2).json (598.8 KB)

Thank you in advance for any smarts on this!
Tim

Turns out asking itself helped me get to the answer via another forum post!

This formula in the Tags property does it:
{{slice(split(51.body.path_lower; “/”); 2; -1)}}

I was using ChatGPT to help me do this but it was wrong on it’s belief that the Tags property needed a key:value style array when updated via the Notion Module…

The above just splits it more simply and it works - another bonus that it doesn’t require any additional operations!

1 Like