Hey there,
Power Automate is a bit easier than that, here's a template that could be leveraged.
However it would be much better to use a Microsoft List solution in this case and then leverage power automate. The reason is because of the Trigger.
With SharePoint, you can set the trigger to automated based off create/update event in the list, then have it perform the check and send the email. You wouldn't need the variables or the table above, just a condition check on the data entered. Could look something like this, so you get a sense of how much simpler it could be.
You can even create the list and ingest the data via SharePoint :)