Search code examples
xmlapirss

Get notified when an XML feed has a new item


I have a dynamic XML feed and I want to get notified by email (or Slack) every time a new item has been added to the feed. I really don't know where to start and which programming language would be best to achieve that. I know a little PHP but not very good. Any guidance is highly appreciated to get started!

I use Postman to see the data but I couldn't find any option to subscribe to updates from a URL. I also tried zapier but it said the the XML was not valid. (Here's the feed: https://www.semtrack.de/e?i=251918536fedf0b20164555a698a7a0afd0c6dfd).


Solution

  • Write a cron job that executes periodically a python script: Execute Python script via crontab

    The script should compare the current XML with the last XML with a diff tool e.g.: https://pypi.org/project/xmldiff/

    If there is a difference, send an email via python: How to send an email with Python?