I want to create a filter for all email sent by me only to me.

I do that because when I have a note that I want to remember, I send it to myself. I want to label all those notes so I can find them easily.

15 Answers 15


To search for email sent only to you and not to a mailing list, for example, you have to add the following to the search box (and then you can create a filter using that search; there is a link in the expanded search box that says "Create filter >>" or something):

To:me AND -*

This means it'll search for email sent to "me" (that's you) and not to everybody else (including you) (that's *), but the first part (i.e., To:me) overrides that.


This new answer works if one of the other recipients has a top level domain that is common-ish and different from yours.

Aaron's answer appears not to work, for two reasons. The first is that google does not implement wild cards in gmail (Wildcard search in Gmail). The second reason is that, from experience, I find the search considers BOTH conjuncts, to:me and, say, -to:com. It's easy to check by entering to:me -to:com in the search bar, and finding that nothing sent to your gmail.com address is there.

From the question I linked above we know that you need to search tokens; e.g., top level domains like .com and .org. But we know we can't just do

to:me to:(-com -org -edu -gov -uk -net -ca -de -jp -fr -au -us -ru -ch -it -nl -se -no -es -mil)

As an aside, don't try and putting ALL top level domains in, as the search will be rejected for length. I got the above list from This blog post about common TLDs.

There is one more thing to deal with, and that is the empty to: field. My work around is to use is:important to limit the intrusion of these. Gmail complained when I tried to make a filter with this flag, but it did properly filter a new (important) email to me.

So, we come to my answer, where my own top level domains are .com and .uk (.ac.uk, but the .uk is a token in itself):

is:important to:((-com OR me) -coop -org -edu -gov (-uk OR me) -net -ca -de -jp -fr -au -us -ru -ch -it -nl -se -no -es -mil)

This enforces the following two properties: 1. Emails to anyone with a listed domain different from yours are rejected 2. If an email has one of your domains, it must be (at least) to you.

In a similar manner, you can add specific email addresses that you commonly receive email together with you by adding something like -<[email protected]>


In the To field, use me -*. This could also be broken out in the other fields with to:me to:-*.

Here's a thread on Google's help forum..

  • Do you have a link to documentation of this feature by any chance?
    – Senseful
    Aug 2, 2010 at 22:58
  • @Senseful, Unfortunately I don't. It is just something I tried. I did some searching and found a link that is somewhat helpful. Edited my post to include it. Aug 2, 2010 at 23:32
  • 1
    I get the to:me part, but it doesn't seem like the -* part does anything (i.e. I get the same results with and without it). Does it show different results for you?
    – Senseful
    Aug 2, 2010 at 23:40
  • I believe the second example should be to:me -to:*. However, the search doesn't seem to exclude messages sent to a list of addresses.
    – dgw
    Aug 3, 2010 at 0:02
  • 1
    to:me to:-* and to:me -to:* seem to give me the same results. Aug 3, 2010 at 0:10

Try replacing -* with a couple of common email addresses in the heavy emailers list. something like this might work to:(me -*@aol.com)

  • 1
    A set of custom filters helped me to remove the generic email. However, -*@aol.com doesn't seem to work any more. Aug 8, 2017 at 13:55

When creating the filter, can you put your email address in the from field and in the to field. I just tried this and it only includes emails that I've sent to myself.

Here is some of the help on Gmail's search (somewhat unrelated): http://mail.google.com/support/bin/answer.py?hl=en&answer=6593

  • 2
    That will also match mails you sent to yourself and to someone else, which is not what the OP wanted. Jul 29, 2016 at 12:06

Since we're talking about Gmail...

I use a lesser known feature of Gmail combined with a filter to accomplish this:

The feature is that Gmail (personal) supports any number of . in the address.

So if my email address is [email protected] then sending mail to all of the following permutations (and many more) will still go to [email protected]


[email protected]
[email protected]
[email protected]
[email protected]

You get the idea.

Your request:

I want to create a filter for all email sent by me only to me.

To accomplish this I send all these "notes" to a permutation that I know no one else uses. E.g. [email protected]

The filter I set up is very simple after that

  To:[email protected]

Note: I also use this trick to filter email when signing up for questionable sites by signing up with a permutation I can filter straight to trash

You'll note from the blog that there is a similar Gmail feature that is more straightforward. I could use `[email protected]' and now the filter is obvious and easier to remember.

To sum up:

  1. send these notes to a specific alias [email protected]
  2. create to: filters for these special alias permutations

Try this simple solution:

to:me -{cc:me} 

My solution:

  1. create a Google script in a project, using Gmail classes (https://developers.google.com/apps-script/reference/gmail/ to get the mails. Iterate through the GmailThreads and check for the getTo() mail addresses
  2. Check, if this is only one recipient and if it is your mail address
  3. If yes, label this mail by a special (user) label. Use addLabel() in GmailThread class
  4. run the script periodically - let's say once per hour
  5. filter your inbox mails by the special label set in the script. Bingo!
  • I have implemented this, see my answer.
    – thdox
    Jul 30, 2019 at 9:21

I have implemented a solution in Google App Script. Basically, this is very close to the solution proposed by @Christian Krüger.

The pre-requisite is to create the label 'meonly' (I could have done it programmaticaly, but for readability I did not put it below).

Here is the Google App Script code:

function to_me_only()
  var search = 'to:me -is:chats in:inbox -label:meonly';

  try {
    var label = GmailApp.getUserLabelByName('meonly');
    var threads = GmailApp.search(search);
    var gmailMessages = GmailApp.getMessagesForThreads(threads);

    for(var i=0; i<threads.length; i++) {
      var messagesForThread = gmailMessages[i];
      for(var j=0; j<messagesForThread.length; j++) {
        var messageTo = messagesForThread[j].getTo()
        if(   messageTo.toLowerCase()=='"lastname, firstname" <[email protected]>'
           || messageTo.toLowerCase()=='"firstname.lastname" <[email protected]>'
           || messageTo.toLowerCase()=='firstname lastname <[email protected]>'
           || messageTo.toLowerCase()=='[email protected]'
           || messageTo.toLowerCase()=='<[email protected]>'){
  } catch (e) {

I have then created a trigger to execute the above code every 5 minutes.


I think it should work with below filter in "Includes the word" below line. I have tested this sending mail from other mail ID, and now I am putting same on live filter to check if everything is working fine.

to:[email protected] -{cc:[email protected]}

it's simple......

create a filter like this, click on the arrow for the advanced search options

Show search options

You will reveal the advanced search features, type from:[email protected] in the "includes the words" field and click "create filter with this search". You will have to create a label when you go to the next screen

example of where the filter goes

follow the prompts and thats it.

  • Or you could just type your email address in the from field, the problem here is everyone is thinking the wrong way, you don't make the filter using to: you have to use from:
    – Peter
    Feb 11, 2018 at 4:56
  • 2
    Wouldn't this find all the messages sent from "[email protected]"? The question was about finding the messages sent from "from:[email protected]" to "from:[email protected]" only.
    – user135384
    Feb 12, 2018 at 2:31

I gave up on filters but this works:

  • Select your Sent Mail.

  • In the search box, enter to: me.

to:me AND from:me 

Works very well.

  • 3
    That will also show email that's sent to me and 3 other people. It won't limit the results to email only sent to me. Thanks any way. Feb 7, 2016 at 6:01

It can be done by using -> To: me is: important where To is a field you will find it in settings while creating a new filter. No brackets nothing simply write me is: important in To field.(ignore the error & proceed)

  • This doesn't address the question.
    – Folk
    Nov 10, 2016 at 21:01

Use your complete address after to: instead of to:me and you'll get better results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.