Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Adding basic CSS formatting to an email coming from a Workflow

(0) ShareShare
ReportReport
Posted on by 94
Hi 
 
I have been tasked with trying to add from basic formatting to the workflow emails in our D365 F&O system. I have previously created a static template for the missing timesheet email to users functionality within the system and the basic css/html I put into that template worked.
 
Unfortunately when I have tried to follow a simular method for the workflow emails the email just displays the css as plain text and I'm unsure if the hml is being read as it doesn't display as plain text or if its being stripped out.
 
I have tried to approaches so for. 
 
Approach one :
 
I place the css and html directly into the workflow email object (below is just a small part to give you the idea the body text box isn't expandable) :
 
//
 
the email lines then have a span around them example : <span class=/title/>workflow email line %dynamics  data%</span> 
 
Approach 2 :
 
I created a very simple html template and uploaded that to d365 under the system under the organisational email templates for this particular workflow including %message% so the workflow email body comes through like so :
 
//
 
In either instance I get the following email :
 
//
 
Any guidance on how to apply some formatting/styling into the emails for the workflows would be great.
 
Thanks in advance
Median
 
 
 
 
 
  • Suggested answer
    Median Profile Picture
    Median 94 on at
    Adding basic CSS formatting to an email coming from a Workflow
    Hi Kevin

    Thanks for your response.

    Unfortunately I have already reviewed the dynamics chronicles link you sent along with multiple others similar in nature. I can get a basic static email template in d365 to work with inline css however as I covered in my initial post this doesn't pull through when applied to the body of the email in the workflow. 

    I have a bad feeling this is only possible when working with static emails with no dynamics data, its why I tried the alternative approach of including the css in the template and including the html tags in the body when working within the workflow. But unfortunately this doesn't work either

    Median
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    Adding basic CSS formatting to an email coming from a Workflow
    Hi,
    Based on the problem you described, it seems that you want to ask questions about using CSS styles in electronic templates. There have been similar questions raised by users on the forum before, I found the corresponding post for you, the link is below, you can refer to it: Dynamics Community Forum Thread Details.
    Also, I found for you a blog on how to use CSS code in D365 email templates, here is the link: Using CSS code within D365 Email Template | Dynamics Chronicles (dynamics-chronicles.com)
    Finally, in my opinion, it seems that it can only use inline CSS, such as <p style="font-size: 16; font-weight: bold"> test</p> and not other forms of CSS code.
    Best regards,
    Kevin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,971 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,846 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans