Overview
This workflow collects user preferences via a web form (categories and email), scrapes MediaMarkt’s offers page through Bright Data, uses GPT-4o-mini to generate a filtered JSON list of recommended deals, formats those deals into an HTML email, and then sends the personalized deals to the user. Finally, it displays a confirmation page showing how many deals were sent.
Nodes Used
- When User Completes Form (Form Trigger)
Captures the user’s selected categories and email address via a hosted form.
- Get MediaMarkt Offers Website (Bright Data)
Scrapes the MediaMarkt campaigns and offers page in Spain using Bright Data proxy.
- Extract Body and Title from Website (HTML)
Parses the scraped HTML to extract the
<body>
content (and <title>
if needed).
- Generate List of Deals by Category (OpenAI || LangChain)
Sends the extracted page body and chosen categories to GPT-4o-mini. Prompts the model to return a JSON array of deals (
name
, description
, price
, link
, category
).
- Extract Items from Results (Split Out)
Splits the JSON array of deals into individual items for templating.
- Create HTML for Email (Document Generator)
Uses a Handlebars template to render the list of deals into an HTML
<ul>
ready for email.
- Notify End User by Email (Email Send)
Sends the generated HTML content to the user’s email via SMTP.
- Show Form Results Page (Form)
Displays a confirmation page indicating how many deals were emailed.
Workflow Steps
- User submits form
The form trigger node captures the user’s category selections and email address.
- Scrape MediaMarkt offers
The Bright Data node fetches the offers page from MediaMarkt’s Spanish site.
- Extract HTML content
The HTML node parses out the
<body>
text from the fetched page.
- Generate filtered deals
The OpenAI node sends the page text and selected categories to GPT-4o-mini, requesting a JSON-formatted list of deals.
- Split out deal items
The Split Out node isolates each deal object from the JSON array.
- Build email HTML
The Document Generator node applies a template, creating an HTML list of the recommended deals.
- Send personalized email
The Email Send node emails the HTML content to the address provided by the user.
- Show confirmation
The final Form node displays a “Thank you” page, indicating how many deals were sent.