Skip to main content
Solved

Ability to embed YouTube or Twitch links via form submission

  • March 14, 2023
  • 5 replies
  • 43 views

Forum|alt.badge.img+2

Goal: A user can create a post including any version of a youtube or twitch URL. When the post is created it appears in a repeating group and the link appears as an embedded video. 

Current State: The entire site is already built using a combination of airtable and bubble.io. This is the last feature that I need. 

Work: I am open to ideas. What I know right now is that it can be done either with a Regex Formula or JavaScript Automation using the video id. 

Budget: Hopefully, under $200. But we can discuss it, based on your idea. 

Best answer by TheTimeSavingCo

@TheTimeSavingCo  Hardcoding is what I expected, so that would work for me. Attached is a list of the email examples


Roger that, here

And the formula used is:

IF( FIND( "twitch.tv", {Embed Link Examples} ), "https://clips.twitch.tv/embed?clip=", IF( OR( FIND( "youtube.com/", {Embed Link Examples} ), FIND( "youtu.be/", {Embed Link Examples} ) ), "https://www.youtube.com/embed/" ) ) & SUBSTITUTE( REGEX_EXTRACT( {Embed Link Examples}, "[^/]*$" ), "watch?v=", "" )

5 replies

TheTimeSavingCo
Forum|alt.badge.img+31

The only way I can think of doing this involves having a list of the possible URL patterns and just hardcoding it really.  Do you have a list like that?


Forum|alt.badge.img+2
  • Author
  • New Participant
  • March 14, 2023

Forum|alt.badge.img+2
  • Author
  • New Participant
  • March 15, 2023

Forum|alt.badge.img+2
  • Author
  • New Participant
  • March 15, 2023

The only way I can think of doing this involves having a list of the possible URL patterns and just hardcoding it really.  Do you have a list like that?


@TheTimeSavingCo  Hardcoding is what I expected, so that would work for me. Attached is a list of the email examples


TheTimeSavingCo
Forum|alt.badge.img+31

@TheTimeSavingCo  Hardcoding is what I expected, so that would work for me. Attached is a list of the email examples


Roger that, here

And the formula used is:

IF( FIND( "twitch.tv", {Embed Link Examples} ), "https://clips.twitch.tv/embed?clip=", IF( OR( FIND( "youtube.com/", {Embed Link Examples} ), FIND( "youtu.be/", {Embed Link Examples} ) ), "https://www.youtube.com/embed/" ) ) & SUBSTITUTE( REGEX_EXTRACT( {Embed Link Examples}, "[^/]*$" ), "watch?v=", "" )