Latenode

Quickly generate personalized product videos from Foreplay and Sora 2

This template starts when you post a product brief to a Latenode webhook.

JavaScript loads competitor ad examples from Foreplay, Gemini writes a video prompt from those ads plus your product, and OpenAI video generation renders the clip. The finished file is uploaded to Google Drive. Connect Google Drive. Put the Foreplay API key in the JavaScript node and the Google AI key on the Gemini connection. OpenAI video generation is a Latenode AI step.

Updated Sep 16, 2026Est. run: 40sEst. cost: $0.0025
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Renders a product video from a brief, Foreplay ad examples, and Gemini
  • Uses OpenAI video generation as a Latenode AI step
  • Saves the finished clip to Google Drive
  • Keeps the Foreplay API key in the JavaScript node and the Google AI key on Gemini

How it works

1
Trigger

Receive the product brief

The scenario starts when you post product name, niche, and category to the Latenode webhook.

2
Logic

Load Foreplay ad examples

JavaScript calls the Foreplay API for competitor ads. Put the Foreplay API key in that JavaScript node.

3
AI

Write the video prompt

Gemini reads your product plus those ad examples and returns a prompt for the clip.

4
AI

Render the video

OpenAI video generation starts the render, waits, and downloads the finished file.

5
Action

Save to Google Drive

Google Drive uploads the clip to the folder you choose.

Setup guide

1

Add the webhook

Add a webhook trigger and copy the URL. Post product name, niche, and category to that URL when you want a new clip.

2

Load Foreplay ads in JavaScript

Add a JavaScript node that calls the Foreplay API for ad examples. Put the Foreplay API key in that JavaScript node.

3

Connect Gemini and Google Drive

Add a Gemini connection and paste your Google AI API key there. Add a Google Drive connection with write access to the folder that should receive videos.

4

Render and upload

Send the product plus Foreplay examples to Gemini for a prompt. Start an OpenAI video generation render from that prompt, wait, get the video result, and upload the file to Drive. OpenAI video generation is a Latenode AI step. Post a test brief and confirm the file in Drive.

Requirements

A Latenode webhook URL you can POST a product brief to
A Foreplay API key stored in the JavaScript node
A Google AI API key stored on the Gemini connection
A Google Drive folder Latenode can write to
A Latenode plan that includes Plug-and-Play AI video generation

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work. Plug-and-Play AI nodes are billed separately.