I'm building an app using Firebase Notifications where a user can enter their zip code and then receive notifications for specific events happening in their locality.
How do I only send notifications to a specific user? I've tried including Zip Code in the Advanced Options sections of Firebase Notifications, but it still sends the notification to all users.
It seems you are trying to Send Notifications to a User Segment in the Firebase Console. However, it seems that the specific detail you're targeting is not an option that is available in the console.
As of right now, the only available User Segments you can send to are (these can be modified in the Target Section when Sending a Notification):
With the above being clear, I think the only way for you to send to those specific users in a specific Zip Code, you should be implementing the push from your server app, wherein you collect the users profiles with the corresponding Zip Code, and then push the messages to their registration tokens.
I think the links mentioned in this answer will help you:
Seems like Topics is what you are looking for. When the user enters their zipcode you can subscribe them to a topic eg: /topics/zip then you can send to the appropriate zipcode from the console. Subscribing will create the topic if it does not already exist.
Note: Topics can take up to 24 hours to show up in the console after they are created.