Selecting *which* alerts get sent to team-ops-genie is in the part of the config which you haven't shown - the "routes" section. You can filter alerts which match particular criteria, such as particular values or patterns of labels.
As for the 422 result, maybe it's to do with the loop in priority. If there are two alerts in the group it might expand to "P1P1" or "P1P3" for example.
You'll have to decide how to deal with this. One option is to look at only .Alerts[0], assuming that all alerts in the group have the same severity. But I think it's cleaner to make separate receivers:
- name: 'team-ops-genie-critical'
opsgenie_configs:
- send_resolved: true
teams: Operations
priority: P1
- name: 'team-ops-genie-warning'
opsgenie_configs:
- send_resolved: true
teams: Operations
and use your routing rules to deliver alerts to the appropriate receiver. (I have left out your 'tags' expression because I don't think that will work well as written when there are multiple alerts in the group)