HTML Builder: AI Prompt Best Practices and Examples
8 min read
The quality of AI-generated HTML depends on how well you fill the AI Prompt form. The most important field is Your notification goal. A short line like "show a popup" gives generic results. A detailed paragraph gives the AI enough context for copy, layout, tags, and buttons.
This guide shows how to write a strong goal and includes 10 ready-to-adapt examples for common scenarios.
> Floating side box for WooCommerce visitors on product pages. Social proof style: "Someone in {order_meta__billing_city} just bought {product_name}." Show product image on the left, text on the right. Primary button "View product" linking to the product. Include a close icon top-right. Clean white card, soft shadow, brand primary color for the button. Keep text under two lines.
The strong version tells the AI exactly what to build. The AI prompt already includes all Notifal tags, so the AI can insert them directly when you mention them in your goal.
10 powerful examples
Copy the Industry, Use case, Layout, and Goal into the AI Prompt form. Adjust names, colors, and tags for your site.
Show a compact social proof toast on shop and product pages. Headline: "Trending now" with body text "Someone in {order_meta__billing_city} purchased {product_name}." Use notifal-post-feature-image for the product image (small, left side). Action button "Shop now" with notifal-action-button linking to the product. Close icon top-right. White background, subtle border, primary color #7e2bd2 for the button.
Exit-intent style popup for first-time visitors. Headline "Wait, don't leave yet!" Subtext offering 15% off with code WELCOME15. Copy button using notifal-action-button with copy action for WELCOME15. Secondary text link to dismiss. Centered layout, max width 520px, soft gradient background, close icon top-right. No dynamic tags needed (static offer).
Remind visitors they have items waiting. Text: "You have {cart_item_count} items worth {cart_total} in your cart." Show urgency line "Complete checkout before items sell out." Primary button "Return to cart" linking to cart URL. Use cart tags only. Red accent on the button, light gray card background, close icon included.
Full-width top bar for all pages. Text: "Get weekly tips in your inbox." Include space for a Mailchimp or newsletter shortcode form in the center. Small close icon on the right. Dark background (#1a1a2e), white text, compact height (about 48px). Static content, no dynamic tags.
Limited-time sale popup on product pages. Headline "Today only!" Body: "{product_name} now {product_meta__sale_price} (was {product_meta__regular_price})." Product image via notifal-post-feature-image. Bold "Buy now" button with notifal-action-button. Countdown feel with red accent color. Close icon top-right.
Site-wide announcement: "Free shipping on orders over $50." Single line, centered text, optional small truck emoji or icon. Green background (#22c55e), white text. Close icon on the right. No tags. Keep it thin and readable on mobile.
After viewing a product, suggest a bundle. Headline "Complete your stack." Body mentions {product_name} plus a related item. Show product image. Button "Add bundle to cart" with ajax add to cart action. Use product tags. Clean two-column layout inside popup, close icon top-right.
Small toast bottom-left after 30 seconds on blog posts. Headline "Enjoying this article?" Body "Follow us for more." Two buttons: Instagram and YouTube as custom links with notifal-action-button. Static text, no tags. Playful colors matching brand. Close icon included.
Center popup to unlock a PDF guide. Headline "Get the free checklist." Include space for an email capture shortcode (WPForms or similar). Short privacy note below the form. Semi-transparent dark overlay feel in the card design. Close icon top-right. Static content except form shortcode placeholder.
Toast on long blog posts after scroll. Headline "Did you find this helpful?" Two buttons: "Yes, share it" (custom link to Twitter share) and "Read more" (post link using notifal-action-button with post-link action). Use {post_title} in the share text if possible. Minimal design, close icon top-right.
After the AI returns HTML
Paste into the HTML Builder and turn on Preview mode.
Confirm tags show sample data, not raw {tag} names.
If a tag looks wrong, open Insert Tag and fix the spelling.
Save the template and assign it to a notification with the correct Content Source Type (Dynamic if tags are used).