Prerequisites & Overview
Everything you need to know before starting the setup process.
What You'll Need
Category Breakdown
| ๐ค AI Services |
โข Google Gemini API Key โข Active Google AI Studio Account |
๐ Setup Guide |
| ๐ฑ Messaging |
โข WhatsApp Business Account โข Facebook Developer Account โข Verified Business |
๐ Configure |
| โ๏ธ Cloud Services |
โข Google Cloud Project โข Gmail API Access โข Google Sheets & Drive API |
๐ Setup |
| ๐ ๏ธ Platform |
โข n8n Instance (Cloud/Self-hosted) โข SSL Domain โข PDF Generator API |
โ๏ธ Deploy |
| ๐ Data Source |
โข Google Sheets with Beach Data โข Proper Data Structure โข Read/Write Permissions |
๐ Template |
๐ API Credentials & Accounts
| Service | Purpose | Setup Time | Cost |
|---|---|---|---|
| n8n Instance | Workflow Automation | 5 min | Free Tier Available |
| WhatsApp Business API | Message Reception | 30 min | Free for Testing |
| Google Cloud Project | Sheets & Gmail Access | 15 min | Free ($300 credit) |
| Google Gemini AI | Data Analysis | 5 min | Free Tier |
| PDF Generator API | Report Creation | 10 min | Free Tier Available |
Workflow Components
Plemdo AI uses the following integrated components for conversational data analytics:
| Component | Purpose | Key Features |
|---|---|---|
| ๐ง Conversation Router | Intent Detection & Context Management | Natural Language Processing, Multi-turn Memory, Query Enhancement, Clarification Engine |
| ๐ค AI Data Scientist | Advanced Data Analysis | Google Gemini AI, Multi-dimensional Analysis, Strategic Recommendations, Competitive Intelligence |
| ๐ Visualization Engine | Professional Chart Generation | 8+ Chart Types, Enterprise Color Schemes, Context-Aware Selection, HD Export Quality |
| ๐ PDF Reporting | Automated Report Generation | 15+ Page PDFs, Executive Summaries, Branded Templates, Multi-format Delivery |
| ๐ณ Monetization Tracker | Business Value Analytics | Usage-based Billing, ROI Calculation, Cost Savings Analytics, Tier-based Pricing |
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:
- 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"
PDF Generator API
Configure PDF Generator API to convert HTML content into professional PDF documents seamlessly.
Create PDF Generator Account
Get started with PDF Generator API:
- Go to pdfgeneratorapi.com
- Click "Sign up for free account"
- Complete the registration form with your details
- Verify your email address to activate your account
Get API Credentials
Retrieve your authentication credentials from the dashboard:
- Login to your PDF Generator dashboard
- Navigate to "API Settings" or "Credentials" section
- Copy the following credentials:
- Workspace ID - Your unique workspace identifier
- API Key - Public authentication key
- API Secret - Private authentication secret
Configure n8n Credentials
Set up PDF Generator API credentials in your n8n instance:
- Open n8n and go to Settings โ Credentials
- Click "Add Credential" or "Create new"
- Search for and select "PDF Generator API"
- Fill in the credential form with your copied values:
- Name: "PDF Generator API (Plemdo AI)"
- Workspace ID: [Your Workspace ID]
- API Key: [Your API Key]
- API Secret: [Your API Secret]
- Click "Save" to store the credential
Assign to Workflow
Connect the PDF Generator API to your Plemdo AI workflow:
- Open your "Plemdo AI" workflow in n8n
- Locate the "PDF โ Render HTML โ PDF" node
- Click on the node to open its settings
- In the "Credential" dropdown, select "PDF Generator API (Plemdo AI)"
- Configure your PDF generation settings (page size, margins, orientation, etc.)
- Test with sample HTML content to verify the integration
Setup Complete!
You're all set! Your PDF Generator API is now ready to transform HTML content into beautiful PDFs. You can now:
- โจ Generate PDF documents from dynamic HTML templates
- ๐ Create reports, invoices, and certificates automatically
- ๐จ Apply custom styling and branding to your PDFs
- โก Process high-volume PDF generation with API-level performance
WhatsApp OAuth API
Integrate your WhatsApp Business Account for automated messaging and notifications.
Create a Meta App
Set up a Meta for Developers app to manage your WhatsApp integration:
- Go to Meta for Developers
- Click "My Apps" โ "Create App"
- Select "Business" as the app type and click "Next"
- Enter your App Name (e.g., "Plemdo AI WhatsApp") and your Business Email
- Click "Create App"
Add WhatsApp Product
Integrate the WhatsApp product into your Meta app:
- In your App Dashboard, find and click on "Set up" for "WhatsApp"
- You will be redirected to the WhatsApp product page
- Click "Configure"
- Select your Meta Business account and the Business account that owns your WhatsApp Business Account (WABA).
- If you don't have a WABA, you'll be prompted to create one.
Obtain API Credentials
Get your WhatsApp API token and phone number:
- On the WhatsApp product page, you'll see a "Token" section.
- Copy the System User Access Token. This is your API token.
- Under the "Phone numbers" section, you should see your verified WhatsApp Business phone number.
- If not, you'll need to add and verify a phone number using the WhatsApp Business Platform setup.
Configure Webhooks
Set up webhooks to receive incoming messages:
- On the WhatsApp product page, scroll down to the "Webhooks" section.
- Click "Edit"
- Enter your Callback URL. This will be your n8n webhook URL:
https://your-n8n-domain.com/webhook/whatsapp-inbound(replace with your actual n8n domain). - Enter a Verify Token. This is a secret string you create to verify webhook requests.
- Click "Verify and Save".
- You will need to subscribe to message events. Click "Add Subscription" and select "messages".
Configure n8n WhatsApp Credential
Add the WhatsApp credential to your n8n instance:
- In n8n, go to Settings โ Credentials
- Click "Add Credential"
- Search for "Meta Webhooks"
- Select "Meta Webhooks"
- Fill in the credential form:
- Name: "WhatsApp API (Plemdo AI)"
- Token: [Your System User Access Token from Step 3]
- Verify Token: [Your secret Verify Token from Step 4]
- Click "Save"
N8N Configuration
Complete setup and testing of your N8N workflow for full automation pipeline.
๐ฅ Import the Workflow
Import Plemdo AI into Your n8n Instance
Access Your n8n Dashboard
- Navigate to your n8n instance
- Go to the Workflows page
Import Workflow File
- Click "Import from file" button
- Select the Plemdo-AI-Workflow.json file
- Click "Import"
Verify Import Success
- Workflow appears in your list
- All 25+ nodes pre-configured
- Ready for credential assignment
Quick Configuration Steps:
- Open imported workflow in n8n editor
- Locate key configuration nodes (highlighted in workflow)
- Update project-specific parameters
- Save workflow to apply changes
๐ Assign Credentials to Nodes
Connect Your API Services to Power Plemdo AI
Credential Assignment Process:
1. WhatsApp Business Integration
2. AI Intelligence Layer
3. Data Source Connection
4. Delivery & Storage
5. Analytics & Monitoring
๐งช Testing & Validation
Verify Complete Pipeline Functionality
Initial Smoke Test
Test 1: WhatsApp Connection
Test 2: AI Processing
Test 3: Email Delivery
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.
WhatsApp OAuth API Troubleshooting
Solution: Business verification is required before creating WhatsApp Business App. This may take 1-3 days for approval. Required documents:
- Business registration certificate
- Tax identification number
- Utility bill or bank statement
- Government-issued ID
Solution: Ensure you have the correct role permissions. Steps to resolve:
- Navigate to System Users section in your Facebook app
- Create new System User with "Developer" role
- Click "Generate New Token" and select your app
- Choose "Never Expire" for token duration
- Copy immediately - you won't see it again! (Format: EAAL...)
Solution: Verify all webhook configurations:
- Callback URL must be publicly accessible:
https://your-n8n-domain.com/webhook/whatsapp - Verify Token must match exactly in both Facebook and n8n
- Webhook Version should be v16.0 or latest stable
- Confirm "messages" event is subscribed in Meta for Developers
- Test with a simple message first: "Hi"
Solution: Follow the verification process:
- Go to WhatsApp โ API Setup โ Add Phone Number
- You'll receive a 6-digit code via SMS or phone call
- Enter the code immediately within 10 minutes
- Save your Phone Number ID (different from actual phone number)
- Example Phone Number ID format:
904388409414179
Solution: Ensure all credentials are correctly configured:
- Access Token: Your permanent token from System User (starts with EAAL)
- Phone Number ID: Found in WhatsApp โ API Setup
- Business Account ID: In your app settings
- App ID: In your app settings
- Double-check for extra spaces or characters
Solution: Message processing may be delayed:
- Gemini AI analysis can take 20-30 seconds
- PDF generation and email delivery add processing time
- n8n workflow has automatic retry mechanisms
- Check n8n execution logs for detailed error messages
- Verify all downstream services (email, storage) are accessible
Solution: Full message flow verification:
- Send test message: "Show me top beaches in Dublin"
- Expected response: Welcome message and processing notification
- Wait 20-30 seconds for Gemini analysis completion
- Verify PDF was generated and emailed
- Check n8n logs if WhatsApp summary is missing
- Ensure phone number is in international format: +1234567890
Solution: Complete OAuth verification:
- For testing: Add test users in OAuth consent screen
- For production: Submit app for verification by Google
- Ensure all required scopes are documented and justified
- Provide clear descriptions of data usage
- Review process typically takes 3-5 days
Before going live, verify:
- โ Business verification complete
- โ WhatsApp Business App created and active
- โ Permanent access token securely stored
- โ Webhooks configured and verified
- โ Phone number verified and configured
- โ n8n credentials tested successfully
- โ Sample message flow works end-to-end
- โ PDF generation and email delivery functional