How to create a database of Google Drive files in Airtable

  • 15 September 2021
  • 2 replies
  • 815 views
How to create a database of Google Drive files in Airtable
Userlevel 5
Badge

Hi there, this is Erin Oz from the Premier Support Team with a workflow idea to share. 

Background Info

Do you have a lot of files in your Google Drive, but you can never find what you’re looking for? 

Or have you thought about doing a file reorganization project, and wondered if there’s a way to automate a record of which files have been added to the new folder? 

Folks with large collections of video files, audio files, or other libraries of information often try to use nesting folders in a Drive to keep things organized, but it can be hard to browse through items that meet certain criteria. 

For example, my brass quintet has a large library of sheet music. A “work” (a song) consists of parts for each member of the group. So for a standard brass quintet, there will be five “parts” for each work: Trumpet 1, Trumpet 2, Horn, Trombone, and Bass Trombone (Tuba). We keep a folder with the title of the work, and each folder contains five PDF files for each part. 

Any given work also has a number of attributes that are impossible to capture in a single file name. For example, let’s think about “Somewhere Over the Rainbow”. This is an arrangement of a popular ballad, from a movie, about 3 minutes long, etc. 

The challenge with a large library is that it can be difficult to browse and find results that match a given set of attributes. We decided to create an Airtable database that contains a single record for each part with a direct link to the Google Drive file. The database also contains a Works record for each piece, and details attributes like work length and musical style. 

Entering this information manually would take, for lack of a better term, FOREVER. 

I created a new folder in Google Drive for our music library, and I would add the files for the database to that folder. 

I created a Zap that triggers on a New File in Google Drive, parses the part details from the file name, creates new Records in Airtable, and pings our group Slack so we can manually add finer details to the newly created records. 

Example

  1. The first step is to create our Google Drive trigger.

    If you’d like to trigger on a specific folder, you can select New File in Folder. The catch here is that the Zap will only trigger on files added to that specific folder, it will not trigger on subfolders. In other words, if I added a folder of five parts, the Zap would not trigger.

    For my workflow, I used the New File trigger. This triggers on any new File added to Google Drive.

    4fd1853311a0a97340e78e3fcddd474e.png

 

  1. I then added a Filter step to only allow certain files to continue. I knew that my file names would contain certain keywords, and that the filetype would be a PDF.

    I set up my filter to only continue if one of those keywords appeared in the file name field, AND they were a PDF file.

    d952f7514fe6238bf55a3457e9966855.png

 

  1. Next, I used a series of Split Text Formatter steps to split the file title and return the composer name, arranger name, work title, and instrument. I created a naming convention for each file so my Formatter steps can reliably return the data.

    Our naming convention looks like this:
    Title, Composer (arr. Arranger) - Instrument

    ea7a1d23fbae59a7ea71ca78bcb2af5c.png

 

  1. I then added an Airtable Create Record step that finds or creates a new Works record. This Works record will populate my table showing all the Works in our library.

    Remember, each Work contains 5 parts known as Sheet Music! The Zap is going to run on each Sheet Music item added to the Drive.

    We only need to create the Works record once for each set of 5 Sheet Music parts, so the Find step will return the Works record on the other 4 runs.

    eb47a502e913611572c874791dd5b901.png



a7e78c522d0c8a2087d0e90799e7b879.png

 

  1. Next, a Create Record step creates a new Sheet Music record, and adds the Google Drive link to the record field.

    945e056f604c614720f0594f8ee51be8.png

 

  1. I then added a Delay After Queue step to enable Slack threading - you’ll see why in the final step!

    135fe61feca09e98e11156653564c324.png

 

  1. Then, a Find Message step in Slack searches a specific channel I created to see if a message has already been posted about the Works record. Remember, only one Works record is created for every five Sheet Music records!

    The Zap is going to run when a group of five PDF files are added in a folder to the Drive. That means the Zap will run five times on each Work, but only create the Work record once. 

I’d like the first run of the Zap to post a Slack message, and for the remaining Slack messages to be threaded. That way, I can see at a glance that all five parts were added, but the main message contains the action item for me to add attributes.

This step will allow the Zap to thread subsequent messages about the same Work.
 

  1. The final step of my Zap will post to a Slack channel and request that specific attributes of each Work be added.

    Since we don’t currently have a database or spreadsheet containing the attributes we’d like to add to the Works records, we need to crowdsource those details from the group and add them in.

    If there are any auxiliary instruments required for each Sheet Music part, we can also add in those details! 

d4e4f892283656c76824f6b68dc08a24.png

Whew, thanks for sticking with me! 

This is a heavy lift of a workflow, but the upfront investment of time means that each time we acquire a new piece, I can simply drag a folder of (properly-named) PDF files into my Google Drive and the records are created in Airtable automatically. 

This valuable database in Airtable gives me a lot of flexibility. I can create a view in Airtable that only shows me pieces that are less than three minutes long and in a jazz style, or I can look for all the Works we have for a certain composer without needing to drill down into multiple levels of folders. 

You can apply this concept to video files, social media content libraries, photo libraries, and more.

What can you organize in your working life with a dynamic database created automatically by Zapier?

 


2 replies

Thank you for this article Carolina. I’m trying to do many of the same things. I have an Airtable base that tracks information for payroll in our company. Every pay period, we receive a .pdf file from our payroll processing company that contains pay stub information for all employees.

I have been inserting these files in individual Google Drive folders for each employee. Presently, there are only 7 employees. So it is manageable. My goal is to create a zap that would be triggered by a new file uploaded into Drive. Each file name includes the employee’s name, and is in .pdf format.

When files are added to Drive, I’d like the trigger to fire, using a filter to only select files that contain any file names that include the individual employee names. Then I’d like to copy the Drive URL for each file. 

Subsequently, I’d like to create a new record in an Airtable table named Pay Stubs, which would be linked to the Payroll Info table. I’d like to paste the Drive URL into an attachment field named Stubs. 

Any suggestions or advice? I’m very new to Zapier. Also, I’d like to know more about Interfaces. Do you have some links that would explain them? Thanks again.

Bobby Gay

Hey there, buddy! Imagine you have a lot of files in your Google Drive, but you can't find what you need. That can be frustrating, right? Well, there's this person named Erin Oz who had the same problem, but she came up with a clever solution!

Erin loves music and had tons of sheet music files for her brass quintet. Each piece had different parts for different instruments, like trumpets, horns, and trombones. So, Erin created a system to organize all these files automatically using Google Drive and a cool thing called Airtable.

She made a special setup with "Zaps" (kind of like magic spells for computers). When she adds a new sheet music file to her Google Drive folder, the Zap gets triggered and does some amazing stuff! It reads the file name to know what the music is about and who wrote it. Then, it creates a record in Airtable with all that info, like a digital music library!

But wait, there's more! Erin's Zap also sends a message to her friends on Slack, a messaging app. It lets them know that new music has been added and asks for more details about the songs. That way, they can all work together to add more cool info to the records.

Now, Erin can easily find all her sheet music and filter it by things like the style of music or the composer. It's like having a super cool music database!

Oh, and you know what's really neat? You can use this idea for other stuff too, like organizing videos, photos, or anything else you want to keep in order. So, next time you're searching for something in a big mess of files, remember Erin's workflow idea and make your own magical Zap! 🎶🧙‍♂️
To find experts who can help you with your Zap, you can explore Zapier expert profiles here.

Reply