billster Posted August 5, 2022 Posted August 5, 2022 Hi all, I would hope if you could help me figure out a regex to set up a =====respond to email above this line===== regex rule. I've set up an incoming rule that automatically updates the ticket in question, however, each time you email it then it would update the whole ticket with the whole email thread over and over again. How do I make it so it cuts off the old responses and only updates the ticket with the new responses? I tried to create this regex, but for some reason it doesn't work in Hornbill. ^.*(?=\n=====respond to email above this line=====) https://regex101.com/r/wYeCS3/1
Steve Giller Posted August 5, 2022 Posted August 5, 2022 If I'm understanding what you're doing (and I'm not an expert at regex) this https://regex101.com/r/FIDaEc/1 might show you why you're getting unexpected results.
SamS Posted August 5, 2022 Posted August 5, 2022 Hi @billster, ASSUMING you are using this in the BP, there are a couple of things you need to know. The engine behind the scenes is ECMAScript and the RegEx you are likely going to want is: ([.\s\S]*)^=====respond to email above this line=====$ With the following flags: gm
billster Posted August 8, 2022 Author Posted August 8, 2022 On 8/5/2022 at 5:24 PM, SamS said: Hi @billster, ASSUMING you are using this in the BP, there are a couple of things you need to know. The engine behind the scenes is ECMAScript and the RegEx you are likely going to want is: ([.\s\S]*)^=====respond to email above this line=====$ With the following flags: gm Hi @SamS I was using this in the email routing rule but seems not to do anything, so I'm thinking it isn't entirely possible to filter out old responses in emails threads. Although, I think I have found a bug. If I create an email routing rule and change 'use operation' to OFF then save and reload the web page it is still showing as 'ON' and the rule isn't actually turned off. Thanks
Steve Giller Posted August 8, 2022 Posted August 8, 2022 38 minutes ago, billster said: Hi @SamS I was using this in the email routing rule but seems not to do anything What are you expecting it to do? REGEX_MATCH will return true or false depending on whether it finds a match. It will not do anything else. Routing Rules do not manipulate the email, they simply perform the required operation (move to folder, raise request etc.) if the expression matches and pass the email to the next rule if it doesn't.
Victor Posted August 9, 2022 Posted August 9, 2022 On 8/5/2022 at 4:09 PM, billster said: How do I make it so it cuts off the old responses and only updates the ticket with the new responses? @billster you cannot, the autoresponder does not have such functionality. As Steve advised, autoresponder will simply raise or update a request without any changes to the email content that will end up in the request. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now