How to send emails in same exact format/design every time?

I am running a workflow that sends out an email as its final output. Is there a way to ensure each email is formatted/designed exactly the same each time I run the automation?

Right now I am using an Ask AI node to reformat the information in pure HTML, but each time I run the automation the email has a slightly different format. I am looking for it to be exactly the same format every time.

Any feedback is much appreciated!

1 Like

Hi there!

You’re on the right track, but you’ll want to use the AskAI node a bit differently here. Instead, take your single HTML block and use that in the prompt, instructing the AI to fill and replace the relevant areas.

This keeps your AI node from coming up with a new template each time and instead has it intelligently replace relevant templated fields in your HTML email


Example of this in practice and simple prompt using a basic HTML email template:

Update the following template with the relevant items. Only return valid HTML. Only output valid HTML as this will be sent directly as an email:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Weekly Update</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: Arial, sans-serif;
      background-color: #f5f9fc;
    }
    .container {
      width: 100%;
      padding: 20px;
      background-color: #f5f9fc;
    }
    .email-body {
      max-width: 600px;
      margin: 0 auto;
      background-color: #ffffff;
      border-radius: 8px;
      overflow: hidden;
    }
    .header {
      background-color: #3B5998;
      color: #ffffff;
      padding: 20px;
      font-size: 24px;
      text-align: center;
      font-weight: bold;
    }
    .content {
      padding: 20px;
      color: #333333;
    }
    .section-title {
      color: #3B5998;
      font-size: 18px;
      margin-top: 30px;
      margin-bottom: 10px;
    }
    .footer {
      background-color: #3B5998;
      color: #ffffff;
      text-align: center;
      font-size: 12px;
      padding: 10px;
    }
    p, ul {
      margin: 0 0 15px 0;
      line-height: 1.5;
    }
    ul {
      padding-left: 20px;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="email-body">
      <!-- Header section -->
      <div class="header">
        <!-- Replace with your company or email title -->
        Weekly Update
      </div>

      <!-- Main content section -->
      <div class="content">
        <p>Hello [Recipient/Team Name],</p>
        <p>[Introductory greeting or paragraph]</p>

        <h2 class="section-title">Highlights</h2>
        <ul>
          <li>[Highlight 1]</li>
          <li>[Highlight 2]</li>
          <li>[Highlight 3]</li>
        </ul>

        <h2 class="section-title">Upcoming Events</h2>
        <p>[Event details]</p>

        <h2 class="section-title">Action Items</h2>
        <p>[List or summary of important actions and next steps]</p>

        <p>[Closing remarks or sign-off]</p>
        <p>Best regards,<br>The [Your Organization] Team</p>
      </div>

      <!-- Footer section -->
      <div class="footer">
        <p>© [YEAR] [Your Organization Name]. All rights reserved.</p>
      </div>
    </div>
  </div>
</body>
</html>
3 Likes

Luis, I think I understand what you mean …
But … I have a combine text node in a flow which will act as the input for the prompt (see screenshot). How would your approach work in that case? As an extra Ask AI node ?

Yes a new AI node can work or you can merge the two combine text nodes using a third combine text node, connect that to the prompt and in the context add the HTML template.

Let me know if this makes sense.

1 Like

Hey, been trying to replicate this but Gummie send me this:

https://www.gumloop.com/pipeline?workbook_id=jy5q4FuTWZeQ1iZ1bDV8s7&tab=1&run_id=bi4cVGw2KzWBguq5B3zzei

This is my flow - https://www.gumloop.com/pipeline?workbook_id=jy5q4FuTWZeQ1iZ1bDV8s7&tab=1&run_id=bi4cVGw2KzWBguq5B3zzei
@Wasay-Gumloop what do I do wrong?

@Wasay-Gumloop Could you help me on this? Be well

Hey @Donna - There is a type mismatch issue here which is why the Ask AI node is failing. I made a quick loom to explain this: https://www.loom.com/share/ed9daa1bc5754f7b93e4af102c6d1b20?sid=968006ce-b7e6-4099-b5f0-439c73b0cf9a

Let me know if this makes sense.

Thanks Wasay, this one is a special case … thanks for the loom. Think it will be helpfull to lot of people!

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.