Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Marketing
  3. YouTube Video Auto Posting v 18.0
  4. Sales Conditions FAQ

YouTube Video Auto Posting

by Ankit https://devscodespace.com
Odoo
v 18.0 Third Party 29
Download for v 18.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 296
Technical Name youtube_auto_post
LicenseLGPL-3
Websitehttps://devscodespace.com
Versions 15.0 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 296
Technical Name youtube_auto_post
LicenseLGPL-3
Websitehttps://devscodespace.com
Versions 15.0 16.0 17.0 18.0

Installation and Configuration Guide for YouTube Auto Post Odoo Addon

Overview

The youtube_auto_post Odoo addon enables users to schedule and automate video uploads to YouTube using the YouTube Data API. Key features include:

  • Uploading videos stored as Odoo attachments (ir.attachment).
  • Scheduling uploads via Odoo's cron job.
  • Managing YouTube API credentials (client_secrets.json) through a settings interface.
  • Handling OAuth 2.0 authentication to generate a token_youtube_v3.pickle file.

Prerequisites

  • Odoo Installation: Odoo 18. See Odoo Documentation.
  • Python Environment: A Python environment with Odoo dependencies installed.
  • Google Cloud Account: Sign up at Google Cloud Console.
  • Video Files: Must be in MP4, MOV, or AVI formats and stored as Odoo attachments.
  • System Requirements: Write permissions for the Odoo addons directory and an internet connection.
  • Admin Access: Access to Odoo’s settings menu (requires base.group_system permissions).

Step 1: Set Up Google Cloud and Create client_secrets.json

1.1 Create a Google Cloud Project

- Visit Google Cloud Console.
- Click New Project, enter a name (e.g., youtubeAutoPost), and click Create.
- Select the project from the top dropdown.

1.2 Enable YouTube Data API

- Go to APIs & Services > Library.
- Search for YouTube Data API v3 and click Enable.
- See YouTube Data API Documentation.

1.3 Create OAuth 2.0 Credentials

- Navigate to APIs & Services > Credentials.
- Click Create Credentials > OAuth 2.0 Client IDs.
- Select Desktop app, enter a name (e.g., YouTube Upload Client), and click Create.
- Download the client_secrets.json file by clicking the download icon.

1.4 Configure OAuth Consent Screen

- Go to APIs & Services > OAuth consent screen.
- Select External and click Create.
- Fill in:

  • App name: youtubeAutoPost
  • User support email: Your email.
  • Developer contact information: Your email.
- Under Scopes, ensure https://www.googleapis.com/auth/youtube.upload is included.
- Under Test users, add the Google account email you’ll use for YouTube uploads to avoid the "Access blocked" error.
- Save and set to Testing mode.

1.5 Verify Your YouTube Account (Optional)

- For videos longer than 15 minutes, verify your YouTube account at YouTube Verification.
- See YouTube Upload Guidelines.

Step 2: Install the Odoo Addon

2.1 Install Python Dependencies

Run in your Odoo Python environment:

pip install google-api-python-client google-auth-oauthlib google-auth-httplib2

2.2 Install the Addon

- Copy the youtube_auto_post addon folder to your custom addons directory (e.g., /path/to/custom/addons/youtube_auto_post).
- Alternatively, scaffold the module:

cd /path/to/odoo
./odoo-bin scaffold youtube_auto_post /path/to/custom/addons
Replace generated files with provided addon files. See Odoo Module Development.
- Create a static/ folder:
mkdir -p /path/to/custom/addons/youtube_auto_post/static
chmod -R u+w /path/to/custom/addons/youtube_auto_post/static

2.3 Update Odoo Configuration

Edit odoo.conf:

[options]
addons_path = /path/to/odoo/addons,/path/to/custom/addons

2.4 Install in Odoo

- Start/restart Odoo:

./odoo-bin -c /path/to/odoo.conf
- Enable Developer Mode (Settings > Activate the developer mode).
- Go to Apps > Update Apps List, search for YouTube Video Auto Posting, and click Install or Upgrade.

Step 3: Configure the Addon in Odoo

3.1 Upload client_secrets.json

- Log in as an admin user (base.group_system permissions).
- Go to Settings > YouTube API Settings.
- Upload the client_secrets.json file (from Google Cloud Console) in the Client Secrets JSON field.
- Save the record.

3.2 Authenticate with YouTube

- Go to Website > Configuration > YouTube Uploads.
- Create a new record and fill in:

  • Title: Video title for YouTube.
  • Description: Optional description.
  • Tags: Comma-separated (e.g., video,odoo,automation).
  • Category: Select a category (e.g., People & Blogs). See YouTube Video Categories.
  • Privacy Status: public, private, or unlisted.
  • Video File: Attach an MP4, MOV, or AVI file.
  • Schedule Date: Optional date/time for scheduled uploads.
- Click Upload Now.
- A browser window will open for OAuth authentication. Sign in with the Google account added as a test user (Step 1.4) and authorize the app.
- The addon generates token_youtube_v3.pickle in youtube_auto_post/static/.

3.3 Configure the Scheduler

- The cron job runs every 15 minutes to process scheduled uploads.
- Adjust the schedule in Settings > Technical > Automation > Scheduled Actions under YouTube Video Upload.

Step 4: Use the Addon

4.1 Manual Upload

- Create a record in YouTube Uploads, attach a video, and click Upload Now.
- Check the YouTube Video ID and Status fields.

4.2 Scheduled Upload

- Set a Schedule Date, click Schedule Upload, and wait for the cron job.
- Verify the upload via YouTube Video ID and Status.

4.3 View on YouTube

- Access the video at https://www.youtube.com/watch?v=VIDEO_ID.

Troubleshooting

Common Issues

  • "Access blocked: youtubeAutoPost has not completed the Google verification process":
    - Add the Google account as a test user in Google Cloud Console > OAuth consent screen > Test users.
    - Delete token_youtube_v3.pickle:
    rm /path/to/custom/addons/youtube_auto_post/static/token_youtube_v3.pickle
  • No .pickle File:
    - Verify client_secrets.json is uploaded in YouTube API Settings.
    - Check permissions:
    chmod -R u+w /path/to/custom/addons/youtube_auto_post/static
  • File Format Errors: Ensure videos are MP4, MOV, or AVI.
  • Quota Limits: Uploads use ~1,600 units of 10,000 daily quota. Request an increase at Google Cloud Console. See YouTube API Quota.
  • Cron Not Running: Verify the scheduled action in Settings > Technical > Scheduled Actions.

Debugging

- Check Odoo logs:

./odoo-bin -c /path/to/odoo.conf --log-level=debug
- Ensure YouTube Data API is enabled in Google Cloud Console.

Security Notes

- Protect token_youtube_v3.pickle:

chmod 600 /path/to/custom/addons/youtube_auto_post/static/token_youtube_v3.pickle
- Restrict client_secrets.json access to admin users in Odoo.
- Ensure the static/ folder is not publicly accessible.

Additional Notes

  • Video Length: Up to 12 hours or 256 GB if verified at YouTube Verification.
  • Production Use: Submit for Google verification in Google Cloud Console. See Google API Verification.
  • Customization: Extend the addon for additional features. See Odoo Module Development.
  • Support: Visit YouTube Data API Documentation or Odoo Community Forums.

Created by https://devscodespace.com/

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with