@Anna5 Great catch, and thanks for actually testing it! You’ve identified a real limitation of the WordPress REST API.
The /wp/v2/users?search= parameter in WordPress does not search by email address. By design, WordPress intentionally restricts email-based user lookup via the REST API for privacy and security reasons. Even authenticated requests with an Application Password won’t change that behavior.
Here are your two best options:
Option 1: Query MySQL directly (simplest for your setup)
Since you already have MySQL connected in your n8n workflow, this is actually the cleanest path. You can query the wp_users table directly:
SELECT ID, user_login, user_email, display_name
FROM wp_users
WHERE user_email = '{{ $json.email }}'
LIMIT 1;
Then if you need subscription/meta data, query wp_usermeta with the returned ID. This is fast, reliable, and doesn’t need any plugin.
Option 2: Custom WordPress REST endpoint (more proper but more work)
You’d add a small snippet to your theme’s functions.php or a custom plugin that registers a new endpoint like /wp-json/myplugin/v1/user-by-email?email=test@example.com. This is the “proper” API approach but requires touching your WordPress code.
For most n8n automation use cases, Option 1 (direct MySQL query) is simpler and faster to implement, especially since the database connection is already there.
Hope that unblocks you! If you go with the MySQL approach and run into issues with the usermeta query for subscription data, feel free to share the query and I can help fine-tune it. If this solves your problem, feel free to mark it as Solution!