Prevent Outlook with Gmail IMAP from Showing Duplicate Tasks in the To-Do Bar
If you are using Outlook with Gmail over IMAP, you might have noticed a really annoying problem: if you flag an email in Outlook, or use the Star feature in Gmail, you’ll often end up with duplicate items in the To-Do bar.
The reason this happens is because Gmail’s IMAP shows the same item in multiple folders, for instance when you’ve labeled an email it will show up in the label folder as well as All Mail and the Inbox, even though it’s the same email. Outlook can’t tell the difference.
The fix is to tell the To-Do bar to ignore any tasks that are in other folders other than All Mail.
Fixing Duplicate Flagged Items
Right-click anywhere in the To-Do pane’s task area, and then choose Filter from the menu:
Choose the Advanced tab, and then add a new rule by manually typing in the values into the fields:
- Field: In Folder
- Value: All Mail
Make sure you type them in exactly (note that you can navigate the menu to find the “In Folder” item), and once you are done click on the Add to List button before you leave this screen.
Make sure that your list now contains the new item before you click the OK button:
Note: If you have more than one mail account and also flag messages in those, you will need to add an extra rule for including those folders as well. Alternatively you could block only certain folders using this method.
You’ll probably have to do a Send/Receive before the items disappear from the list.
You could also exclude items from All Mail by reversing the condition to exclude instead.

Daily Email Updates
You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Fantastic! I’ve been annoyed by this ever since the first day IMAP for Gmail was released. Thanks for the article! (Now…if I could only get Outlook to enable the “Today,” “Tomorrow,” “Next Week,” etc. flags for messages in an IMAP inbox…I’d be a happy man.)
This is great, is there a way to make this work for the calendar?
Great tip. As always, simple is best. I took cue from this and blogged about this on my blog as well.
I tried this and made one change that seemed to help. Instead of putting in “All Mail,” I put in “Inbox.” This will match the inbox folders on both of my gmail accounts and my corporate Exchange email Inbox, while still preventing duplicates.
@David,
Nice adaptation, glad it works for you.
The reason why I didn’t use Inbox in my filter is because I always label and archive messages out of my inbox, so my inbox is always clear. I have two gmail imap accounts in Outlook, so All Mail matches both of them… so my todo list shows starred items across both. Useful!
Bizarre. My wife asked me about this last night! She’s just getting on the IMAP bandwagon, since she’s got multiple machines to sync now. This will be a lifesaver.
I tried adding the filter you suggest above, but I still get multiple tasks when I flag emails which have been automatically labelled by Gmail. Any other suggestions how I can stop this?
I am using Outlook 2007 with Gmail via IMAP.
A better way would be to just clear all of the default filters, and set it to
Categories is not empty
especially if you are synching with a Blackberry or some other pda and need your tasks to show up.
That method posted keeps my real tasks from showing too. This one shows my real tasks and hides the dupes and all of the ones made my Gmail.
Another way to do what calyx suggests is add another rule:
In Folder contains Tasks
This will allow you to see all of your outlook tasks as well as flagged email (without duplicates).
When I add the Inbox all tasks go away. What am I missing?
I am having a problem with tasks that I manually create. They are duplicating even on the calender. This solution takes them off the to-do list but doesn’t stop the duplication. What can it be?
None of the suggestions above exactly met my needs because they messed with the default behavior of the To Do list. In other words, they blocked normal tasks or contacts or managed to show completed tasks.
This one works for me so far: Leave the default filters as they are and block all items in the All Mail folder AND in the Starred folder. These folders seemed to be generating most of the duplicates – now I just get my flagged items from the Inbox or whatever other folder they happen to be in.
Achieving it is a little tricky because Outlook seems to want to use OR as the default operator when you choose two conditions for the same field (In Folder). First create your conditions the click on the SQL tab and tick the box to allow editing the SQL directly. Find the word OR and replace it with AND.
HTH!
Fi
D’oh! That last line shouldn’t have been there!
Me again. Having found your excellent Outlook 2007 and Gmail IMAP tutorial earlier today I think I’m starting to get to grips with it!
This is my first experience with either Outlook 2007 or IMAP but I think I have another solution… there’s no need to alter any filters, simply unsubscribe from the All Mail and Starred folders. Unless I’m mistaken this will also reduce the time taken to perform a send/receive.
Go to the SQL tab, check the box and use this:
(”http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/810f0040″ IS NULL AND “http://schemas.microsoft.com/mapi/proptag/0×10910040″ IS NULL AND (”http://schemas.microsoft.com/mapi/proptag/0×0e05001f” ‘All Mail’ AND “http://schemas.microsoft.com/mapi/proptag/0×0e05001f” ‘Starred’))
I have the same problem as Lance:
“lance
When I add the Inbox all tasks go away. What am I missing?”
I don’t see a response…
Same problem as Lance and Loretta. When I add the Inbox all tasks go away. Solution, please?
This is fantastic! Many Thanks! I’ve been wondering about this for a while!
If your tasks are also being removed, have a look at the post by Elijah Buck before asking for help! Worked for me!
Jerrie / loretta,
Add another filter
“In Folder contains Tasks”
@Dave
Thanks for pointing the ability to edit the SQL query manually. Saved me (and anyone else who organizes their exchange mail in addition to IMAP folders) a huge headache.
Works for me! Thanks a ton!
Excellent… Nice Simple fix, worked like a charm.
Top Banana
I tried everything but editing the SQL code – shudder and still have duplicate Tasks.
Either, nothing happened or everythng became “completed” with line through or all tasks disappeared.
Still have duplicate tasks.
I’ve only used Gmail a few months ago … I’m not aware of Gmail Tasks and don’t use them. I do read – not edit – my Gmail Calendar.
Any ideas?
VA
You rock… that was so annoying!
I’ve found it much better to filter on the “Starred” folder instead. That way if you change the flag on a Gmail email in Outlook, GMail will properly remove the “star” tag from its own list. The now-unflagged email will then properly propogate down in all of your Outlook subfolders for Gmail.
This help page has been very useful for me… except when I have to reboot Outlook. My filters refuse to save so any time my computer reboots or I have to reopen Outlook for some reason, the duplicate items are in my to-do bar again. When I go back to the filter, it will lack the lines I added. Why is this happening and how can I get it to stick with the filter settings?
I have added a computer so now I have two. I would like the same email to come in on both computers. I get some email on one and some on the other. I use outlook. How do I correct this?