Whenever a lead is created via email there are two messages in the system:
System message that creates a lead
Message with type email that goes into discussion
I'd like to populate some fields based on the email content, but I find it hard to set up a condition that triggers it automatically.
Right now I have automated action on the CRM/Lead model which is triggered on a record update. I have to manually update a record to start this action. Action is not triggered by 2nd message (email).
I tried to set up another action on creation of mail.message record with filters on subject, type and email fields but it doesn't work at all.
What is the correct way to trigger actions based on email messages (in discussion)?