I’m working on a Gmail extension and need to automatically add certain email addresses to the safe sender list or trusted contacts. I want users to be able to mark specific senders as safe so their emails never go to spam. Is there a way to do this programmatically through Gmail’s API or add-on framework? I’ve been looking through the documentation but can’t find a clear method to manage the whitelist or safe sender settings. Any help would be great since this feature is really important for my project.
yeah, that’s super frustrating! oscar’s workaround with filters is solid. also, if u need more control, labels with auto-forwarding might help. just make sure to check out google’s extension policies first—they’re strict on anything messing with spam and security stuff!
Gmail doesn’t let you modify the safe sender list through their API - ran into this exact problem last year building something similar. Their API locks down spam management features, probably for security reasons. I worked around it using filters instead. You can use the Gmail API to create filters that auto-label emails from specific senders or move them straight to the inbox. It’s not technically the same as the safe sender list, but it does the job by keeping important emails out of spam. The filters API lets you set up rules based on sender addresses - probably your best bet for what you’re trying to do.