{
  "id": "Q8DKiKn5wqH9zDjB",
  "meta": {
    "instanceId": "6fcb279fd6b00187153abdc6d8b627acfd9fe31f84b387f64b56a0996e8ea182"
  },
  "name": "Generate visual resumes from Telegram inputs using Google Gemini & BrowserAct",
  "tags": [],
  "nodes": [
    {
      "id": "5521c9ff-ed2f-4c25-85b2-8c18ad5476af",
      "name": "Download Resume",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        544
      ],
      "parameters": {
        "url": "={{ $json.Resume }}",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "c15f27ea-5bda-4131-96c1-64199e334d25",
      "name": "Notify User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -896,
        336
      ],
      "webhookId": "23e1fb3a-33d8-40fa-aa49-08b320348b0a",
      "parameters": {
        "text": "=Ok, I will do it please give me a moment.",
        "chatId": "=parameters.chatId=={{ $('User Sends Message to Bot').item.json.message.chat.id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "gJnGTVzNOeiM3LHZ",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "25ebb9a3-0238-4c1d-8fdc-87bf8691e29e",
      "name": "Structured Output2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1024,
        272
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"Image_Prompt\": \"<YOUR_HUGE_DETAILED_PROMPT_STRING_HERE>\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9f9dcdb8-6d81-4363-a808-b193752f58a3",
      "name": "Google Gemini3",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        896,
        272
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9pXYiybR74j5zn4d",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fb3921e9-1577-42b8-9f52-eb4bec5438a0",
      "name": "Resume Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        464,
        96
      ],
      "parameters": {
        "text": "=Template Examples : {{ $json.data[0][\"Resume Details\"] }},\nUser Resume : {{ $('Validate user Input').first().json.output.Resume }},\nCategory : {{ $('Validate user Input').first().json.output.Category }}\n\nyou need to use user resume data for final ouput.",
        "options": {
          "systemMessage": "# Role\nYou are the **Senior Resume Architect & Design System Engine**. You possess expert knowledge in visual design, typography hierarchy, and color psychology.\n\n# Context\nYou will be provided with two distinct inputs:\n1.  **Design Knowledge Base (JSON):** A dataset of resume templates. Each entry contains a `row_number` and a text field called `Resume Details` describing a specific visual style (colors, layout, fonts, shapes).\n2.  **Candidate Profile:** The raw text or structured data of a job applicant's resume.\n\n# Your Mission\nYour goal is to autonomously select the most appropriate design from the Knowledge Base and generate a **machine-readable Visual Blueprint** in JSON format. This blueprint will be used by a renderer to reconstruct the resume pixel-perfectly.\n\n# Operational Steps\n\n## Step 1: Semantic Design Matching\nAnalyze the **Candidate Profile** to determine their industry, seniority, and professional archetype. compare this against the \"Aesthetic\" and \"Vibe\" described in the **Design Knowledge Base**.\n* **Logic Rule A:** If the candidate is in Healthcare, Education, HR, or childcare, prioritize designs described as \"Nurturing,\" \"Soft,\" \"Human-Centric,\" or layouts using soft colors (e.g., Pink/Pastel).\n* **Logic Rule B:** If the candidate is in Logistics, Engineering, Data, or Construction, prioritize designs described as \"Industrial,\" \"Structural,\" \"Monochrome,\" or layouts using dark/high-contrast headers.\n* **Logic Rule C:** If the candidate is in Law, Research, Finance, or Administration, prioritize designs described as \"Classic,\" \"Linear,\" \"Academic,\" or layouts using conservative colors (Maroon/Navy) and clean lines.\n\n## Step 2: Visual Extraction\nOnce a `row_number` is selected, extract every visual parameter from its `Resume Details` text. You must not hallucinate details; use the specific Hex codes, specific font styles (Sans-Serif/Serif), and specific layout rules provided in that text.\n\n## Step 3: Content Mapping\nMap the Candidate's raw data into the selected layout's constraints. Decide exactly where the Name, Contact Info, Skills, and Experience will be placed based on the design rules (e.g., \"Left Sidebar\" vs \"Top Header\").\n\n# Output Specification (Strict JSON)\nYou must output **ONLY** a single valid JSON object. Do not output markdown blocks (```json), do not output conversational text, and do not output explanations outside the JSON.\n\nThe JSON must follow this exact schema:\n\n{\n  \"Resume\": {\n    \"meta\": {\n      \"candidate_name\": \"<Extracted Name>\",\n      \"candidate_industry\": \"<Detected Industry>\",\n      \"selected_design_row_number\": \"<Integer from the input JSON>\",\n      \"match_reasoning\": \"<Explain why this design fits this candidate's industry based on the 'Vibe' description>\"\n    },\n    \"visual_blueprint\": {\n      \"layout_engine\": {\n        \"structure_type\": \"<e.g., Asymmetrical 2-Column, Offset Single-Column, Linear>\",\n        \"column_ratio\": \"<e.g., 35% Left / 65% Right>\",\n        \"margins_and_padding\": \"<Detailed description of whitespace/padding rules from the text>\"\n      },\n      \"color_system\": {\n        \"background_hex\": \"<Precise Hex Code from text>\",\n        \"primary_text_hex\": \"<Precise Hex Code from text>\",\n        \"header_background_hex\": \"<Precise Hex Code from text or 'None'>\",\n        \"accent_hex\": \"<Precise Hex Code or 'None'>\",\n        \"aesthetic_vibe\": \"<e.g., Industrial, Nurturing, Academic>\"\n      },\n      \"typography_hierarchy\": {\n        \"level_1_name\": {\n          \"font_style\": \"<e.g., Sans-Serif, Geometric>\",\n          \"casing\": \"<e.g., UPPERCASE, Title Case>\",\n          \"weight\": \"<e.g., Bold, Heavy>\",\n          \"tracking\": \"<e.g., Wide Letter Spacing, Normal>\"\n        },\n        \"level_2_headers\": {\n          \"style\": \"<e.g., Enclosed in Box, Underlined, Dotted Line>\",\n          \"alignment\": \"<e.g., Left Aligned, Floating Left>\"\n        },\n        \"level_3_body\": {\n          \"font_style\": \"<e.g., Standard Sans-Serif>\",\n          \"list_style\": \"<e.g., Bullet points, paragraphs>\"\n        }\n      },\n      \"graphical_elements\": {\n        \"dividers\": \"<Describe specific lines: Solid, Dotted, Hairline>\",\n        \"shapes\": \"<Describe specific shapes: Full-bleed banners, Sidebar blocks, Boxed anchors>\",\n        \"icons_used\": \"<true/false>\"\n      },\n      \"data_placement_instructions\": {\n        \"header_area\": \"<What data goes here? e.g., Name + Contact>\",\n        \"sidebar_area\": \"<What data goes here? e.g., Skills, Education, or 'None'>\",\n        \"main_content_area\": \"<What data goes here? e.g., Work History, Summary>\"\n      }\n    }\n  }\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "386f1921-79d0-4955-a99d-9a4fb49ef5e1",
      "name": "Structured Output1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        592,
        272
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"Resume\": {\n    \"meta\": {\n      \"candidate_name\": \"<Extracted Name>\",\n      \"candidate_industry\": \"<Detected Industry>\",\n      \"selected_design_row_number\": \"<Integer from the input JSON>\",\n      \"match_reasoning\": \"<Explain why this design fits this candidate's industry based on the 'Vibe' description>\"\n    },\n    \"visual_blueprint\": {\n      \"layout_engine\": {\n        \"structure_type\": \"<e.g., Asymmetrical 2-Column, Offset Single-Column, Linear>\",\n        \"column_ratio\": \"<e.g., 35% Left / 65% Right>\",\n        \"margins_and_padding\": \"<Detailed description of whitespace/padding rules from the text>\"\n      },\n      \"color_system\": {\n        \"background_hex\": \"<Precise Hex Code from text>\",\n        \"primary_text_hex\": \"<Precise Hex Code from text>\",\n        \"header_background_hex\": \"<Precise Hex Code from text or 'None'>\",\n        \"accent_hex\": \"<Precise Hex Code or 'None'>\",\n        \"aesthetic_vibe\": \"<e.g., Industrial, Nurturing, Academic>\"\n      },\n      \"typography_hierarchy\": {\n        \"level_1_name\": {\n          \"font_style\": \"<e.g., Sans-Serif, Geometric>\",\n          \"casing\": \"<e.g., UPPERCASE, Title Case>\",\n          \"weight\": \"<e.g., Bold, Heavy>\",\n          \"tracking\": \"<e.g., Wide Letter Spacing, Normal>\"\n        },\n        \"level_2_headers\": {\n          \"style\": \"<e.g., Enclosed in Box, Underlined, Dotted Line>\",\n          \"alignment\": \"<e.g., Left Aligned, Floating Left>\"\n        },\n        \"level_3_body\": {\n          \"font_style\": \"<e.g., Standard Sans-Serif>\",\n          \"list_style\": \"<e.g., Bullet points, paragraphs>\"\n        }\n      },\n      \"graphical_elements\": {\n        \"dividers\": \"<Describe specific lines: Solid, Dotted, Hairline>\",\n        \"shapes\": \"<Describe specific shapes: Full-bleed banners, Sidebar blocks, Boxed anchors>\",\n        \"icons_used\": \"<true/false>\"\n      },\n      \"data_placement_instructions\": {\n        \"header_area\": \"<What data goes here? e.g., Name + Contact>\",\n        \"sidebar_area\": \"<What data goes here? e.g., Skills, Education, or 'None'>\",\n        \"main_content_area\": \"<What data goes here? e.g., Work History, Summary>\"\n      }\n    }\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "ff62e4f9-4069-4b6b-8f93-d09fbefb7909",
      "name": "Google Gemini2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        464,
        272
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9pXYiybR74j5zn4d",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c87bd274-022f-4e59-97e1-a1b79c2e45e4",
      "name": "Clear sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -608,
        528
      ],
      "parameters": {
        "operation": "clear",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "parameter.SheetID == <SheetID>  Or Select From List"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=parameter.SpreadSheetID == <SpreadSheetID>  Or Select From List"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "BSirjWRAwIzOFp7c",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c0607040-a6b2-49a1-b9e8-d30a56a7084a",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -160,
        528
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "7414cf29-b4be-4b56-a7c1-d9cf1cc51dc1",
      "name": "Google Gemini1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -912,
        880
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9pXYiybR74j5zn4d",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dc2ad052-af8c-49c6-8f61-9e9410bc70ae",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1664,
        752
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\"Type\": \"Resume\", \"Category\": \"extracted_Category\" ,\"Resume\" : \"User_Resume\"}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "e363cdbe-87b9-46fc-829a-cab96c471546",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1776,
        784
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9pXYiybR74j5zn4d",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a1c2dd73-b6d6-4864-9f14-416683de08c2",
      "name": "Validate user Input",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1760,
        560
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are an input classification engine. Your sole purpose is to analyze user text and output a JSON object based on specific criteria. Do not generate conversational text; only output the raw JSON.\n\nRules for Classification (evaluated in order of priority):\n\n1. Resume PROCESSING (Priority 1):\nif the user sends a resume or asks to create a resume based on the provided skills or similar content   \n- CRITICAL CHECK: Does the input contain a valid Resume and skills?\n     - IF YES (Link is present):\n       - Set \"Type\" to \" Resume\".\n       - Extract the Category of the user as \" Category \".\n       - Extract and refine user resume input as “Resume”\n       - Output format: {\"Type\": \"Resume\", \"Category\": \"extracted_Category\" ,\"Resume\" : \"User_Resume\"}\n     \n     - IF NO (User Resume is missing):\n       - Treat this strictly as \"NoData\".\n       - Output format: {\"Type\": \"NoData\", \"Category\": \"Null\" , \" Resume \": \"Null\" }\n\n2. REGULAR CHAT (Priority 2):\n   If the user input is a greeting, small talk, or general conversational filler (e.g., \"Hello,\" \"How are you?\", \"Tell me a joke\") without asking for link processing.\n   - Output format: {\"Type\": \"Chat\", \"Link\": \"Null\", \"Resume \": \"Null\" }\n\n3. INSUFFICIENT DATA (Priority 3):\n   If the user input is gibberish, vague, or if it matched the \" Resume \" intent but lacked a User Resume (as per Rule 1).\n   - Output format: {\"Type\": \"NoData\", \"Category \": \"Null\", \"Resume\": \"Null\"}\n\nOutput Constraint:\nReturn ONLY the raw JSON object. Do not wrap it in markdown code blocks. Do not add explanations.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "ad5456a1-c47a-4c15-8579-177d41258b9e",
      "name": "Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        -16
      ],
      "parameters": {
        "width": 380,
        "height": 520,
        "content": "## ⚡ Workflow Overview & Setup\n\n**Summary:** This automation analyzes Telegram inputs to generate professional visual resumes by combining BrowserAct web scraping, CloudConvert processing, and Google Gemini's generative design capabilities.\n\n### Requirements\n* **Credentials:** Telegram, Google Gemini (PaLM), Google Sheets, CloudConvert, BrowserAct.\n* **Mandatory:** BrowserAct API (Template: **AI Resume Replicant**)\n\n### How to Use\n1.  **Credentials:** Set up all required credentials in the n8n credentials section.\n2.  **BrowserAct Template:** Ensure you have the **AI Resume Replicant** template saved in your BrowserAct account.\n3.  **Google Sheets:** Create a sheet with a header row containing \"Resume Details\" to store design data.\n\n### Need Help?\n[How to Find Your BrowserAct API Key & Workflow ID](https://docs.browseract.com)\n[How to Connect n8n to BrowserAct](https://docs.browseract.com)\n[How to Use & Customize BrowserAct Templates](https://docs.browseract.com)"
      },
      "typeVersion": 1
    },
    {
      "id": "88a5e8b7-ff8b-452c-8b4e-86f9375bbca3",
      "name": "Step 1 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        368
      ],
      "parameters": {
        "color": 7,
        "width": 652,
        "height": 144,
        "content": "### 🤖 Step 1: Input Analysis & Routing\n\nThe workflow begins by analyzing incoming Telegram messages to distinguish between general chat and resume generation requests. If a resume intent is detected, the system extracts the user's category and routes the request for processing; otherwise, it handles standard conversation."
      },
      "typeVersion": 1
    },
    {
      "id": "e7e260de-0637-49c8-bcfe-9e9bd4308dd3",
      "name": "Step 2 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        144
      ],
      "parameters": {
        "color": 7,
        "width": 684,
        "content": "### 🕷️ Step 2: BrowserAct Automation & Data Prep\n\nA BrowserAct automation is triggered to retrieve external resume template data, which is then parsed and structured. The system clears previous records from the database to ensure a clean slate before processing the new design inputs."
      },
      "typeVersion": 1
    },
    {
      "id": "e425651c-0f38-427e-9163-ecc912eddde7",
      "name": "Step 3 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        752
      ],
      "parameters": {
        "color": 7,
        "width": 668,
        "height": 144,
        "content": "### 👁️ Step 3: Visual Decomposition\n\nThe workflow converts retrieved resume files into JPG and uses AI to analyze their visual structure. It reverse-engineers the design layout, color palettes, and typography to create a \"visual blueprint\" for the new resume."
      },
      "typeVersion": 1
    },
    {
      "id": "44156c7c-4a17-4a7a-91d0-f022c48fcad2",
      "name": "Step 4 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 620,
        "height": 144,
        "content": "### 🎨 Step 4: AI Design Generation\n\nUtilizing the analyzed design data, the system creates a comprehensive prompt describing the ideal resume layout for the candidate's industry. It then generates a high-quality image of the final resume design and sends it back to the user."
      },
      "typeVersion": 1
    },
    {
      "id": "34627454-d9b4-4fd2-ad31-d2d9499101a5",
      "name": "User Sends Message to Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1936,
        560
      ],
      "webhookId": "a98e8455-ba5a-447e-b928-733483d34db4",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "gJnGTVzNOeiM3LHZ",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d2ea304d-cdf3-4b39-9261-24f61ca1cfd3",
      "name": "Check For Input Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1424,
        544
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9e003f66-d011-459a-a313-b603c0e14551",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.Type }}",
                    "rightValue": "Resume"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "2ebb24ec-bd32-4e96-a022-93d066fda17f",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.Type }}",
                    "rightValue": "Chat"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "24d355dd-efec-4946-96fe-3d82f3ee4d71",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.Type }}",
                    "rightValue": "NoData"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "2fc3f933-841c-4b75-9b6d-0f58f6504862",
      "name": "Run Resume Workflow",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        -896,
        528
      ],
      "parameters": {
        "type": "WORKFLOW",
        "timeout": 7200,
        "workflowId": "70253132134943736",
        "workflowConfig": {
          "value": {},
          "schema": [
            {
              "id": "input-JobHero",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "description": "If left blank, the default value defined in BrowserAct will be used.",
              "displayName": "JobHero",
              "defaultMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "input-JobHero",
            "input-Category"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "open_incognito_mode": false
      },
      "credentials": {
        "browserActApi": {
          "id": "G1U5ih38TKU5wcI5",
          "name": "BrowserAct account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6a3e15d2-500d-4d60-89c1-d3260fae6492",
      "name": "Splitting BrowserAct Items",
      "type": "n8n-nodes-base.code",
      "position": [
        -384,
        528
      ],
      "parameters": {
        "jsCode": "// Get the JSON string using the exact path provided by the user.\nconst jsonString = $input.first().json.output.string;\n\nlet parsedData;\n\n// Check if the string exists before attempting to parse\nif (!jsonString) {\n    // Return an empty array or throw an error if no string is found\n    // Throwing an error is usually better to stop the workflow if data is missing.\n    throw new Error(\"Input string is empty or missing at the specified path: $input.first().json.output.string\");\n}\n\ntry {\n    // 1. Parse the JSON string into a JavaScript array of objects\n    parsedData = JSON.parse(jsonString);\n} catch (error) {\n    // Handle JSON parsing errors (e.g., if the string is malformed)\n    throw new Error(`Failed to parse JSON string: ${error.message}`);\n}\n\n// 2. Ensure the parsed data is an array\nif (!Array.isArray(parsedData)) {\n    throw new Error('Parsed data is not an array. It cannot be split into multiple items.');\n}\n\n// 3. Map the array of objects into the n8n item format { json: object }\n// Each element in this array will be treated as a new item by n8n, achieving the split.\nconst outputItems = parsedData.map(item => ({\n    json: item,\n}));\n\n// 4. Return the new array of items\nreturn outputItems;"
      },
      "typeVersion": 2
    },
    {
      "id": "915fc10f-b8a0-42c9-bd11-4a20d17f8acd",
      "name": "Chatting With User",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -912,
        736
      ],
      "parameters": {
        "text": "=Input type : {{ $json.output.Type }} | User Input : {{ $('User Sends Message to Bot').item.json.message.text }}",
        "options": {
          "systemMessage": "if the input type is Nodata ask the user to provide the Resume with education, skills and name.\n\nif the input type is chat, analyze the user input and generate single response\n\nsend the result out as a raw text.\navoid using any tags or notations like ```text ```"
        },
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "c2b616bd-0384-4532-9ba5-235c3d12c720",
      "name": "SVG To JPG",
      "type": "@cloudconvert/n8n-nodes-cloudconvert.cloudConvert",
      "position": [
        608,
        544
      ],
      "parameters": {
        "outputFormat": "jpg"
      },
      "credentials": {
        "cloudConvertOAuth2Api": {
          "id": "G0ciopniMabxoUXg",
          "name": "CloudConvert account 2"
        }
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "e558b724-28e8-4229-a9e1-403d9a10e23b",
      "name": "Analyze Resume image",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        816,
        544
      ],
      "parameters": {
        "text": "You are a Creative Director Expert. Your goal is to analyze the raw image of a jpeg resume to reverse-engineer its visual design, layout structure, and aesthetic \"vibe\" to provide design inspiration for the user.\n\nPrimary Objective: Translate the Image (coordinates, shapes, styles, and grouping) into a vivid visual description of the layout, color palette, and typographic hierarchy.\n\nOperational Protocols:\n\n1. Layout & Spatial Analysis (The \"Where\")\n\nCoordinate Mapping: Analyze x and y coordinates and <g> groupings to determine the page structure.\n\nSidebar Detection: Look for specific background rectangles (<rect>) or text aligned to the far left/right to identify if there is a sidebar/rail.\n\nHeader Analysis: Check the top y coordinates. Is the name centered, left-aligned, or huge?\n\nGrid Structure: Determine if the content is Single Column, Two-Column (50/50), or Asymmetrical (e.g., 30/70 split).\n\nWhitespace: Look for gaps in coordinate clusters to describe the spacing and \"breathing room\" of the design.\n\n2. Aesthetic & Stylistic Analysis (The \"Look\")\n\nColor Palette: Extract fill and stroke hex codes. Convert these into descriptive color names (e.g., \"Slate Grey,\" \"Electric Blue,\" \"Soft Pastel\"). Describe the mood (Professional, Creative, Dark Mode, Minimalist).\n\nTypography: Analyze font-family, font-weight, and relative font-size.\n\nIs the design using serif (classic) or sans-serif (modern) fonts?\n\nHow does it distinguish headers? (e.g., \"Headers are All-Caps and Bold,\" or \"Headers are colored blue\").\n\nGraphic Elements: Identify decorative elements like:\n\nLine separators (<line> or <path>).\n\nIcons or circular photo masks (<clipPath>, <circle>).\n\nBackground patterns or gradients (<linearGradient>).\n\n3. Output Formatting Rules Provide a descriptive breakdown categorized for design inspiration:\n\n1. The Layout Blueprint\n\nStructure: [e.g., \"A classic 2-column layout with a dark left sidebar taking up 30% of the width.\"]\n\nHeader Style: [e.g., \"Massive, centered name header that spans the full width.\"]\n\nSectioning: [e.g., \"Sections are separated by thin horizontal gray lines.\"]\n\n2. Color & Vibe\n\nPrimary Colors: [List dominant colors]\n\nAccent Colors: [List highlight colors used for links or headers]\n\nAesthetic: [e.g., \"Corporate Minimalist,\" \"Tech-Dark Mode,\" or \"Playful/Creative.\"]\n\n3. Typography & Hierarchy\n\nFont Style: [Description of font usage]\n\nEmphasis: [How they highlight skills—bolding? capsules? colored text?]\n\n4. Unique Design Features (Inspiration)\n\n[List 1-2 cool code-based design tricks found, e.g., \"A cool circular progress bar for language skills\" or \"A distinct geometric background pattern.\"]",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-3-pro-preview",
          "cachedResultName": "models/gemini-3-pro-preview"
        },
        "options": {},
        "resource": "image",
        "inputType": "binary",
        "operation": "analyze"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9pXYiybR74j5zn4d",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "executeOnce": false,
      "typeVersion": 1
    },
    {
      "id": "5b790b27-a250-403f-844f-ef34d114e8ca",
      "name": "Save Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1056,
        544
      ],
      "parameters": {
        "columns": {
          "value": {
            "Resume Details": "={{ $json.content.parts[0].text }}"
          },
          "schema": [
            {
              "id": "Resume Details",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Resume Details",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Resume Details"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "=parameter.SheetID == <SheetID>  Or Select From List"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=parameter.SpreadSheetID == <SpreadSheetID> Or Select From List"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "BSirjWRAwIzOFp7c",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "27b1f40d-c146-44f6-bb1b-7774b0cc4393",
      "name": "Resume Visualization",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        896,
        96
      ],
      "parameters": {
        "text": "={{ $json.output.Resume }}",
        "options": {
          "systemMessage": "# Role\nYou are the **Nano Banana Pro Prompt Specialist**. You are an expert in converting structured data into highly technical, parameter-rich image generation prompts.\n\n# Input Data\nYou will receive a JSON object with the key `\"Resume\"`. This object contains a \"Visual Blueprint\" describing a specific resume design (layout, hex codes, fonts, lines, and arrangement).\n\n# Your Mission\nTransform the input JSON into a single, comprehensive **natural language prompt** optimized for the \"Nano Banana Pro\" image generator. You must describe every visual element in excruciating detail to ensure the generated image matches the blueprint exactly.\n\n# Guidelines for the Generated Prompt\nInside your output JSON, the text string must cover:\n\n1.  **Canvas & Coordinates:**\n    * Explicitly state the aspect ratio (Vertical A4/US Letter).\n    * Define the exact spatial arrangement (e.g., \"A split layout where the left 30% is a sidebar...\").\n    * Mention alignment (e.g., \"Text strictly left-aligned at x-coordinate 50\").\n\n2.  **Colors & Hex Accuracy:**\n    * You **must** include the specific Hex codes found in the input (e.g., \"Background color #45505b\").\n    * Describe the contrast and material (e.g., \"Matte white paper texture\", \"Flat digital vector\").\n\n3.  **Typography & Lines:**\n    * Describe the font characteristics (e.g., \"Heavy geometric sans-serif in all-caps\").\n    * Describe line weights and styles (e.g., \"1px dotted border in maroon\", \"Solid rectangular border\").\n    * Describe specific text hierarchies (e.g., \"Name is the largest element, approx 24pt\").\n\n4.  **Graphical Details:**\n    * Describe any stickers, icons, or UI elements (e.g., \"Circular phone icon\", \"Boxed section anchors\").\n    * Describe whitespace usage (e.g., \"Generous padding around the text blocks\").\n\n# Output Format (Strict JSON)\nYou must output **ONLY** a valid JSON object. No markdown formatting (like ```json), no conversational text.\n\n# Output Format (Strict JSON)\nYou must output **ONLY** a valid JSON object. No markdown, no filler.\n\n{\n  \"Image_Prompt\": \"<YOUR_HUGE_DETAILED_PROMPT_STRING_HERE>\"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "29a409d8-bc77-4ea7-9b86-339ac6256767",
      "name": "Generate Resume",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1280,
        144
      ],
      "parameters": {
        "prompt": "={{ $json.output.Image_Prompt }}",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-3-pro-image-preview",
          "cachedResultName": "models/gemini-3-pro-image-preview (Nano Banana Pro)"
        },
        "options": {
          "binaryPropertyOutput": "data"
        },
        "resource": "image"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "9pXYiybR74j5zn4d",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bb1c7677-b0af-4836-9cad-c3b884bce38d",
      "name": "Send Resume Back",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1472,
        144
      ],
      "webhookId": "85fc60f7-2215-433d-9a33-e85d18e055ea",
      "parameters": {
        "chatId": "=parameters.chatId=={{ $('User Sends Message to Bot').first().json.message.chat.id }}",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "gJnGTVzNOeiM3LHZ",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5e04fa2f-c02e-4486-854f-808afc27d60f",
      "name": "Aggregate Google Sheet Data",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        272,
        208
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "c7ac1d7c-b7fe-4ce6-81ca-29e61b70ae5d",
      "name": "Get Saved Resume",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        80,
        208
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "parameter.SheetID == <SheetID>  Or Select From List"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=parameter.SpreadSheetID == <SpreadSheetID>  Or Select From List"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "BSirjWRAwIzOFp7c",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "7fade35b-af42-420a-9af5-5e1a82e7abd4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -16
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 352,
        "content": "@[youtube](TnObYpgHXSs)"
      },
      "typeVersion": 1
    },
    {
      "id": "aed04091-bc9a-4636-be29-42f4fcd26015",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        432
      ],
      "parameters": {
        "color": 3,
        "width": 256,
        "height": 256,
        "content": "### Google Sheet Headers\nTo use this workflow, create a Google Sheet with the following header:\n* Resume Details"
      },
      "typeVersion": 1
    },
    {
      "id": "4de33096-5416-4777-88fb-74d5a7db003d",
      "name": "Answer the User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -608,
        736
      ],
      "webhookId": "23e1fb3a-33d8-40fa-aa49-08b320348b0a",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "=parameters.chatId=={{ $('User Sends Message to Bot').item.json.message.chat.id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "gJnGTVzNOeiM3LHZ",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bbf9f50e-ade7-4d85-8292-ccb81d7cc0ac",
  "connections": {
    "Save Data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SVG To JPG": {
      "main": [
        [
          {
            "node": "Analyze Resume image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear sheet": {
      "main": [
        [
          {
            "node": "Splitting BrowserAct Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Validate user Input",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Resume Writer": {
      "main": [
        [
          {
            "node": "Resume Visualization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini1": {
      "ai_languageModel": [
        [
          {
            "node": "Chatting With User",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini2": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output1",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Resume Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini3": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output2",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Resume Visualization",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Download Resume": {
      "main": [
        [
          {
            "node": "SVG To JPG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Resume": {
      "main": [
        [
          {
            "node": "Send Resume Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Get Saved Resume",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download Resume",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Saved Resume": {
      "main": [
        [
          {
            "node": "Aggregate Google Sheet Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Validate user Input",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Chatting With User": {
      "main": [
        [
          {
            "node": "Answer the User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output1": {
      "ai_outputParser": [
        [
          {
            "node": "Resume Writer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output2": {
      "ai_outputParser": [
        [
          {
            "node": "Resume Visualization",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Run Resume Workflow": {
      "main": [
        [
          {
            "node": "Clear sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate user Input": {
      "main": [
        [
          {
            "node": "Check For Input Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Resume image": {
      "main": [
        [
          {
            "node": "Save Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check For Input Type": {
      "main": [
        [
          {
            "node": "Run Resume Workflow",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Chatting With User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Chatting With User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resume Visualization": {
      "main": [
        [
          {
            "node": "Generate Resume",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Sends Message to Bot": {
      "main": [
        [
          {
            "node": "Validate user Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Splitting BrowserAct Items": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Google Sheet Data": {
      "main": [
        [
          {
            "node": "Resume Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}