title: How can i add variable value to sendgrid mail body in python
body: <p>#in the below &quot;html_content&quot; i want to display variance_count_gw value,  duplicate_count_gw  which #will vary.</p>
  <pre><code>variance_count_gw = 3100
  duplicate_count_gw = 200
  
  # If variance_count greater than 3000 or duplicate_count greater than 1000, then trigger mail
  
  import os, requests, urllib, json
  from sendgrid import SendGridAPIClient
  from sendgrid.helpers.mail import Mail
  
  message = Mail(
      from_email='a@xyz.com',
      to_emails=['b@ght.com'],
      subject='Variance/Duplicate count status',
      html_content='&lt;strong&gt;here it should be 3100 and 200&lt;/strong&gt;')
  
  sg = SendGridAPIClient('value') 
  
  
  if variance_count_gw &gt; 3000 or duplicate_count_gw &gt; 1000 :
        sg.send(message)
  </code></pre>