Auto-response based on email ticket key-word

Hi everyone,

Thank you for this opportunity. I am new to RT and searching for information or example on creating an RT auto-response email if there is particular wording in the body of an email/ticket. Here is my thought process of what I know about particular emails we want to send a basic response to:

Email is received in RT 5
IF ticket is from a particular email address:
->SEARCH email body for a particular value
IF particular value is found:
->Send (automatically) a Canned Response email to sender in Reply-To field
Else do not send an email but add email/ticket to “Unowned Tickets” Queues

Some form of this automation has got to be somewhere, I imagine.
Thanks in advance.

Best Regards,


You can create a new scrip Admin->Scrips->Create.

Then you can select the condition module as “User defined”, the action as “Notify Requestors” and then pick an email template that has your autoreply content.

For the user defined condition something like this should get you started:

return unless $self->TransactionObj->Type eq 'Create';
return unless $self->TicketObj->Subject =~ /Some Subject We Are Looking For/;
return 1;

Thanks knation. I will look into this. So the extension ExtractCustomFieldValues is not needed?


I don’t believe so, for this example you aren’t setting any custom field values right?

I believe what you are suggesting would do. We need to search the incoming email body for a particular text/value, match it with a list of values in order to qualify the incoming email for an auto-response email via template.



You should try Text::NLP - Perl module for Natural Language Processing in RT automation scripts. This is much better, all you need to prepare meta data for match.

Thank you for the feedback. I will look around and hopefully find some examples of the Text::NLP module. It would be hard to believe that a regex key-word auto-response scenario has not been performed in RT.


1 Like