{
"name": "My workflow 5",
"nodes": [
{
"parameters": {
"operation": "extractHtmlContent",
"dataPropertyName": "body",
"extractionValues": {
"values": [
{
"key": "title",
"cssSelector": "title"
},
{
"key": "body",
"cssSelector": "body"
}
]
},
"options": {
"trimValues": true
}
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
420,
0
],
"id": "5af35a8b-149d-47f8-8a89-30fe7bab489d",
"name": "HTML"
},
{
"parameters": {
"formTitle": "Top deals",
"formDescription": "This form returns top deals by your preferences in the same page.\n\nYou can schedule your future deals once per day at the end of this test.",
"formFields": {
"values": [
{
"fieldLabel": "Category",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "Appliances"
},
{
"option": "Cameras, CamCorders & Drones"
},
{
"option": "Car Electronics "
},
{
"option": "Cell Phones"
},
{
"option": "Computers & Tablets"
},
{
"option": "TV & Home Theater"
},
{
"option": "Video Games"
}
]
},
"multiselect": true,
"requiredField": true
},
{
"fieldLabel": "Email",
"fieldType": "email",
"placeholder": "Complete your email",
"requiredField": true
}
]
},
"responseMode": "lastNode",
"options": {
"buttonLabel": "Get Deals",
"path": "get-top-deals",
"ignoreBots": true
}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"position": [
0,
0
],
"id": "6e039d0b-2b2e-43b6-be8f-540e6d084f04",
"name": "On form submission",
"webhookId": "33e8f7c3-82fb-4339-9c91-4b19aa6c14ba"
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "GPT-4O-MINI"
},
"messages": {
"values": [
{
"content": "Generate a list of recommended deals in json list. Classify items by category. Generate the next properties: name, description, price, link and category. All properties will be in a property called: results. Translate texts to english if required.",
"role": "system"
},
{
"content": "=The input text is:\n{{ $json.body }}"
},
{
"content": "=Categories to filter: {{ $('On form submission').item.json.Category.join(',') }}"
}
]
},
"jsonOutput": true,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-340,
260
],
"id": "b6d16585-a991-47ba-94c7-9681e581c541",
"name": "OpenAI1",
"credentials": {
"openAiApi": {
"id": "oKzfvOwieOm4upQ2",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"operation": "completion",
"completionTitle": "Our recommended deals!",
"completionMessage": "=We have sent {{ $('Split Out').all().length }} recommended deals to your email!",
"options": {}
},
"type": "n8n-nodes-base.form",
"typeVersion": 1,
"position": [
660,
260
],
"id": "018c6f15-f0a8-409f-832f-ea6d70bd818a",
"name": "Form",
"webhookId": "a67843b4-3ab9-427b-8e52-dfc42831065d"
},
{
"parameters": {
"oneTemplate": true,
"template": "
\nThese are our recommended deals today:
\n