Content modelling > External video field

    External video field

    One of the fields that you can use in DatoCMS is the external video field, that allows you to reference an external YouTube, Vimeo or Facebook video.

    Via oEmbed we'll fetch and store the thumbnail image, the title and the dimensions of the video. All information that you can then retrieve via the APIs.

    How to publish a scheduled YouTube video

    Unfortunately, oEmbed information can only be fetched from public videos, and not private videos with a scheduled publication date. This YouTube feature is very useful together with the scheduled publication of DatoCMS's records.

    But how can you make the two work together?

    There's a little trick that you can use, it's not super handy but will do the job:

    • set the video to unlisted, unfortunately you cannot schedule an unlisted video to be listed

    • add the video to DatoCMS

    • set the video to private again and schedule the publication

    • schedule the publication of DatoCMS record together with the YouTube video

    That's it! A bit hackish, but it's a way to work around the limitations of the system.