Manipulate text before sending an email

Hey Community,

me again :slight_smile:
This time with the question, if I can manipulate email content to be sent after agents clicket on “Send” but before it is actually sent?

Why?
We are using the Signature Mgmt App to add group-specific signatures.
We are unhappy with it because of three reasons:

  1. The app lags heavily - Sometimes it takes 5-8 seconds until the signature is added
  2. The app can only differentiate after products OR groups - We need additional criteria to determine the correct signature
  3. The signature is translated by the Freddy Live Translate feature, where we are part of the Beta program. As you could imagine, we don’t want/need the signature to be translated

Third argument is the most critical one - Freddy Live Translate translates the whole editor content. Therefore, I had the idea to not add a signature already when agents write their responses, but to add it after they have clicked on “Send” with a custom app.

This would keep the editor clean, would boost ticket performance and would not interfere with Live Translate.
I already tried to use the ticket.sendReply intercept event:

async function onReplySent(event) {
  await client.interface.trigger("setValue", {id: "editor", text: "add to reply", replace: false, position: "end"});
  event.helper.done();
}

I see the “add to reply” in the editor before Freshdesk is closing the editor, but it sends the reply without my change.

Is possible what I try to achieve?

Best
Tom