How to detect flag inside data table

sounds like we can use data scraper tool (extract data)

For the icon occurrence we can react on the icon src attribute. Have a look here: