Learning Timeline
Key Insights
Bulk Generation Tip (Batching)
Avoid running too many concurrent requests if you are using a new API account. Use the 'Wait' or 'Split In Batches' node in n8n to prevent 'Rate Limit Exceeded' errors from OpenAI.
Monitor Credit Usage
AI video generation consumes significant API credits. Always check your credit balance in the OpenAI dashboard before starting large-scale bulk automation.
Prompts
Cinematic Stock Video Prompt Example
Target:
OpenAI Sora 2
Cinematic drone shot of a lush tropical rainforest at sunrise, mist rising from the trees, 4k, hyper-realistic, highly detailed.
Step by Step
Preparing Google Sheets for Bulk Data
- Open Google Sheets and create a new file.
- Set up a header in the first row with the columns: 'Video Name', 'Prompt', and 'Status'.
- Fill in your list of video ideas and prompts in the subsequent rows.
- Ensure the 'Status' column is left blank for n8n to update later.
Configuring Trigger and Google Sheets Nodes in n8n
- Any n8n workflow begins by clicking the '+' button to add a new node.
- Search for and select the 'Google Sheets' node.
- Select 'Get Many' under the Operation section.
- Connect your Google account via the 'Credential' menu.
- Enter the 'Spreadsheet ID' found in your Google Sheets URL.
- Click 'Execute Node' to ensure n8n can successfully read your prompt list.
Connecting n8n to the OpenAI Sora 2 API
- Add an 'HTTP Request' node after the Google Sheets node.
- Set the Method to 'POST'.
- Enter the API endpoint URL for Sora 2 (Refer to official OpenAI documentation).
- In the Authentication section, select 'Header Auth' and enter your API Key as 'Authorization: Bearer YOUR_API_KEY'.
- In the Body Parameters section, select 'JSON'.
- Use an 'Expression' to map the 'Prompt' column from Google Sheets to the 'prompt' field in the API request body.
- Click 'Execute Node' to send the video generation command.
Auto-Download and Save Videos to Google Drive
- Add a 'Wait' node if the API needs time to process the video, or use a second 'HTTP Request' node to poll the video status.
- Once the API returns the video URL, add a new 'HTTP Request' node with the 'GET' method to download the video binary file.
- Add a 'Google Drive' node after the download node.
- Select the 'Upload' Operation.
- Choose your destination folder in Google Drive.
- Map the binary file from the previous step into the 'File Content' input.
- Click 'Execute Node' to automatically save the video.