Choose value in linked field based on dropbox subfolder name. (Integromat,Dropbox,Airtable)

I’m trying to come up with a document tracking system with (Integromat,Dropbox,Airtable) and I’m trying to automate creating new records in airtable when added to dropbox and then assign a value to a linked field based on the folder the file is saved to.

In airtable I have two tables; Jobs, Attachments with linked filed to jobs.

I have dropbox watch folder (yes to subfolders). When a new file is added to dropbox job subfolder a new record is created with path, this value stored in “path”:
/clients/3d/3d tracker/3d projects/21-982:

Is it possible to create an automation that will assign the value of the linked filed to job 21-982 by breaking the path and matching the final folder? I’m guessing there is some regx here, which I’m not very capable of.

Any tips or links to samples that could help me. Thanks!

I actually was able to figure some of this out. Mapped the file path to a field then used regex formula to get the last folder. REGEX_EXTRACT({file path},".*\\/([^\\/]+)\\/")

then I created an update record in airtable to update the linked field “job” with the extracted data from “filepath”. Enabled smartlinks in integromat but not sure how that works completely, but it seems to have done the trick.

2 Likes