HTML Builder

HTML Builder: AI Prompt Workflow

5 min read

The HTML Builder includes an AI Prompt helper. You describe what you want, Notifal builds a detailed prompt, you paste that prompt into an external AI tool (ChatGPT, Claude, etc.), then paste the returned HTML back into the builder.

You stay in control: Notifal does not call AI services directly. You choose which AI tool to use.

New to the builder itself? Start with Creating a Template with the HTML Builder.

When AI helps most

SituationAI workflow helps
You know the goal but not the HTMLYes
You want a starting layout fastYes
You already have finished HTMLUse I have HTML instead (no AI needed)
You use Elementor or blocksTry those editors: Block Editor or Elementor

Step 1: Open the AI Prompt panel

From the HTML Builder:

  1. Click AI Prompt in the top toolbar, or
  2. On the welcome screen, click Generate with AI

The AI form opens with fields to describe your notification.

Step 2: Pick layout and use case (optional)

These choices guide the AI toward the right shape and copy style.

Display layout

LayoutBest for
Floating Side BoxQuick messages, social proof sliding in from the side
Popup (Modal)Forms, important offers, center-screen focus
Floating Bar (Top Bar)Site-wide announcements, promo strips

Full details: HTML Builder: Layouts and Use Cases.

Use case

Pick the goal closest to yours, for example:

  • Increase Sales
  • Grow Email List
  • Build Trust and Social Proof
  • Recover or Retain Visitors
  • Prevent Cart Abandonment

Each use case includes guidance text that shapes the AI's tone and call-to-action.

Step 3: Load a pattern example (optional)

Click Load example to fill the form with a starter pattern. Notifal includes patterns such as:

PatternLayoutUse case
Popup for cart recoveryPopupRecover or retain visitors
Side box for social proofFloating Side BoxBuild trust and social proof
Top bar announcementFloating BarGrow email list
Popup for discountPopupIncrease sales
Side box for contactFloating Side BoxCommunicate with visitors
Multi-step opt-in popupPopupGrow email list

Patterns are starting points. Edit the fields to match your brand.

Step 4: Fill in your details

FieldWhat to write
IndustryYour business type (e.g., fashion store, SaaS, restaurant)
GoalWhat the notification should achieve (be specific)
Primary colorYour brand color (used in the AI design)

The more specific your goal, the better the AI result.

Step 5: Copy the prompt and run it in your AI tool

  1. Click Copy prompt in the builder.
  2. Open ChatGPT, Claude, or another AI chat tool.
  3. Paste the prompt and send it.
  4. Wait for the AI to return HTML.

The prompt tells the AI to output a notification fragment only (no full page), with Notifal-friendly classes like notifal-action-button and notifal-close-button. See HTML Builder: Buttons, Close Icon, and Click Tracking.

The AI may also suggest Notifal notification settings (timing, display rules, appearance). Use those as ideas when you configure the notification later.

Step 6: Paste HTML into the builder

  1. Copy the HTML the AI returned.
  2. In the HTML Builder, open the paste dialog (I have HTML or View HTML).
  3. Paste the code and click Load HTML.
  4. Review the design in the canvas. Adjust styles in the right panel if needed.
  5. Click Save or Publish.
Tip: If the AI included <!DOCTYPE> or <body> tags, remove them. Only the inner notification markup should be pasted.

Step 7: Add tags and assign to a notification

  1. Click Insert Tag to add dynamic text like {product_name} or {cart_total}.
  2. Save the template.
  3. Assign it to a notification under Notifal → OnPage Notifications.

For WooCommerce tags, enable them in Settings → Tags first. See WooCommerce Setup for Notifal.

AI output and import JSON (advanced)

The AI prompt can also describe a full notification export (template plus settings) in JSON format. That format is mainly used when generating complete notifications from the OnPage Notifications screen, not only a standalone HTML template.

For HTML Builder work, you typically need only the HTML fragment from the AI response.

Troubleshooting

ProblemWhat to try
AI returned a full web pageRemove <html>, <head>, and <body>. Keep only the notification markup and <style> block.
Buttons do not workConfirm the HTML uses notifal-action-button and notifal-close-button classes.
Styles look wrong on siteAvoid position: fixed or z-index in your CSS. Notifal handles placement. See HTML Sanitization and Allowed HTML.
Tags show as plain textInsert tags via Insert Tag or type them exactly, e.g. {product_name}.

Checklist

  • [ ] Opened AI Prompt in the HTML Builder
  • [ ] Chose layout and use case (or loaded a pattern)
  • [ ] Filled industry, goal, and primary color
  • [ ] Copied prompt to external AI and received HTML
  • [ ] Pasted HTML fragment into the builder (no full page wrapper)
  • [ ] Added tags, saved, and assigned template to a notification

What to read next

HTML Builder series

  1. Creating a Template with the HTML Builder
  2. HTML Builder: Buttons, Close Icon, and Click Tracking
  3. HTML Builder: AI Prompt Workflow (you are here)
  4. HTML Builder: Layouts and Use Cases
  5. HTML Sanitization and Allowed HTML

Other template editors