{
  "name": "Automa\u00e7\u00e3o Analisador de curriculos Com IA",
  "nodes": [
    {
      "parameters": {
        "formTitle": "vaga de programa\u00e7ao",
        "formFields": {
          "values": [
            {
              "fieldLabel": "nome",
              "placeholder": "informe o seu nome",
              "requiredField": true
            },
            {
              "fieldLabel": "curriculo",
              "fieldType": "file",
              "acceptFileTypes": ".pdf",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        0,
        0
      ],
      "id": "76623155-baa6-4751-86be-1f711692ec3f",
      "name": "On form submission"
    },
    {
      "parameters": {
        "operation": "pdf",
        "binaryPropertyName": "curriculo",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        208,
        0
      ],
      "id": "7196451e-8622-4938-8636-e8e736170b66",
      "name": "Extract from File"
    },
    {
      "parameters": {
        "model": "llama-3.3-70b-versatile",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        416,
        368
      ],
      "id": "260aece0-14f5-4f06-bc85-34a6e9141dca",
      "name": "Groq Chat Model",
      "credentials": {
        "groqApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "llama-3.3-70b-versatile",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "typeVersion": 1,
      "position": [
        432,
        -80
      ],
      "id": "4d882e77-0730-4943-a33c-5fe2812cd5eb",
      "name": "Groq Chat Model1",
      "credentials": {
        "groqApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n\t\"match\" : true \n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        640,
        -32
      ],
      "id": "abb69d02-574d-4c19-926b-c42f17807568",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1072,
        0
      ],
      "id": "5310ac27-39cd-49f9-aa9a-2ce5172405ab",
      "name": "Merge"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "34ca7d93-e348-4a19-ac6b-0671cdf3ba21",
              "name": "match",
              "value": "={{ $json.output }}",
              "type": "object"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        848,
        -224
      ],
      "id": "a3073dc0-da0a-4bab-af7e-76ee21390228",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9d366f47-e671-47e9-9380-723c4aa3e1b5",
              "name": "resumo",
              "value": "={{ $json.output }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        832,
        176
      ],
      "id": "dbeedd82-dcb4-4623-9902-8a2111bb444b",
      "name": "Edit Fields1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=O curriculo do candidato \u00e9 esse   {{ $json.text }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "quero agora que voc\u00ea me retorne se o curr\u00edculo \u00e9 compat\u00edvel para a vaga de desenvolvedor de software, se sim {\"match\" : true } caso contrario {\"match\" : false }"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        464,
        -240
      ],
      "id": "56749377-4b97-4931-b9c8-ac9d6726a19f",
      "name": "match"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=O curriculo do candidato \u00e9 esse  {{ $json.text }}",
        "options": {
          "systemMessage": "Voc\u00ea ser\u00e1 um examinador de curr\u00edculo, fazendo uma analise qualitativa, destacando pontos fortes e pontos fracos do candidato, fazendo tamb\u00e9m um resumo de no m\u00e1ximo 5 linhas destacando pontos importantes sobre o candidato "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        416,
        160
      ],
      "id": "dc9a6a37-3ad8-40fa-a9c7-794cccf13407",
      "name": "Resumo"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "969b2816-4a3e-4bcc-ae7d-9511b36f9e3d",
              "leftValue": "={{ $json.match.match }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            },
            {
              "id": "15d95d98-55ed-48e5-8456-415a689f531d",
              "leftValue": "={{ $json.resumo }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1280,
        0
      ],
      "id": "958d4f13-ace2-45e1-b57d-4cbd4718254a",
      "name": "If"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "https://docs.google.com/spreadsheets/d/1WfaOtnyFaJbDEsOUSjlkjNIZ2PCQNsKWeDEY_lZCJoA/edit?gid=0#gid=0",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/1WfaOtnyFaJbDEsOUSjlkjNIZ2PCQNsKWeDEY_lZCJoA/edit#gid=0",
          "__regex": "https:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+.*\\#gid=([0-9]+)"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "match": "={{ $json.match.match }}",
            "resumo": "={{ $json.resumo }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "match",
              "displayName": "match",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "resumo",
              "displayName": "resumo",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1440,
        -192
      ],
      "id": "bd34c87d-e9aa-4e18-89be-e23c926994de",
      "name": "Append row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Resumo",
            "type": "main",
            "index": 0
          },
          {
            "node": "match",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Resumo",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "match",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "match",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "match": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resumo": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "795cbdda-69b2-486e-bdd6-30bb642ae64a",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "bZFeGRwGASCPcx9c",
  "tags": []
}