This one gets fairly technical. But if you are comfortable with running python from the command line and setting up a cron job then you can easily setup a tab in Planning Center Publisher that will display the latest 10-15 videos from your Church Youtube Channel.
This is a simple script to publish a youtube channel's latest 10 videos to a Planning Center Publishing page. It's the latest 10 videos because I've noticed instability with the Church Center App when adding more videos. The configuration for your youtube channel and the page you want to publish to is in the .env file. The Slug and Title will be created if it doesn't exist.
It takes a youtube channel like this:
And turns it into a Church Center page like this:
- Download the files: pco-youtube-publisher
- In the pco-youtube-publishing directory edit the .env file with your settings:
LIVE_EMBED_CODE=<h1>Live</h1><iframe src="https://vimeo.com/event/174541/embed" width="560" height="315" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
- Get your youtube channel ID here https://www.youtube.com/account_advanced
- Get your Planning Center Personal API Key here https://api.planningcenteronline.com/oauth/applications
- If you add embed code for your live stream then it will post this video embed as the first in the list. We use vimeo and it has an option for reoccuring event. So our event embed doesn't change and when it's not live it just shows upcoming:
- The LIVE_DAY is the day of the week for the LIVE_EMBED_CODE to show. 6 is Sunday.
- You need Python 3.8 or greater
- Setup a python virtual environment (Optional) Linux python3.8 -m venv ./venv
- Activate python virtual environment Linux source ./venv/bin/activate
- Install requirements pip install -r requirements.txt
- Run the script python3 pco-youtube-publisher.py
- I've provided update.sh as a simple script to use for running this as a cron job.
- You just need to edit the path's in the update.sh. They need to be full directories since cron doesn't run as user.
Get all the files in a zipfile: Download pco-youtube-publisher
If you'd like to contribute to the code pull requests are welcome!: Github-pco-youtube-publisher