{
  "id": "Kn5xCfqrirj5SzRR",
  "meta": {
    "instanceId": "b0b7342dd97fe152d3df30a69d8be05b124ea749d4be4586cfa367dfaf9c0c7c",
    "templateCredsSetupCompleted": true
  },
  "name": "Telegram Bot Based WooCommerce Product Creator",
  "tags": [
    {
      "id": "",
      "name": "",
      "createdAt": "",
      "updatedAt": ""
    }
  ],
  "nodes": [
    {
      "id": "73cebd5a-d4ca-468e-a9d5-d9da6141864d",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -5024,
        -2864
      ],
      "webhookId": "9a1cc77a-da2a-4ab6-b687-ccea09cbb89a",
      "parameters": {
        "updates": [
          "message",
          "callback_query"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5edcbc45-b1bf-4a0c-8674-f0de8266b196",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -3408,
        -2272
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "8066faa1-f934-471b-b5e7-ca049de3ac59",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "awaiting_approval"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "da9d8b86-fad7-487a-8353-1a6d19ab107b",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "awaiting_name"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "c060135e-1e8a-4a2b-b9af-3aeaac91dfd8",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "awaiting_images"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "3bc05fa0-6db3-41f3-86cb-f6a5c51a47d1",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "awaiting_features"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "264ddffc-45d5-4e8f-8f1d-e1af5355d3d1",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "awaiting_regular_price"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "57d7c7c6-3888-4922-bed8-96ce20b65e0e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "=awaiting_sale_price"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4ca58bf6-1787-4cee-ad06-f2d84d3f93fd",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $node[\"Get User State1\"].json[\"current_step\"] }}",
                    "rightValue": "complete"
                  }
                ]
              }
            }
          ]
        },
        "options": {},
        "looseTypeValidation": true
      },
      "typeVersion": 3.2
    },
    {
      "id": "95f2f0d4-9fc6-416e-98a1-745c0695ccca",
      "name": "Send a text message1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2624,
        -2800
      ],
      "webhookId": "7831608b-ec44-49d1-a0f3-c78e368c5425",
      "parameters": {
        "text": "\"Great. Now, please send all of your product images. You can send them one by one or all at once. When you are finished, just tap on done.",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "replyMarkup": "inlineKeyboard",
        "inlineKeyboard": {
          "rows": [
            {
              "row": {
                "buttons": [
                  {
                    "text": "Done",
                    "additionalFields": {
                      "callback_data": "done"
                    }
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "07afd76c-f644-412c-ad03-e57da85759da",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -3040,
        -2304
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "86070d7d-ba70-4b12-b0d4-2455b7719166",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $node[\"Telegram Trigger\"].json[\"callback_query\"]?.data }}",
              "rightValue": "done"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f6e96fd7-02bd-456b-9829-611dcd27dc15",
      "name": "Send a text message2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2048,
        -1936
      ],
      "webhookId": "21d07166-8880-4645-9cc8-d0694317900c",
      "parameters": {
        "text": "Excellent. What is the regular price of your product? (e.g., 29.99)",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "deae1c26-ba23-46b5-81d4-127aee8a0f8f",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -3552,
        -3696
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d503ccc4-d9db-478f-a288-67ac1dd8da89",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"text\"]}}",
              "rightValue": "/start"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "13e211d1-2549-4779-96e4-e9128ddcb135",
      "name": "Send a text message3",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3328,
        -3792
      ],
      "webhookId": "badec91d-2e9e-449c-8c69-bd3ad67216c9",
      "parameters": {
        "text": "Welcome! To begin, what is the name of the product you'd like to create?",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a83d624a-f736-4eaf-9af7-eb3a53e2ae08",
      "name": "Send a text message4",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2896,
        -272
      ],
      "webhookId": "34972463-4d2c-43e5-9856-c11feb7a8050",
      "parameters": {
        "text": "Your previous product was created! Want to make another? Reply with /start or anything to begin.",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "243b4774-f596-4206-8d56-62976afcfe44",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -2032,
        -3360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4ebb260a-5b55-470f-91bc-4eb354211b96",
              "name": "chatId",
              "type": "string",
              "value": "={{ $('Code1').item.json.chat_id }}"
            },
            {
              "id": "2850632e-123c-41c4-a450-45a9da63cda4",
              "name": "features",
              "type": "string",
              "value": "={{ $('Get row(s)').item.json.features }}"
            },
            {
              "id": "514a01dd-33a0-4386-863c-8d0c90412e74",
              "name": "title",
              "type": "string",
              "value": "={{ $('Get User State').item.json.product_name }}"
            },
            {
              "id": "3e78f09a-0e93-424b-9185-fb4b030e89a1",
              "name": "regular_price",
              "type": "string",
              "value": "={{ $('Code1').item.json.regular_price }}"
            },
            {
              "id": "2658d3db-41c2-407a-b332-f8bd10506432",
              "name": "sale price",
              "type": "string",
              "value": "={{ $('Code1').item.json.sale_price }}"
            },
            {
              "id": "14dfc232-2ed5-4228-bd18-ffc36fba9803",
              "name": "image1_url",
              "type": "string",
              "value": "={{ $json.image_url1 }}"
            },
            {
              "id": "e4db9955-f7f6-419a-b5a1-cbe2854a4bb4",
              "name": "image2_url",
              "type": "string",
              "value": "={{ $json.image_url2 }}"
            },
            {
              "id": "8c77840b-6936-481c-8d34-f67eb4ac3038",
              "name": "image3_url",
              "type": "string",
              "value": "={{ $json.image_url3 }}"
            },
            {
              "id": "f867902b-1514-4e92-b522-1d2be7eb8880",
              "name": "image4_url",
              "type": "string",
              "value": "={{ $json.image_url4 }}"
            },
            {
              "id": "9390cd56-ac00-44a2-89ec-c3475dfb1031",
              "name": "image5_url",
              "type": "string",
              "value": "={{ $json.image_url5 }}"
            },
            {
              "id": "22db0ed4-3c80-49d8-b3e0-82e3b943d5e3",
              "name": "image6_url",
              "type": "string",
              "value": "={{ $json.image_url6 }}"
            },
            {
              "id": "e3bc5737-b90d-47a5-a05c-ba6db35b6901",
              "name": "image7_url",
              "type": "string",
              "value": "={{ $json.image_url7 }}"
            },
            {
              "id": "fe9cd393-e5c2-4c95-bb3b-2b7d5ed64553",
              "name": "image8_url",
              "type": "string",
              "value": "={{ $json.image_url8 }}"
            },
            {
              "id": "796b2787-fae8-4dca-9f0f-e8d14e990c97",
              "name": "image9_url",
              "type": "string",
              "value": "={{ $json.image_url9 }}"
            },
            {
              "id": "b632927d-f973-4d5c-866f-29ef134b9e20",
              "name": "image10_url",
              "type": "string",
              "value": "={{ $json.image_url10 }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d74246df-d341-4d50-a916-bd8194e07d95",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1584,
        -3360
      ],
      "parameters": {
        "url": "={{ $json.image1_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b4a7e695-dedb-41df-bd76-03332507f0fa",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -960,
        -3328
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ab6a6c59-604d-429d-bdfb-2077a60f2443",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -608,
        -3328
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9e00b0da-559d-4e4d-b3ca-71b0cc7f0b5c",
      "name": "Google Gemini Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -256,
        -3328
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d72d0d60-94db-4e53-8c70-261c50bebfa6",
      "name": "Product Description Generation",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1040,
        -3552
      ],
      "parameters": {
        "text": "=<persona>\nYou are an expert SEO copywriter and e-commerce merchandiser. Your specialty is writing clear, persuasive, and attribute-rich product descriptions that sell.\n</persona>\n\n<context>\nYour goal is to generate a unique, SEO-friendly product description based on a provided product title and features list. The description must follow a specific format and be written in simple, easy-to-understand language.\n</context>\n\n<input_data>\n\nProduct Title: {{ $node[\"Edit Fields\"].json[\"title\"] }}\nProduct Features: {{ $node[\"Edit Fields\"].json[\"features\"] }}\n</input_data>\n\n<tasks>\n\nAnalyze the Inputs: Carefully examine the provided Product Title and Product Features list. Use these as the primary source of information for your description.\n\nWrite the Opening Paragraph: Create a short, engaging introduction (2-3 sentences). Start by incorporating the Product Title naturally. Describe the product's main appeal or what makes it special, using information from the provided features.\n\nCreate the Features List:\n\nAdd the heading \"Features:\".\n\nBelow the heading, create a bulleted list of key features.\n\nEach bullet point must start with a bolded sub-heading followed by a colon (e.g., Vibrant Design:).\n\nThe description for each feature must be based only on the provided Product Features list.\n\nWrite the Closing Paragraph: Write a concise concluding sentence or two that summarizes the product's value and provides a positive final impression, reinforcing why it's a great choice.\n\n</tasks>\n\n<output_format_and_style>\n\nStructure: You must follow this exact format:\n\nAn introductory paragraph.\n\nThe heading \"Features:\".\n\nA bulleted list of features.\n\nA concluding paragraph.\n\nLanguage Simplicity: The language must be extremely simple and clear. Use short sentences and common words.\n\nFeature Sub-headings: The bolded sub-headings in the feature list should be general and descriptive (e.g., Unique Shape:, Premium Material:, Eye-Catching Colors:, Smart Functionality:).\n</output_format_and_style>\n\n<output_constraints>\n\nProvide only the final product description in the specified format. Do not include any other text, explanations, or your persona description.\n\nCRITICAL: Do not include any information that is not present in the provided Product Title or Product Features list.\n\nDo not include any personal names, dates, or years.\n\nDo not use the Product Title exactly as provided in the input, rather split it up as per your need to explain features. For example: \"Pink Bottle of Perfume\" is the title, then you can use \"this perfume is best for party wear and occasions.\"\n</output_constraints>",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "f6b57b52-8271-449d-95a1-46a8402c0104",
      "name": "Short Description Generation",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -688,
        -3552
      ],
      "parameters": {
        "text": "=<persona>\nYou are an expert SEO copywriter who excels at crafting concise, impactful, and attribute-rich short product descriptions for e-commerce.\n</persona>\n\n<context>\nYour goal is to generate a single, compelling paragraph to be used as a short product description. It needs to be optimized for search engines by quickly highlighting the product's key features and primary benefit, based on a given title and features list.\n</context>\n\n<input_data>\n\nProduct Title: {{ $node[\"Edit Fields\"].json[\"title\"] }}\nProduct Features: {{ $node[\"Edit Fields\"].json[\"features\"] }}\n</input_data>\n\n<tasks>\n\nAnalyze the Inputs: Review the provided Product Title and Product Features list to identify the most prominent attributes and the main purpose of the product.\n\nConstruct the Description: Write a single, flowing paragraph that follows this logical sequence:\n\nStart with a short, engaging phrase that relates to the product's use (e.g., \"Elevate your style with...\", \"Add a touch of elegance to your home with...\").\n\nSeamlessly integrate the full Product Title.\n\nClearly list 2-3 key attributes from the provided features, connecting them with words like \"featuring,\" \"designed with,\" or \"made from.\"\n\nConclude with a concise statement about its ideal use or key benefit (e.g., \"...making it perfect for everyday wear,\" or \"...the ideal gift for any occasion.\").\n\n</tasks>\n\n<output_format_and_style>\n\nFormat: The entire output must be a single, well-written paragraph. Do not use bullet points or multiple lines.\n\nLength: The description should be concise and to the point, generally between 25 and 45 words.\n\nLanguage Simplicity: The language must be extremely simple and clear.\n</output_format_and_style>\n\n<output_constraints>\n\nProvide only the final short description paragraph. Do not include any other text, explanations, or your persona description.\n\nCRITICAL: Only mention attributes or features that are present in the provided Product Title or Product Features list.\n\nDo not include any personal names, specific dates, or years.\n\nUse the Product Title exactly as provided in the input {{ $node[\"Edit Fields\"].json[\"title\"] }}.\n</output_constraints>",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "b5bf7781-7b65-48b6-b4e8-b3e884353bbb",
      "name": "Slug Generation",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -336,
        -3552
      ],
      "parameters": {
        "text": "=<persona>\nYou are an SEO specialist and web developer, an expert in creating clean, effective, and search-engine-friendly URL slugs.\n</persona>\n\n<context>\nYour task is to convert a given product title into a perfectly formatted, SEO-optimized URL slug. The slug must be concise, descriptive, and strictly follow the formatting rules provided.\n</context>\n\n<input_data>\nProduct Title: {{ $node[\"Edit Fields\"].json[\"title\"] }}\nProduct Features: {{ $node[\"Edit Fields\"].json[\"features\"] }}\n</input_data>\n\n<tasks>\n\nRead the provided Product Title.\n\nIdentify and extract the most important keywords that describe the product's core attributes (e.g., style, color, material, function). Use the Product Features list as additional context to ensure the slug is descriptive.\n\nAssemble these keywords into a URL slug, strictly applying all the rules below.\n</tasks>\n\n<slug_rules>\n\nFormat: Convert the entire string to lowercase.\n\nSeparator: Use hyphens - to separate all words.\n\nCharacters: Remove all special characters (e.g., &, ™, ®, ', \", ?, !, :, +).\n\nStop Words: Remove common English stop words (e.g., 'a', 'an', 'the', 'for', 'with', 'in', 'of').\n\nRedundancy: Omit common, generic, or redundant words that add little SEO value (e.g., 'product', 'item', 'style', 'design', 'template', 'new', 'apparel'). The slug should focus on the unique identifiers of the product.\n\nLength: Keep the slug concise and descriptive, aiming for a final length of 3 to 7 words.\n</slug_rules>\n\n<examples>\n\nTitle: \"Handmade Ceramic Coffee Mug with Speckled Glaze\"\nSlug: handmade-ceramic-coffee-mug-speckled-glaze\n\nTitle: \"Luxurious Rose & Sandalwood Eau de Parfum for Women\"\nSlug: luxurious-rose-sandalwood-perfume\n\nTitle: \"Men's Vintage Graphic Print 100% Cotton T-Shirt\"\nSlug: vintage-graphic-print-cotton-tshirt\n</examples>\n\n<output_constraints>\n\nOutput only the final, clean slug.\n\nDo not provide any explanations, prefixes (like \"slug:\"), or any other text.\n</output_constraints>",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "6a2f6b64-c21f-43bf-b977-28e15e5ce848",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1032,
        -2824
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3a4e8f7a-cc1a-45dc-837c-4f2034ed620e",
      "name": "Google Gemini Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -680,
        -2824
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7cb05185-7d3f-4c62-ae3f-c6ea098bf307",
      "name": "Google Gemini Chat Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -328,
        -2824
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ab8da263-f779-4642-bec8-f38aede6a28a",
      "name": "Product Description Generation1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1104,
        -3048
      ],
      "parameters": {
        "text": "=<persona>\nYou are an expert SEO copywriter and e-commerce merchandiser. Your specialty is writing clear, persuasive, and attribute-rich product descriptions that sell.\n</persona>\n\n<context>\nYour goal is to generate a unique, SEO-friendly product description based on a product image and a provided title. The description must follow a specific format and be written in simple, easy-to-understand language. Every feature mentioned must be directly observable in the image.\n</context>\n\n<input_data>\n1.  **Image**: {{ $node[\"HTTP Request\"].binary.data }}\n2.  **Product Title**: The pre-generated SEO title for the product: `{{ $node[\"Edit Fields\"].json[\"title\"] }}`\n</input_data>\n\n<tasks>\n1.  **Analyze the Inputs**: Carefully examine the product image to identify its most important visual features, materials, colors, and overall style. Use the provided `Product Title` to anchor your understanding of the product.\n\n2.  **Write the Opening Paragraph**: Create a short, engaging introduction (2-3 sentences). Start by incorporating the `Product Title` naturally. Describe the product's main appeal or what makes it special.\n\n3.  **Create the Features List**:\n    * Add the heading \"Features:\".\n    * Below the heading, create a bulleted list of 3-5 key features.\n    * Each bullet point must start with a bolded sub-heading followed by a colon (e.g., **Vibrant Design:**).\n    * The description for each feature must be based *only* on what is visible in the image.\n\n4.  **Write the Closing Paragraph**: Write a concise concluding sentence or two that summarizes the product's value and provides a positive final impression, reinforcing why it's a great choice.\n</tasks>\n\n<output_format_and_style>\n* **Structure**: You must follow this exact format:\n    1.  An introductory paragraph.\n    2.  The heading \"Features:\".\n    3.  A bulleted list of features.\n    4.  A concluding paragraph.\n* **Language Simplicity**: The language must be extremely simple and clear. Write as if you are explaining the product to a 7-year-old. Use short sentences and common words.\n* **Feature Sub-headings**: The bolded sub-headings in the feature list should be general and descriptive (e.g., **Unique Shape:**, **Premium Material:**, **Eye-Catching Colors:**, **Smart Functionality:**).\n</output_format_and_style>\n\n<output_constraints>\n* Provide only the final product description in the specified format. Do not include any other text, explanations, or your persona description.\n* **CRITICAL**: Do not describe any feature, benefit, or detail that cannot be seen or reasonably inferred directly from the image provided (e.g., do not mention \"user-friendly editor\" for a static image of a digital file,) but do mention reasonable features like you can mention if it’s a perfume then you can mention it’s a luxury fragrance, good for daily wear.\n* Do not include any personal names, dates, or years.\n* DO not sse the `Product Title` exactly as provided in the input `{{ $node[\"Edit Fields\"].json[\"title\"] }}`, rather split it up as per your need to explain features. For example : Pink Bottle of Perfume is the title, then you can use this perfume is best for party wear and occasions.\n</output_constraints>",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "472e203b-a1f7-4c48-ae4f-59297de1ed3d",
      "name": "Short Description Generation1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -752,
        -3048
      ],
      "parameters": {
        "text": "=<persona>\nYou are an expert SEO copywriter who excels at crafting concise, impactful, and attribute-rich short product descriptions for e-commerce.\n</persona>\n\n<context>\nYour goal is to generate a single, compelling paragraph to be used as a short product description. It needs to be optimized for search engines by quickly highlighting the product's key visual features and primary benefit, based on its image and a given title.\n</context>\n\n<input_data>\n1.  **Image**: {{ $node[\"HTTP Request\"].binary.data }}.\n2.  **Product Title**: The pre-generated SEO title for the product: `{{ $node[\"Edit Fields\"].json[\"title\"] }}`\n</input_data>\n\n<tasks>\n1.  **Analyze the Inputs**: Review the product image and the `Product Title` to identify 2-3 of the most prominent visual attributes (e.g., color, material, pattern, shape) and the main purpose of the product.\n\n2.  **Construct the Description**: Write a single, flowing paragraph that follows this logical sequence:\n    * Start with a short, engaging phrase that relates to the product's use (e.g., \"Elevate your style with...\", \"Add a touch of elegance to your home with...\").\n    * Seamlessly integrate the full `Product Title`.\n    * Clearly list the 2-3 key visual attributes you identified, connecting them with words like \"featuring,\" \"designed with,\" or \"made from.\"\n    * Conclude with a concise statement about its ideal use or key benefit (e.g., \"...making it perfect for everyday wear,\" or \"...the ideal gift for any occasion.\").\n</tasks>\n\n<output_format_and_style>\n* **Format**: The entire output must be a single, well-written paragraph. Do not use bullet points or multiple lines.\n* **Length**: The description should be concise and to the point, generally between 25 and 45 words.\n* **Language Simplicity**: The language must be extremely simple and clear. Write as if you are explaining the product to a 7-year-old.\n</output_format_and_style>\n\n<output_constraints>\n* Provide only the final short description paragraph. Do not include any other text, explanations, or your persona description.\n* **CRITICAL**: Only mention attributes, materials, or features that are clearly visible in the product image.\n* Do not include any personal names, specific dates, or years.\n* Use the `Product Title` exactly as provided in the input `{{ $node[\"Edit Fields\"].json[\"title\"] }}`.\n</output_constraints>",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "0a519e72-3863-43c5-8bda-c12b8ec16f96",
      "name": "Slug Generation1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -400,
        -3048
      ],
      "parameters": {
        "text": "=<persona>\nYou are an SEO specialist and web developer, an expert in creating clean, effective, and search-engine-friendly URL slugs.\n</persona>\n\n<context>\nYour task is to convert a given product title into a perfectly formatted, SEO-optimized URL slug. The slug must be concise, descriptive, and strictly follow the formatting rules provided.\n</context>\n\n<input_data>\nProduct Title: `{{ $node[\"Edit Fields\"].json[\"title\"] }}`\n</input_data>\n\n<tasks>\n1.  Read the provided `Product Title`.\n2.  Identify and extract the most important keywords that describe the product's core attributes (e.g., style, color, material, function).\n3.  Assemble these keywords into a URL slug, strictly applying all the rules below.\n</tasks>\n\n<slug_rules>\n* **Format**: Convert the entire string to lowercase.\n* **Separator**: Use hyphens `-` to separate all words.\n* **Characters**: Remove all special characters (e.g., `&`, `™`, `®`, `'`, `\"`, `?`, `!`, `:`, `+`).\n* **Stop Words**: Remove common English stop words (e.g., 'a', 'an', 'the', 'for', 'with', 'in', 'of').\n* **Redundancy**: Omit common, generic, or redundant words that add little SEO value (e.g., 'product', 'item', 'style', 'design', 'template', 'new', 'apparel'). The slug should focus on the unique identifiers of the product.\n* **Length**: Keep the slug concise and descriptive, aiming for a final length of 3 to 7 words.\n</slug_rules>\n\n<examples>\n* **Title**: \"Handmade Ceramic Coffee Mug with Speckled Glaze\"\n    **Slug**: `handmade-ceramic-coffee-mug-speckled-glaze`\n* **Title**: \"Luxurious Rose & Sandalwood Eau de Parfum for Women\"\n    **Slug**: `luxurious-rose-sandalwood-perfume`\n* **Title**: \"Men's Vintage Graphic Print 100% Cotton T-Shirt\"\n    **Slug**: `vintage-graphic-print-cotton-tshirt`\n</examples>\n\n<output_constraints>\n* Output **only** the final, clean slug.\n* Do not provide any explanations, prefixes (like \"slug:\"), or any other text.",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "21e13fbb-26be-45f3-a5a4-199a22fad5e3",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        -1360,
        -3360
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "15650d2f-8a50-4e34-80eb-9ef305f86d79",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $node[\"Edit Fields\"].json[\"features\"] }}",
              "rightValue": "none"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bc64bbe7-5f3f-4e93-835e-8477fa5ccf02",
      "name": "If3",
      "type": "n8n-nodes-base.if",
      "position": [
        -4128,
        -2912
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b24ec2d1-9a18-4fc6-bd83-5023694aecd7",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{$(\"Get User State\").item.json.chat_id}}",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "f97c1f76-8d21-4047-9a38-2686a978d558",
      "name": "Send a text message5",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3328,
        -3600
      ],
      "webhookId": "996d885c-f5ac-4e6a-9fb6-712c6210ebbd",
      "parameters": {
        "text": "Hello! Please type /start to begin creating a new product.",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "58ae9be2-bd67-4dee-8d23-40abd141ce8b",
      "name": "Send a text message7",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2048,
        -1344
      ],
      "webhookId": "bd8e5bdd-0c63-4997-8df3-e1fc0512ca5f",
      "parameters": {
        "text": "Got it. Now, what is the sale price? (Tap on same if there is no discount).",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "replyMarkup": "inlineKeyboard",
        "inlineKeyboard": {
          "rows": [
            {
              "row": {
                "buttons": [
                  {
                    "text": "Same",
                    "additionalFields": {
                      "callback_data": "same"
                    }
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8e60dbf8-52a3-42e8-9717-bc99b9f19bb8",
      "name": "If5",
      "type": "n8n-nodes-base.if",
      "position": [
        -2880,
        -688
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9c2f5c8f-c47a-457a-847d-3722a7dfe60f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $node[\"Telegram Trigger\"].json[\"callback_query\"]?.data }}",
              "rightValue": "same"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "45c0daf7-e922-49f8-8836-f6863dc963c7",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2224,
        -672
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "d4501828-cf5a-4a69-8600-8a536a0086f9",
      "name": "Send a text message8",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1104,
        -672
      ],
      "webhookId": "d1c07b40-0958-458e-bf07-ea6e0a309648",
      "parameters": {
        "text": "=Please review your product:\n\n*Name:* {{ $node[\"Get All Data\"].json[\"product_name\"]}}\n\n*Features:* {{ $node[\"Get All Data\"].json[\"features\"] }}\n\n*Regular Price:* {{ $node[\"Get All Data\"].json[\"regular_price\"] }}\n\n*Sale Price:* {{ $node[\"Get All Data\"].json[\"sale_price\"] }}\n\nProceed to create this product?",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "replyMarkup": "inlineKeyboard",
        "inlineKeyboard": {
          "rows": [
            {
              "row": {
                "buttons": [
                  {
                    "text": "👍 Approve",
                    "additionalFields": {
                      "callback_data": "approve_product"
                    }
                  },
                  {
                    "text": "❌ Cancel & Restart",
                    "additionalFields": {
                      "callback_data": "cancel_product"
                    }
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "executeOnce": true,
      "typeVersion": 1.2
    },
    {
      "id": "20f93335-845c-4348-9608-1cb8df6eb1dd",
      "name": "Check Approval Button",
      "type": "n8n-nodes-base.if",
      "position": [
        -3216,
        -3184
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f12a3e48-66ef-47e5-83a0-2672fe5a28b4",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $node[\"Telegram Trigger\"].json[\"callback_query\"]?.data }}",
              "rightValue": "approve_product"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b0d34d71-22fe-4c0c-9b8b-f0f25dab8065",
      "name": "Send a text message9",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2928,
        -3360
      ],
      "webhookId": "eb51771e-61a3-42b2-9e72-b02850090417",
      "parameters": {
        "text": "Great! Creating your product now... (It may take up to 1 min for the process to complete)",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "68f34445-aa85-48a1-853a-b10f1a307f3c",
      "name": "Send a text message10",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2656,
        -3056
      ],
      "webhookId": "36b484ac-1a1f-4ecb-b77d-654bb1bf065b",
      "parameters": {
        "text": "Action cancelled. Let's start over. What is the product name?",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "77c31f89-6910-46fb-878e-b07b828fbb52",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        -4352,
        -2912
      ],
      "parameters": {
        "jsCode": "return $('Get User State').all();"
      },
      "typeVersion": 2
    },
    {
      "id": "02736035-cca7-421b-bb37-8bb4c30c0062",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2048,
        -2464
      ],
      "webhookId": "acd3934b-5bfc-4a12-845a-9e6aa2aee1de",
      "parameters": {
        "text": "Excellent. Finally, please provide a comma-separated list of key features. If you don't have any, just tap on none.",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "replyMarkup": "inlineKeyboard",
        "inlineKeyboard": {
          "rows": [
            {
              "row": {
                "buttons": [
                  {
                    "text": "None",
                    "additionalFields": {
                      "callback_data": "none"
                    }
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4e12b052-76af-477f-9823-3252a8ffb160",
      "name": "Get a file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2496,
        -2272
      ],
      "webhookId": "88b60562-4d03-495f-8221-d3dc227d613f",
      "parameters": {
        "fileId": "={{ $node[\"Code\"].json[\"selected_file_id\"] }}",
        "resource": "file",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ef69c3d8-1df8-4512-abf3-5de29cec5933",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -2720,
        -2272
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nfor (const item of items) {\n  // Explicitly fetch data from Telegram Trigger node\n  const telegramData = $node[\"Telegram Trigger\"].json[\"message\"] || {};\n  const photoArray = telegramData.photo || [];\n\n  console.log('Telegram Photo Array:', photoArray);\n\n  if (photoArray.length > 0) {\n    // Find the photo with the max file_size using reduce\n    const maxPhoto = photoArray.reduce((max, curr) => \n      (curr.file_size > max.file_size ? curr : max), \n      photoArray[0]\n    );\n    console.log('Max Photo:', maxPhoto);\n\n    item.json.selected_file_id = maxPhoto.file_id;\n  } else {\n    // Set to null if no photos are found\n    item.json.selected_file_id = null;\n    console.log('No photo versions found in Telegram message');\n    // Optionally throw an error to enforce photo presence\n    // throw new Error('No photo versions found in Telegram message');\n  }\n}\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "23915475-d3de-416c-99c6-3ec48f633704",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        -2272,
        -2272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c9e3a3dc-e729-4067-af82-7faab08f0ab3",
              "name": "new_image_url",
              "type": "string",
              "value": "=https://api.telegram.org/file/bot{{your bot token}}/{{ $node[\"Get a file\"].json[\"result\"][\"file_path\"] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8e2df2a1-c5ea-4993-bd85-d695d60c790a",
      "name": "If4",
      "type": "n8n-nodes-base.if",
      "position": [
        -2496,
        -1744
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3d81de51-cd83-421d-8ea6-4f46ee50e7c0",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $node[\"Telegram Trigger\"].json[\"callback_query\"]?.data }}",
              "rightValue": "none"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9e2ab58f-72f7-459e-9c03-6ab87c5cf3ac",
      "name": "Send a text message6",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2048,
        -1744
      ],
      "webhookId": "21d07166-8880-4645-9cc8-d0694317900c",
      "parameters": {
        "text": "Excellent. What is the regular price of your product? (e.g., 29.99)",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "feb0d324-951a-4411-ab0a-28036d62d45d",
      "name": "Get User State",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -4800,
        -2864
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "0ee1d82b-c08a-40f9-a4cc-1cf9c1e84b2d",
      "name": "Get User State1",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -3904,
        -2912
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "54113d75-288e-4d0c-956c-393e386fe062",
      "name": "Upsert row(s)",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -3104,
        -3792
      ],
      "parameters": {
        "columns": {
          "value": {
            "chat_id": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
            "current_step": "awaiting_name"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f789759f-d3f5-4cd6-a30c-baf2eef9c97f",
      "name": "Update row(s)",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2704,
        -3360
      ],
      "parameters": {
        "columns": {
          "value": {
            "chat_id": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
            "current_step": "complete"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e8fed782-c2bc-43d3-b826-924ec88fb2eb",
      "name": "Get row(s)",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2480,
        -3360
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "34324afe-eac3-4032-914e-e32857691163",
      "name": "Upsert row(s)1",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2880,
        -3056
      ],
      "parameters": {
        "columns": {
          "value": {
            "current_step": "awaiting_name"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ec53bbce-c1d4-40c7-b74d-1f81994f37b6",
      "name": "Upsert row(s)2",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2848,
        -2800
      ],
      "parameters": {
        "columns": {
          "value": {
            "current_step": "awaiting_images",
            "product_name": "={{ $('Telegram Trigger').item.json.message.text }}"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6c3e5431-8d0b-47bb-9881-210e68d91dc7",
      "name": "Update row(s)1",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2272,
        -2464
      ],
      "parameters": {
        "columns": {
          "value": {
            "file_ids": "={{ $json.file_ids }}",
            "image_urls": "={{ $json.image_urls }}",
            "current_step": "awaiting_features"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            },
            {
              "id": "file_ids",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "file_ids",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d2e474ea-7a6f-4c31-b08c-7d26fcca57d3",
      "name": "Update row(s)3",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2272,
        -1936
      ],
      "parameters": {
        "columns": {
          "value": {
            "current_step": "awaiting_regular_price"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            },
            {
              "id": "file_ids",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "file_ids",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7e69ddba-3edd-4230-ab74-005ef6b31f6b",
      "name": "Update row(s)4",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2272,
        -1744
      ],
      "parameters": {
        "columns": {
          "value": {
            "features": "={{ $('Telegram Trigger').item.json.message.text }}",
            "current_step": "awaiting_regular_price"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fbb1ca90-13c5-4ba3-9acd-b820fdd8e8b5",
      "name": "Update row(s)5",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2272,
        -1344
      ],
      "parameters": {
        "columns": {
          "value": {
            "current_step": "awaiting_sale_price",
            "regular_price": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"text\"] }}"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f7f5a538-7d0b-43af-9cc5-1520c3422b5b",
      "name": "Update row(s)6",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2496,
        -880
      ],
      "parameters": {
        "columns": {
          "value": {
            "sale_price": "={{ $node[\"Get User State1\"].json[\"regular_price\"] }}"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            },
            {
              "id": "file_ids",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "file_ids",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3df7bba5-afcf-4f6d-8785-ad239739ed61",
      "name": "Update row(s)7",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2448,
        -672
      ],
      "parameters": {
        "columns": {
          "value": {
            "sale_price": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"text\"] }}",
            "current_step": "awaiting_approval"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "current_step",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "current_step",
              "defaultMatch": false
            },
            {
              "id": "product_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "product_name",
              "defaultMatch": false
            },
            {
              "id": "image_urls",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_urls",
              "defaultMatch": false
            },
            {
              "id": "features",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "features",
              "defaultMatch": false
            },
            {
              "id": "regular_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "regular_price",
              "defaultMatch": false
            },
            {
              "id": "sale_price",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "sale_price",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "26c984e9-4e79-4f8d-89bf-c0ddf1898167",
      "name": "Delete row(s)",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2672,
        -272
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "deleteRows",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "90d61de0-5cef-4f4c-bb02-1c8e59334677",
      "name": "Get All Data",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2000,
        -672
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0331fdcf-cfb0-4452-bad3-167a093e58a1",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -2256,
        -3360
      ],
      "parameters": {
        "jsCode": "// Get the single item from the previous node\nconst item = items[0];\n\n// Get the comma-separated string of URLs from the input\nconst imageUrlsString = item.json.image_urls;\n\n// If the string is empty or doesn't exist, return an empty object\nif (!imageUrlsString) {\n  return [{\n    json: {}\n  }];\n}\n\n// Split the string into an array of individual URL strings\nconst urlArray = imageUrlsString.split(',');\n\n// Use the .reduce() method to transform the array into a single object\nconst finalObject = urlArray.reduce((accumulator, url, index) => {\n  // Create a dynamic key like \"image_url1\", \"image_url2\", etc.\n  // The 'index' starts at 0, so we add 1 to start our count from 1.\n  const key = `image_url${index + 1}`;\n  \n  // Assign the trimmed URL to the new key on our object\n  accumulator[key] = url.trim();\n  \n  // Return the object for the next iteration\n  return accumulator;\n}, {}); // The {} here initializes the process with an empty object\n\n// Return the final object as a single n8n item\nreturn [{\n  json: finalObject\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "3a58f0e9-f13d-4232-bc96-0e73b8458778",
      "name": "Code in JavaScript2",
      "type": "n8n-nodes-base.code",
      "position": [
        -1808,
        -3360
      ],
      "parameters": {
        "jsCode": "// Get the single item from the input (from your 'Edit Fields' node)\nconst inputData = items[0].json;\n\n// Initialize an empty array to hold our valid image objects\nconst imagesArray = [];\n\n// Loop from 1 to 10 to check for each imageX_url field\nfor (let i = 1; i <= 10; i++) {\n  const key = `image${i}_url`;\n\n  // Check if the key exists in our data AND if its value is not null/empty\n  if (inputData[key]) { \n    // If it's a valid URL, add it to our array in the correct format\n    imagesArray.push({ \"src\": inputData[key] });\n  }\n}\n\n// Add the new, clean 'images' array back to the data\ninputData.images = imagesArray;\n\n// Return the modified data for the next node to use\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "b4251098-dc67-402a-a02e-44b95c10fe99",
      "name": "Insert row",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2048,
        -2272
      ],
      "parameters": {
        "columns": {
          "value": {
            "chat_id": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
            "file_id": "={{ $node[\"Code\"].json[\"selected_file_id\"] }}",
            "image_url": "={{ $node[\"Edit Fields1\"].json[\"new_image_url\"] }}"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "file_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "file_id",
              "defaultMatch": false
            },
            {
              "id": "image_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_url",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "P9dj7J80M07qtEtc",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/P9dj7J80M07qtEtc",
          "cachedResultName": "User_Images (Woocommerce)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "81f6043c-bd87-44fb-8b4f-5c4320b2fff9",
      "name": "Get row(s)3",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2720,
        -2464
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "P9dj7J80M07qtEtc",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/P9dj7J80M07qtEtc",
          "cachedResultName": "User_Images (Woocommerce)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "894fb834-5536-4cae-b61d-1c5c08c0629e",
      "name": "Code in JavaScript3",
      "type": "n8n-nodes-base.code",
      "position": [
        -2496,
        -2464
      ],
      "parameters": {
        "jsCode": "// Use a single .reduce() loop for better performance and clarity\nconst aggregatedData = $input.all().reduce((accumulator, item) => {\n  const fileId = item.json.file_id;\n  const imageUrl = item.json.image_url;\n\n  // Only add the data if both properties exist on the item\n  if (fileId && imageUrl) {\n    accumulator.fileIdList.push(fileId);\n    accumulator.imageUrlList.push(imageUrl);\n  }\n  \n  // Return the accumulator for the next iteration\n  return accumulator;\n}, { fileIdList: [], imageUrlList: [] }); // This is the starting value: an object with two empty arrays\n\n// Join the final arrays into comma-separated strings\nconst fileIds = aggregatedData.fileIdList.join(',');\nconst imageUrls = aggregatedData.imageUrlList.join(',');\n\n// Return as a single item for the next nodes to use\nreturn [{ \n  json: { \n    file_ids: fileIds, \n    image_urls: imageUrls \n  } \n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "06046979-5be0-4734-b58e-657c0645d156",
      "name": "Delete row(s)1",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -2448,
        -272
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "deleteRows",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "P9dj7J80M07qtEtc",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/P9dj7J80M07qtEtc",
          "cachedResultName": "User_Images (Woocommerce)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c1a44a54-a6c5-4b38-9fe1-f2d915a7b3ff",
      "name": "Code in JavaScript4",
      "type": "n8n-nodes-base.code",
      "position": [
        -1776,
        -672
      ],
      "parameters": {
        "jsCode": "// Get the first (and only) item from the input\nconst item = items[0];\n\n// Get the comma-separated string of file_ids\nconst fileIdsString = item.json.file_ids;\n\n// Safety check: If the string is empty or doesn't exist, return an empty array.\nif (!fileIdsString) {\n  return [];\n}\n\n// Split the string by the comma to create an array of ID strings and trim each ID\nconst idArray = fileIdsString.split(',').map(id => id.trim());\n\n// Return each ID as a separate item\nreturn idArray.map(id => ({ json: { id } }));"
      },
      "typeVersion": 2
    },
    {
      "id": "88e4c818-4292-49a5-8711-230003849e5a",
      "name": "Telegram Group Media",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1328,
        -672
      ],
      "parameters": {
        "url": "https://api.telegram.org/bot[[bot token]]/sendMediaGroup",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"chat_id\": \"{{ $('Telegram Trigger').first().json.message ? $('Telegram Trigger').first().json.message.chat.id : $('Telegram Trigger').first().json.callback_query.message.chat.id }}\",\n  \"media\": {{ JSON.stringify($input.all().filter(item => item.json.id && item.json.id.trim() !== '').map(item => ({ type: \"photo\", media: item.json.id.trim() }))) }},\n  \"disable_notification\": false,\n  \"protect_content\": false,\n  \"reply_to_message_id\": null,\n  \"allow_sending_without_reply\": true\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "04929513-d376-4fff-a263-13805910e7c3",
      "name": "If6",
      "type": "n8n-nodes-base.if",
      "position": [
        -1552,
        -672
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "17e16dea-6fce-46a2-9cc0-4f3579a6c4ed",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $input.all().filter(item => item.json.id && item.json.id.trim() !== '').length }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c1e84ab7-a0d5-4b1a-8150-87c03cba560a",
      "name": "HTTP Request3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1424,
        -3048
      ],
      "parameters": {
        "url": "https://your-wp-site/wp-json/wc/v3/products",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "={{ $json.product_name }}"
            },
            {
              "name": "type",
              "value": "simple"
            },
            {
              "name": "status",
              "value": "draft"
            },
            {
              "name": "description",
              "value": "={{ $('Product Description Generation1').item.json.text }}"
            },
            {
              "name": "slug",
              "value": "={{ $('Slug Generation1').item.json.text }}"
            },
            {
              "name": "images",
              "value": "={{ $('Code in JavaScript6').item.json.images }}"
            },
            {
              "name": "regular_price",
              "value": "={{ $json.regular_price }}"
            },
            {
              "name": "sale_price",
              "value": "={{ $json.sale_price }}"
            },
            {
              "name": "short_description",
              "value": "={{ $('Short Description Generation1').item.json.text }}"
            },
            {
              "name": "virtual",
              "value": "false"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "wooCommerceApi"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "3GgviDcfZZLbbl5i",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f44ba81a-5515-466b-bcb1-2a49b0a1c3f4",
      "name": "Get row(s)1",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1200,
        -3048
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "0d9b1080-1718-4a1a-b9b0-6a444dbbb49f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        760,
        -2824
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"title\": \"\",\n\t\"alt_tag\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "c049fb14-ea6f-43cb-a0fd-10315535e2ac",
      "name": "Google Gemini Chat Model7",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        632,
        -2824
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9c282cba-6008-42ca-ad86-08af3f71fae1",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        624,
        -3048
      ],
      "parameters": {
        "text": "=You're a SEO optimization executive. Based on the product name :{{ $('Get row(s)2').item.json.product_name }}, Create a image title and alt tag for image provided here {{ $json.data || $json.image_url || $json }}. The alt tag and title should be relevant to the details visible in the image and product name provided above. The title and alt tag should be in limits prescribed for better rankings on search engines like Google, Bing etc. Title should not be same for every image. It should user relevant keywords that can be used instead of just using product name as title. Product name should be used for title for the first image only. \n\n** In the output don't state any fluff. Just state the Title and Alt Tag for the images.",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "4d6e6caf-dc04-4359-8faf-31c269e0612a",
      "name": "Code in JavaScript6",
      "type": "n8n-nodes-base.code",
      "position": [
        976,
        -3048
      ],
      "parameters": {
        "jsCode": "// 1. Get data from the two different source nodes\nconst imageUrlItems = $('HTTP Request2').all();\nconst aiOutputItems = items;\n\n// 2. Initialize an empty array to store the final, merged result\nconst finalImagesArray = [];\n\n// 3. Loop through the items to combine them\nfor (let i = 0; i < imageUrlItems.length; i++) {\n\n  const src = imageUrlItems[i].json.image_url;\n  \n  // --- THIS IS THE FIX ---\n  // The AI output is already an object, so we use it directly.\n  // We no longer need JSON.parse().\n  const aiData = aiOutputItems[i].json.output;\n  \n  // Extract the title and alt_tag from the object\n  const name = aiData.title;\n  const alt = aiData.alt_tag;\n  \n  // 4. Create the new object in your desired format\n  const newImageObject = {\n    src: src,\n    name: name,\n    alt: alt\n  };\n  \n  // 5. Add the newly created object to our final array\n  finalImagesArray.push(newImageObject);\n}\n\n// 6. Return a single item with an 'images' property\nreturn [{\n  json: {\n    images: finalImagesArray\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "9dcf6cef-89bc-4d9b-a745-2c8c7f507783",
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        -3048
      ],
      "parameters": {
        "url": "={{ $json.image_url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "e7e21c37-59fd-4342-881d-987bdf970904",
      "name": "Code in JavaScript5",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        -3048
      ],
      "parameters": {
        "jsCode": "// Get all input items and extract image_urls\nconst items = $input.all();\nlet results = [];\n\nitems.forEach(item => {\n  if (item.json.image_urls) {\n    item.json.image_urls.split(',').forEach(url => {\n      const trimmedUrl = url.trim();\n      if (trimmedUrl) {\n        // Remove trailing \" if present\n        const cleanUrl = trimmedUrl.replace(/\\\"$/, '');\n        results.push({ json: { image_url: cleanUrl } });\n      }\n    });\n  }\n});\n\n// Return individual items\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "5d0110a0-0b77-43ce-8f29-58e26458ed14",
      "name": "Get row(s)2",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -48,
        -3048
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7165b34c-23a0-4c8d-9dbd-3c3bc7f9eae8",
      "name": "Send a text message12",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1648,
        -3048
      ],
      "webhookId": "ec2d819d-5f8e-481f-b04d-9d9f2e8c1c48",
      "parameters": {
        "text": "=Your Product : {{ $json.name }} has been successfully added into drafts section of your WooCommerce Store. \n\nTap on /start to create a new product. ",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ff8ce72d-63c3-4419-8826-93336d48beeb",
      "name": "HTTP Request4",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1424,
        -3448
      ],
      "parameters": {
        "url": "https://yourwp-website/wp-json/wc/v3/products",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "={{ $json.product_name }}"
            },
            {
              "name": "type",
              "value": "simple"
            },
            {
              "name": "status",
              "value": "draft"
            },
            {
              "name": "description",
              "value": "={{ $('Product Description Generation').item.json.text }}"
            },
            {
              "name": "slug",
              "value": "={{ $('Slug Generation').item.json.text }}"
            },
            {
              "name": "images",
              "value": "={{ $('Code in JavaScript7').item.json.images }}"
            },
            {
              "name": "regular_price",
              "value": "={{ $json.regular_price }}"
            },
            {
              "name": "sale_price",
              "value": "={{ $json.sale_price }}"
            },
            {
              "name": "short_description",
              "value": "={{ $('Short Description Generation').item.json.text }}"
            },
            {
              "name": "virtual",
              "value": "false"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "wooCommerceApi"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "3GgviDcfZZLbbl5i",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d4dadf7e-4715-47d3-b1a4-4b7d932f4a3c",
      "name": "Get row(s)4",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1200,
        -3448
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "3b9c059a-fd1d-46e5-a8bd-0e93a8f3466c",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        760,
        -3328
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"title\": \"\",\n\t\"alt_tag\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8620b657-2180-4054-9083-6aa9c1afd585",
      "name": "Google Gemini Chat Model8",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        632,
        -3328
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qHXHTgH8Icn3E9u3",
          "name": "Gemini Api (mattakshitij)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "87d045ce-33c2-4de4-b37e-3d31423c08f2",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        624,
        -3552
      ],
      "parameters": {
        "text": "=You're a SEO optimization executive. Based on the product name :{{ $('Get row(s)5').item.json.product_name }}, Create a image title and alt tag for image provided here {{ $json.data || $json.image_url || $json }}. The alt tag and title should be relevant to the details visible in the image and product name provided above. The title and alt tag should be in limits prescribed for better rankings on search engines like Google, Bing etc. Title should not be same for every image. It should user relevant keywords that can be used instead of just using product name as title. Product name should be used for title for the first image only. \n\n** In the output don't state any fluff. Just state the Title and Alt Tag for the images.",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "5bc8f3d2-4b05-4cee-99e1-4568797af65a",
      "name": "Code in JavaScript7",
      "type": "n8n-nodes-base.code",
      "position": [
        976,
        -3448
      ],
      "parameters": {
        "jsCode": "// 1. Get data from the two different source nodes\nconst imageUrlItems = $('HTTP Request5').all();\nconst aiOutputItems = items;\n\n// 2. Initialize an empty array to store the final, merged result\nconst finalImagesArray = [];\n\n// 3. Loop through the items to combine them\nfor (let i = 0; i < imageUrlItems.length; i++) {\n\n  const src = imageUrlItems[i].json.image_url;\n  \n  // --- THIS IS THE FIX ---\n  // The AI output is already an object, so we use it directly.\n  // We no longer need JSON.parse().\n  const aiData = aiOutputItems[i].json.output;\n  \n  // Extract the title and alt_tag from the object\n  const name = aiData.title;\n  const alt = aiData.alt_tag;\n  \n  // 4. Create the new object in your desired format\n  const newImageObject = {\n    src: src,\n    name: name,\n    alt: alt\n  };\n  \n  // 5. Add the newly created object to our final array\n  finalImagesArray.push(newImageObject);\n}\n\n// 6. Return a single item with an 'images' property\nreturn [{\n  json: {\n    images: finalImagesArray\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "f1bd1654-e41a-49cd-bd87-e16f817ee0b1",
      "name": "HTTP Request5",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        -3448
      ],
      "parameters": {
        "url": "={{ $json.image_url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "a49ae370-983c-4c6a-bf6c-fd07ba8cd08e",
      "name": "Code in JavaScript8",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        -3448
      ],
      "parameters": {
        "jsCode": "// Get all input items and extract image_urls\nconst items = $input.all();\nlet results = [];\n\nitems.forEach(item => {\n  if (item.json.image_urls) {\n    item.json.image_urls.split(',').forEach(url => {\n      const trimmedUrl = url.trim();\n      if (trimmedUrl) {\n        // Remove trailing \" if present\n        const cleanUrl = trimmedUrl.replace(/\\\"$/, '');\n        results.push({ json: { image_url: cleanUrl } });\n      }\n    });\n  }\n});\n\n// Return individual items\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "c96e3e59-6b66-4f10-b1d0-620588d344e3",
      "name": "Get row(s)5",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -16,
        -3440
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8d6c067d-0b6d-4af9-84d5-7a18b4058f8d",
      "name": "Send a text message13",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1648,
        -3448
      ],
      "webhookId": "ec2d819d-5f8e-481f-b04d-9d9f2e8c1c48",
      "parameters": {
        "text": "=Your Product : {{ $json.name }} has been successfully added into drafts section of your WooCommerce Store. \n\nTap on /start to create a new product. ",
        "chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "afe15bf2-c4f8-45c9-9ab6-b476c185429b",
      "name": "If /abort",
      "type": "n8n-nodes-base.if",
      "position": [
        -4592,
        -3168
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9ee63533-eebc-4b79-89e9-520e07a9c02a",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $node[\"Telegram Trigger\"].json.message ? $node[\"Telegram Trigger\"].json.message.text : $node[\"Telegram Trigger\"].json.callback_query.data }}",
              "rightValue": "/abort"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6311150e-f9c2-44bc-bad2-d4e197e7314c",
      "name": "Delete row(s)2",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -4368,
        -3184
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "deleteRows",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "qFqXa5ghHDipCS4s",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/qFqXa5ghHDipCS4s",
          "cachedResultName": "WooCommerce Product Manager"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "087ae409-f94d-4367-9f62-a795418da7c7",
      "name": "Delete row(s)3",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -4144,
        -3184
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $node[\"Telegram Trigger\"].json[\"message\"] ? $node[\"Telegram Trigger\"].json[\"message\"][\"chat\"][\"id\"] : $node[\"Telegram Trigger\"].json[\"callback_query\"][\"message\"][\"chat\"][\"id\"] }}"
            }
          ]
        },
        "options": {},
        "operation": "deleteRows",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "P9dj7J80M07qtEtc",
          "cachedResultUrl": "/projects/YYiwacWxzStWfbnW/datatables/P9dj7J80M07qtEtc",
          "cachedResultName": "User_Images (Woocommerce)"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "38f5ae1e-24f1-453d-be45-ecc0c2b7a296",
      "name": "Send a text message11",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3920,
        -3184
      ],
      "webhookId": "cd875d80-9614-44eb-821b-766430501b1c",
      "parameters": {
        "text": "The Product Creation Process has been aborted. Please type or tap on /start to create a new product.",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "BlDi2NrXltW8tlCg",
          "name": "WooCommerce Product Manager"
        }
      },
      "executeOnce": true,
      "typeVersion": 1.2
    },
    {
      "id": "c582585c-5c5a-4f89-b069-cbb483032fe2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6480,
        -3456
      ],
      "parameters": {
        "width": 1024,
        "height": 1488,
        "content": "# Telegram Bot based WooCommerce Product Creator\n\n## How it works?\n\n- Conversational Interface: The workflow is operated via a Telegram bot. \n\n- State Management: It tracks user progress using Data Table and Switch nodes, ensuring the bot remembers where you left off (e.g., \"awaiting_images\" or \"awaiting_price\").\n\n- AI Copywriting: Once the data is collected, AI Agent analyzes the data to generate a professional product description, a punchy short description, and an SEO-optimized URL slug.\n\n- Image's SEO Optimization: An AI Agent analyzes each uploaded image to create unique SEO Optimized Titles, Alt Tags\n\n- WooCommerce Automation: After the user approves the summary in Telegram, the workflow sends a formatted JSON payload to the WooCommerce REST API to create the product a.\n\n- Cleanup: Once the process is finished or aborted, data tables are cleaned.\n\n## How to use? \n\n- Initial Setup: You must replace the placeholder WooCommerce URL (https://your-wp-site/) and Telegram Bot tokens with your own credentials.\n\n- Commands: Send /start to the bot to begin the creation process. Use /abort at any time to cancel the current session and clear stored data.\n\n- Workflow's Flow: Follow the bot's prompts. When uploading images, tap the \"Done\" inline button to move to the pricing step.\n\n- Approval: The bot will send a \"Review\" message with all details. Tap \"Approve\" to send the data to WooCommerce.\n\n## Requirements:\n\n1. Telegram Bot: A bot token from @BotFather.\n\n2. LLM's API: An API key to power the LangChain and AI Agent nodes.\n\n3. WooCommerce API: A Consumer Key and Consumer Secret with \"Read/Write\" permissions.\n\n4. n8n Data Tables: You will need to create two Data Tables: one for WooCommerce Product Manager (session state) and one for User_Images (temporary image storage) with following fields:\n\n### a. WooCommerce Product Manager\n\n- chat_id (String)\n- current_step (String)\n- product_name (String)\n- image_urls (String)\n- features (String)\n- regular_price (String)\n- sale_price (String)\n\n \n### b. User_Images\n\n- chat_id (String)\n- file_id (String)\n- image_url (String)\n\n\n## Need Help?\n\n[Ping me on X](https://x.com/matta_kshitij) or [Refer to n8n community](https://community.n8n.io/)!\n\nHappy Automation!\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "55c35b59-be36-48fd-a692-5f256cc24cf8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5088,
        -3200
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 240,
        "content": "## Bot Trigger & State Query\n\nTelegram trigger polls for callback queries and messages and checks the current status of user in the process of product creation."
      },
      "typeVersion": 1
    },
    {
      "id": "92b47457-5df8-40dc-ad8e-08a50b651c6b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4576,
        -3536
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 240,
        "content": "## Check for Abort Command\n\nIf during the process of product creation user uses abort command, then it resets both data tables and notifies user about it"
      },
      "typeVersion": 1
    },
    {
      "id": "7d7a7ae0-f58f-4512-8c80-bc157c5134ef",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4352,
        -2704
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 304,
        "content": "## Check for Chat ID field in WooCommerce Product Manager Data Table\n\nIf a user is in the middle of product creation process then it is passed through to check for relevant steps in product creation process, if not then it's diverted user to prompt for a fresh start."
      },
      "typeVersion": 1
    },
    {
      "id": "a5fa5d49-5895-4a79-8346-28d3aecdfa89",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3600,
        -4144
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 304,
        "content": "## Check for /start in Telegram Message\n\nIf /start is found in telegram message, the Chat ID is logged in State Management Data Table and Step is Update to awaiting name. If /start is not found and chat id is empty then it is a result of /abort command. And as aborting is a process of part too and chat ID is removed after the initiation of abort prompt, the user is prompted to use the start command."
      },
      "typeVersion": 1
    },
    {
      "id": "67a014b8-b20a-4437-908c-4ec0970a7a2b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2736,
        -3824
      ],
      "parameters": {
        "color": 7,
        "width": 928,
        "height": 336,
        "content": "# Check for approve_product in Telegram Callback Query\n\nIf Appove button is pressed in telegram bot, it proceeds to product creation with information provided by the user"
      },
      "typeVersion": 1
    },
    {
      "id": "0e46c8e4-b869-45f6-b255-8cfed76e5e83",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        -3648
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 208,
        "content": "## Check for Features\nChecks if features are provided or not by the user"
      },
      "typeVersion": 1
    },
    {
      "id": "346e06dd-b868-4617-9a89-ba4d8e6ab0b8",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        -4016
      ],
      "parameters": {
        "color": 7,
        "width": 2848,
        "height": 336,
        "content": "## If Features are provided by the user\n\nThe workflow utilises the information provided along with features to create Description, Short Description, Slug and then it creates the product with provide information on WooCommerce and notifies the user about product creation. "
      },
      "typeVersion": 1
    },
    {
      "id": "0a5a3252-eb9e-4b7a-aad5-94be63f68043",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        -2624
      ],
      "parameters": {
        "color": 7,
        "width": 2896,
        "height": 336,
        "content": "## If Features are not provided by the user\n\nThe workflow utilises the information provided along to create Description, Short Description, Slug and then it creates the product with provide information on WooCommerce and notifies the user about product creation. "
      },
      "typeVersion": 1
    },
    {
      "id": "3aa542d8-67f7-43c4-9636-1e626b831c1a",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2432,
        -3056
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "content": "## If Disapproved\nIf it is disapproved by the user, it sets the state equal to the first step of the process which prompts user for step 1 of process"
      },
      "typeVersion": 1
    },
    {
      "id": "b75f7e4b-a914-44a6-a0e0-2b6577fc0bb2",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2432,
        -2816
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 192,
        "content": "## Asks for Product Name\nPrompts the user to enter product name and changes the current step in data table to awaiting images"
      },
      "typeVersion": 1
    },
    {
      "id": "5e283689-4ada-418a-8f6e-93537a984b0d",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -2528
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 192,
        "content": "## If User has clicked Done button after Uploading Images on Telegram bot\nImage URLs added into the user images data table are separated by a comma and user is prompted to go to next step"
      },
      "typeVersion": 1
    },
    {
      "id": "e25c6dd7-730b-4f91-aca7-62acf9573b36",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -2272
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 224,
        "content": "## If User hasn't clicked Done button after Uploading Images on Telegram bot\nImage URLs are added into the user images data table for each image"
      },
      "typeVersion": 1
    },
    {
      "id": "0e4ea88a-d283-4d03-b679-f338da9b83bf",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -1952
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 192,
        "content": "## If User has clicked None Button for Feature Availability \nCurrent step changes to Awaiting Regular Price and user is prompted to enter Regular Price of the product."
      },
      "typeVersion": 1
    },
    {
      "id": "db9ecfbc-9a50-4ae7-b248-387339d9dd3a",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -1712
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 192,
        "content": "## If User has Provided Features\nCurrent step changes to Awaiting Regular Price and features are added into the Product Manager Data Table"
      },
      "typeVersion": 1
    },
    {
      "id": "bde49697-a5c8-4e95-b33d-b0429e2df24d",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -1376
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 192,
        "content": "##  User Provides Regular Price\nCurrent step changes to Awaiting Sale Price and Regular Price is added into the WooCommerce Product Manager Data Table"
      },
      "typeVersion": 1
    },
    {
      "id": "e9ac4bde-6a3d-4bbe-81f4-37a2251944b4",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2944,
        -1040
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 208,
        "content": "## Checks if user presses \"Same\" button for Sale Price\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0722b23b-1f1b-445b-b3d4-15116d904df5",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2112,
        -944
      ],
      "parameters": {
        "color": 7,
        "width": 1056,
        "height": 192,
        "content": "##  User Provides Sale Price\nAdds Sale Price and Prompts user to confirm if all the data is correct or not before asking for approval"
      },
      "typeVersion": 1
    },
    {
      "id": "2b79e2a8-693d-464e-a7a6-c5a4f2610c38",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2176,
        -320
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 192,
        "content": "## Prompts User about completion and Resets Data Table\n\nPrompts user with a message about completion of process and resets data table for new product creation"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false,
    "executionOrder": "v1",
    "timeSavedPerExecution": 25
  },
  "versionId": "f156a835-8104-4e2e-b8ba-e9c5a8d5e833",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Get row(s)3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Send a text message3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Product Description Generation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Product Description Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Get User State1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If4": {
      "main": [
        [
          {
            "node": "Update row(s)3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row(s)4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If5": {
      "main": [
        [
          {
            "node": "Update row(s)6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row(s)7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If6": {
      "main": [
        [
          {
            "node": "Telegram Group Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Get All Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Check Approval Button",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upsert row(s)2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update row(s)5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code in JavaScript6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Code in JavaScript7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If /abort": {
      "main": [
        [
          {
            "node": "Delete row(s)2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        []
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)1": {
      "main": [
        [
          {
            "node": "HTTP Request3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)2": {
      "main": [
        [
          {
            "node": "Code in JavaScript5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)3": {
      "main": [
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)4": {
      "main": [
        [
          {
            "node": "HTTP Request4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)5": {
      "main": [
        [
          {
            "node": "Code in JavaScript8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Data": {
      "main": [
        [
          {
            "node": "Code in JavaScript4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete row(s)": {
      "main": [
        [
          {
            "node": "Delete row(s)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request3": {
      "main": [
        [
          {
            "node": "Send a text message12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request4": {
      "main": [
        [
          {
            "node": "Send a text message13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request5": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)": {
      "main": [
        [
          {
            "node": "Get row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete row(s)2": {
      "main": [
        [
          {
            "node": "Delete row(s)3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete row(s)3": {
      "main": [
        [
          {
            "node": "Send a text message11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User State": {
      "main": [
        [
          {
            "node": "If /abort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)1": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)3": {
      "main": [
        [
          {
            "node": "Send a text message2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)4": {
      "main": [
        [
          {
            "node": "Send a text message6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)5": {
      "main": [
        [
          {
            "node": "Send a text message7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)6": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row(s)7": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Upsert row(s)1": {
      "main": [
        [
          {
            "node": "Send a text message10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert row(s)2": {
      "main": [
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User State1": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slug Generation": {
      "main": [
        [
          {
            "node": "Get row(s)5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slug Generation1": {
      "main": [
        [
          {
            "node": "Get row(s)2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Get User State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "Update row(s)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript4": {
      "main": [
        [
          {
            "node": "If6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript5": {
      "main": [
        [
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript6": {
      "main": [
        [
          {
            "node": "Get row(s)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript7": {
      "main": [
        [
          {
            "node": "Get row(s)4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript8": {
      "main": [
        [
          {
            "node": "HTTP Request5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message3": {
      "main": [
        [
          {
            "node": "Upsert row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message4": {
      "main": [
        [
          {
            "node": "Delete row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message8": {
      "main": [
        []
      ]
    },
    "Send a text message9": {
      "main": [
        [
          {
            "node": "Update row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Group Media": {
      "main": [
        [
          {
            "node": "Send a text message8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Approval Button": {
      "main": [
        [
          {
            "node": "Send a text message9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upsert row(s)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Product Description Generation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Short Description Generation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Product Description Generation1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Slug Generation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Short Description Generation1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Slug Generation1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model7": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model8": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Short Description Generation": {
      "main": [
        [
          {
            "node": "Slug Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Short Description Generation1": {
      "main": [
        [
          {
            "node": "Slug Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Description Generation": {
      "main": [
        [
          {
            "node": "Short Description Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Description Generation1": {
      "main": [
        [
          {
            "node": "Short Description Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}