Documentation is a work in progress. Here are links to most of the resources used.
http://stevenhickson.blogspot.com/2015/02/control-anything-electrical-with.html
Most useful tutorial
https://www.instructables.com/id/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/
https://docs.dataplicity.com/docs/control-gpios-using-rest-api
Use IFTTT.
IFTTT now requires payment. Google Assistant also started interpreting the command as smart fans which were not configured, overriding the configured key phrases.
The integration does not work anymore, just use the Telegram bot.
To make the Flask application accessible over the Internet when the Raspberry Pi is on a home network, configuring port forwarding on the home router is one possible solution.
However, this is not ideal as the home ISP might not assign a fixed IP address. This will then need to be addressed with additional tools like Dynamic DNS to keep a domain name pointed to the correct IP address.
Instead, it is possible to obtain a free virtual machine on Google Cloud Platform's (free tier)[https://cloud.google.com/free/docs/free-cloud-features], which provides a fixed IP for the domain name.
Follow the steps below to install nginx, and use certbot for automatically renewing a free SSL certificate from (Let's Encrypt)[https://letsencrypt.org/].
sudo apt install python3-pip
sudo pip3 install Flask
sudo pip3 install Flask-API
sudo pip3 install python-dotenv
sudo pip3 install uwsgi
sudo pip3 install python-telegram-bot
sudo apt install nginx
Install certbot.