FortiSOAR Knowledge Base
FortiSOAR: Security Orchestration and Response software provides innovative case management, automation, and orchestration. It pulls together all of an organization's tools, helps unify operations, and reduce alert fatigue, context switching, and the mean time to respond to incidents.
Christopher_Carsey
Article Id 220062
To compose and send email from FortiSOAR, a conversion is needed form Markdown (FortiSOAR's richtext format) to HTML. Below is an example of playbook jinja that converts basic Markdown syntax to HTML. It can be extended to add additional markdown elements should they be required.


{{ 
  vars.markdownText
  | regex_replace('\#\#\#\s*(.*)', '<h3>\\1</h3>')
  | regex_replace('\#\#\s*(.*)', '<h2>\\1</h2>')
  | regex_replace('\#\s*(.*)', '<h1>\\1</h1>')
  | regex_replace('\*\*(.*?)\*\*', '<bold>\\1</bold>')
  | regex_replace('\*(.*?)\*', '<em>\\1</em>')
  | regex_replace('\~\~(.*?)\~\~', '<del>\\1</del>')
  | regex_replace('!\[image\]\((.*)\)', '<img src="\\1" />')
  | regex_replace('\[(.*)\]\((.*)\)', '<a href="\\2">\\1</a>')
  | replace('\n', '<br />')
}}
Contributors