MySQL/MariaDB NOT IN Statement Not Working With Array

You cannot use IN and NOT IN like that directly in a custom query.
This has been discussed in a few topics already, for example GET array for use with IN clause of custom query action

2 Likes