I sell an online program on WP with LearnDash part of which is a community. So was really delighted to find PeerBoard. And I wanted to create an automatic way of sending those who buy my course an invite link to a private community.
So I created a Zap that sends automatically invite emails to those who purchase my program. You can copy it from here if you're interested: https://zapier.com/shared/4bea475092c4a17a4b309eb9589a961fc6cf91c7
You could probably adapt it to any other app that hosts your online course (e.g. Teachable, LearnPress)