Prerequisites & Overview
Everything you need to know before starting the setup process.
What You'll Need
- Google Cloud Platform account with billing enabled
- n8n instance (cloud or self-hosted)
- Google account (for YouTube, Drive, Sheets)
- Approximately 30-45 minutes for complete setup
Workflow Components
The AI Video Factory Automator uses the following integrated components:
| Component | Purpose | Required APIs |
|---|---|---|
| Vertex AI | Veo3 video generation | Vertex AI API |
| Google Gemini | AI prompt generation | Generative Language API |
| YouTube | Video upload & publishing | YouTube Data API v3 |
| Google Drive | Video file storage | Google Drive API |
| Google Sheets | Workflow logging | Google Sheets API |
| Gmail | Success/failure notifications | Gmail API |
Vertex API Setup
Configure Google Cloud Vertex AI to access the Veo3 model for video generation.
Create Google Cloud Project
Set up a new Google Cloud project for your AI Video Factory:
- Go to Google Cloud Console
- Click the project dropdown in the top navigation
- Click "New Project"
- Enter project name: "AI-Video-Factory Automator"
- Select your organization (if applicable)
- Click "Create"
Enable Billing
Enable billing for your project to access the Veo3 API:
- In Google Cloud Console, navigate to "Billing"
- Click "Link a billing account"
- Follow prompts to set up billing
- Ensure your new project is linked to the billing account
Enable Required APIs
Enable the necessary APIs for your project:
- Vertex AI API
- Google Drive API
- Google Sheets API
- YouTube Data API v3
To enable an API:
- Go to the API Library
- Search for each API by name
- Click on the API from the results
- Click "Enable"
Find Your Project ID
Your Project ID is a unique identifier for your Google Cloud project and is essential for API configuration:
- Go to the Google Cloud Console
- Click on the project dropdown at the top of the page
- Your Project ID is displayed next to your project name
- It typically looks like: my-project-123456
Determine Location and API Endpoint
For Veo3, you need to specify the location and API endpoint for your requests:
- Location: us-central1 (currently the only supported region for Veo3)
- API Endpoint: us-central1-aiplatform.googleapis.com
- Model Version: veo-3.0-generate-preview
Store these values for later configuration:
Create Service Account
Create a service account for secure API authentication:
- Go to Service Accounts
- Click "Create Service Account"
- Enter a name and description
- Click "Create and Continue"
- Assign the role "Vertex AI User" (or more specific roles as needed)
- Click "Continue" and then "Done"
- Click on the newly created service account
- Go to the "Keys" tab
- Click "Add Key" โ "Create New Key"
- Select "JSON" and click "Create"
- The key file will be downloaded to your computer
Google OAuth Setup
Configure OAuth 2.0 credentials for seamless integration with YouTube, Google Sheets, and Google Drive.
Configure OAuth Consent Screen
Set up your OAuth consent screen in Google Cloud Console:
- Go to APIs & Services โ OAuth consent screen
- Select External user type and click Create
- Fill in application details:
- App name: "AI Video Factory Automator"
- User support email: [Your email]
- Developer contact information: [Your email]
- Click Save and Continue
Add OAuth Scopes
Configure the required scopes for your application:
- Click Add or Remove Scopes
- Add these scopes manually:
- YouTube Upload: https://www.googleapis.com/auth/youtube.upload
- Google Drive: https://www.googleapis.com/auth/drive
- Google Sheets: https://www.googleapis.com/auth/spreadsheets
- Gmail Send: https://www.googleapis.com/auth/gmail.send
- Click Update then Save and Continue
- Add test users by entering your email address
- Click Save and Continue
Create OAuth Client ID
Generate OAuth credentials for n8n integration:
- Go to Credentials page in Google Cloud Console
- Click Create Credentials โ OAuth client ID
- Set Application type: "Web application"
- Enter Name: "n8n-video-factory"
- Add authorized redirect URIs:
- For n8n Cloud: https://app.n8n.cloud/rest/oauth2-credential/callback
- For Self-hosted: https://your-n8n-domain.com/rest/oauth2-credential/callback
- Click Create
- Copy the Client ID and Client Secret
Configure n8n OAuth Credentials
Set up OAuth credentials in your n8n instance:
- In n8n, go to Settings โ Credentials
- Click Add Credential
- Search for and select "Google OAuth2 API"
- Fill in the credential form:
- Name: "Google OAuth (Video Factory)"
- Client ID: [From Step 3]
- Client Secret: [From Step 3]
- Click Save
- n8n will redirect you to Google for authentication
- Grant the necessary permissions when prompted
- You'll be redirected back to n8n with the credential created
Gemini API Setup
Enable Google Gemini for intelligent video prompt generation and creative content automation.
Enable Gemini API
Enable the Gemini API in your Google Cloud project:
- Go to the API Library
- Search for "Generative Language API" or "Gemini API"
- Click on the API from the results
- Click "Enable"
Get API Key
Create an API key for the Gemini API:
- Go to the Credentials page
- Click "Create Credentials" โ "API Key"
- Copy the generated API key
- Optionally, restrict the API key to only the Generative Language API for security
Configure in N8N
Set up the Gemini credential in N8N:
- In N8N, go to Settings โ Credentials
- Click "Add Credential"
- Search for "Google Gemini" or "PaLM API"
- Select "Google Gemini(PaLM) API"
- Enter your API Key in the provided field
- Click "Save"
N8N Configuration
Complete setup and testing of your N8N workflow for full automation pipeline.
Import the Workflow
Import the AI Video Factory Automator workflow into n8n:
- In n8n, go to the Workflows page
- Click "Import from file"
- Select the JSON workflow file
- Click "Import"
- The workflow will appear in your list with all nodes configured
Configure API Parameters
Update the workflow with your specific API parameters:
- Open the imported workflow
- Find the "โ๏ธ Veo3 API Setup" node
- Update the following parameters:
- PROJECT_ID: Your Google Cloud Project ID
- MODEL_VERSION: veo-3.0-generate-preview
- LOCATION: us-central1
- API_ENDPOINT: us-central1-aiplatform.googleapis.com
- Save the workflow
Assign Credentials to Nodes
Assign the appropriate credentials to each node in the workflow:
- Google Gemini Chat Model nodes: Assign your Google Gemini(PaLM) API credential
- ๐๏ธ Generate Veo3 Video node: Assign your Google OAuth2 API credential
- โณ Check Veo3 Render Status node: Assign your Google OAuth2 API credential
- โ๏ธ Upload to Google Drive node: Assign your Google Drive OAuth2 API credential
- ๐ฅ Upload to YouTube node: Assign your YouTube OAuth2 API credential
- ๐ง Store Video Concept node: Assign your Google Sheets OAuth2 API credential
- ๐งพ Log to Google Sheet node: Assign your Google Sheets OAuth2 API credential
- โ๏ธ Success Notification node: Assign your Gmail OAuth2 API credential
- โ๏ธ Failure Notification node: Assign your Gmail OAuth2 API credential
Test the Workflow
Run a test to ensure everything is working correctly:
- Activate the workflow
- Trigger the "Schedule Trigger" node manually
- Monitor the execution to ensure all nodes complete successfully
- Check that a video is generated and uploaded to Google Drive and YouTube
- Verify that the details are logged to Google Sheets
- Confirm that the success email is sent
Sample Errors & Troubleshooting
Common issues and their solutions for a smooth setup experience.
Solution: Ensure your service account has the "Vertex AI User" role. Go to IAM & Admin > IAM and verify permissions.
Solution: Check your Vertex AI quotas in Google Cloud Console. Request a quota increase if needed.
Solution: Add test users in the OAuth consent screen configuration for testing mode.
Solution: Veo3 has content safety filters. Modify your prompt to avoid sensitive content.
Solution: Video generation can take time. The workflow has retry mechanisms built-in.