ShulzR,
Could you please show what your Workflow looks like in its entirety, as well as the full formula that is written in the Execute Formula Script Action?
Note about Post / Mentions - internal email client question
Collapse
X
-
ShulzR,
Please try to create a Workflow with Entity Type Note and Trigger Type After record created.
Select the Action Execute Formula Script and paste this formula:
Code:$crmURL = 'https://test.espocloud.com/#'; // change it to your instance URL with adding # character $parentId = entity\attribute('parentId'); $parentName = entity\attribute('parentName'); $parentType = entity\attribute('parentType'); $post = entity\attribute('post'); $createdByName = entity\attribute('createdBy.name'); $usernameCatch = string\match($post, '/@\S*/'); $username = string\substring($usernameCatch, 1); $usernameId = record\findOne('User', 'createdAt', 'desc', 'userName=', $username); $userEmailAddress = record\attribute('User', $usernameId, 'emailAddress'); $parentEntityAddress = string\concatenate($crmURL, $parentType, '/view/', $parentId); $body = string\concatenate('You have been mentioned by the user ', $createdByName, '. Post: ', $post, '. See in CRM: ', $parentEntityAddress); ifThen( string\contains($post, $usernameCatch), $id = record\create( 'Email', 'to', $userEmailAddress, 'subject', '[CRM] Mentions', 'body', $body, 'isHtml', true, 'status', 'Draft') ); ext\email\send($id);
You can change the body of email in the $body variable. But keep in mind that you can't do formatting this way (paragraphs, bold type, etc.).Last edited by lazovic; 09-30-2022, 11:25 AM.Leave a comment:
-
-
Note about Post / Mentions - internal email client question
Hi,
Users have the option selected in the preferences: Email notifications about mentions in posts.
They receive notifications to external e-mail clients, but the internal EspoCRM e-mail client does not have these e-mails. Why?
Is it possible somehow email about the post/mentions were also visible in the internal e-mail client?Tags: None
Leave a comment: