adizafri2000 / billscraper

Sample headless automation project to scrape bills, calculate monthly bill (rent + utilities) and generate a text message which is later sent to desired whatsapp recipients.
1 stars 0 forks source link

Whatsapp API service on Render #20

Open adizafri2000 opened 9 months ago

adizafri2000 commented 9 months ago

Study and test:

  1. Try to understand and setup whatsmeow
  2. Build Docker image, test, and push to DockerHub if successful.
  3. Create Render web service and deploy the Docker container and test
  4. Change API URLs in current automation script and test on GitHub actions.
  5. If all successful, create a GitHub actions to keep the Render service from stopping to prevent cold starts. May need to create a dummy API endpoint e.g api/health
adizafri2000 commented 8 months ago

try checking neonize also for python-native instead of Go

adizafri2000 commented 8 months ago

Implementing keep-alive mechanism using GitHub Actions workflow to curl API service on Render successful. Can refer to this workflow from another repository. Make sure to keep the cron scheduling between 10-14 mins.

adizafri2000 commented 8 months ago

Check out cloudflare workers

adizafri2000 commented 8 months ago

Keep-alive mechanism for Render can be implemented by:

  1. Deploy API service to render with a health-check endpoint (or any of relevance, e.g api/health)
  2. Create a cron job on cron-job.org to call the API at 5-minute intervals. Example
adizafri2000 commented 4 months ago

using whatsmeow, need to add this line after SendMessage in send.go

*message.Conversation = strings.ReplaceAll(*message.Conversation, "<br>", "\n")

then need to figure out how to pipe CLI commands from fastAPI (python) to send commands to whatsmeow service