Incoming Email - Append to DocType

Hello,

I would like to understand how I can add more DocTypes to the Incoming Email - Append to Option.

Currently I have ToDo, Leads, Oppurtunity, Job Applicants, Event, Communication and Issue.

I would like to be able to be able to Append to Warranty Claim or if possible learn how to append to any other DocType.

Thank You,
Vimal Tank

1 Like

When you create a new Email Account you need to check Enable Incoming in order to then select a DocType to append to. The description of that field says Append as communication against this DocType (must have fields, "Status", "Subject").

Looking at hooks.py in the apps/frappe shows a line email_append_to = ["Event", "ToDo", "Communication"] to which I added "Warranty Claim" and then it showed up after doing a bench update --patch:

Now I didn’t test this and the question is how you overwrite that array in the hooks.py, probably if you have your own app and have a hooks.py in which you overwrite the array that should work. You may then have to add the fields Status and Subject to the Warranty Claim DocType as custom fields.

I think this points you in the right direction, you will need to do some light coding as far as I see.

6 Likes

We want to import the emails but not all, we want to filter the emails and then append them to specific doctype, for example: opportunity. When searched I found this suggestion

But I could not find it in ErpNext’s current version, may I request someone to help us on this.

With regards,
PMD

Did anybody find this Condition field? I can’t find it either, but believe it can be very useful to clear off spam.

1 Like

Did anybody locate the conditional box for the Incoming emails?

Is there any update on the Condition field for Incoming Emails?

This conditional logic does not exist in v13 either.