Automatically add email from SalesInbox to Contact or Deal

Automatically add email from SalesInbox to Contact or Deal

We import our email from Outlook to SalesInbox. When an email comes in from someone in our Contacts, is there a way to have it automatically be attached to that Contact? If they are associated with a Deal, can it be automatically attached to that Deal?