I wrote a script that does the job for you
I’d be glad to help you otherwise, I wrote the firewall documentation update for nftables.