Help

Re: Google Drive Video duration

1536 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Production2
4 - Data Explorer
4 - Data Explorer

Hello to all,

First of all, sorry for my bad English :winking_face:
I would like to get the duration of a video available in a column containing a Google Drive link and then copy it into a “Duration” column of my database.

Do you think this is possible?
Thanks

7 Replies 7

Welcome to the community, @Production2!

Airtable has built-in Google Drive syncing, but it only synchronizes the most common pieces of information about each file.

If you need to pull in the duration of your video files, this information IS actually provided by Google’s API, but you would need to spend time custom-creating your own way of pulling this information from Google into Airtable.

A few ways of doing this:

  1. If you know JavaScript, you could write your own JavaScript script to do this. (I do not know Javascript, but many people in this forum do.)

  2. You could also use the DataFetcher app to make an API call to Google Drive, and pull in this information into your Airtable base.

  3. You could also use an integration tool like Make.com to pull in this information as well. In the screenshot below from Make.com, you can see that Google calls this metadata “durationMillis” and it returns the duration to you in milliseconds:

Screen Shot 2022-06-06 at 3.25.04 PM

But, you could use Airtable’s internal synching approach and then create a [script] automation process that simply queries the Drive API from a view of any records that are missing the video’s duration value. It would be very efficient since the Drive sync includes the file IDs.

Example…
GET https://www.googleapis.com/drive/v3/files/fileId

What’s returned is the complete data about the requested file. This could all be done inside Airtable using script automation.

You’re probably best off using an IAM approach for authenticating with Google Drive if the videos are not shared openly as “Anyone with link may access”.

Yes, that’s what I was trying to say above. You would start with a Google Drive sync table in Airtable, and then either (1) script it, (2) use DataFetcher, or (3) use Make.

(Of course, you don’t NEED to start with a Google Drive sync table, but it makes things easier.)

Production2
4 - Data Explorer
4 - Data Explorer

Thanks a lot @ScottWorld and @Bill.French for these tips !!
I wil try it on my side

Have a great day !

Hello Bill,

Thank you for your help !
Your ID is Bill.French : do you speak french ? It would be easier for me :winking_face:

May I ask if it is possible for you to be more specific about your solution?
It would be really great to be able to do this directly in airtable :winking_face:

Thanks a lot in advance

Ha ha! No. In fact, my parents were particularly troubled that I dang near flunked French in high school. So no - an easier dialog between us will not likely emerge without the assistance of Google Translate.

Let’s be clear - it’s not a solution; rather just an envisioned approach. Let’s explore -

  • The Drive Synching feature in Airtable is able to gather data about Google Drive documents.
  • One of the data values is the file ID.
  • The Google Drive API is able to access specific files by file ID and return more details about each document.

Given these facts, a script process in Airtable could use the file IDs to “lookup” more detailed features of each document including, but not limited to the duration of videos. Such a script process could act upon a view that lists all video files missing a duration value.

@Production2 If you have a budget for your project, I can help you with this. I’m expensive because I work on a prepaid retainer basis, but you can use me for more than just this one project: Airtable Consulting - ScottWorld