app:
  description: 履歷自動評分，依 PASS/HOLD/REJECT 三向產生個人化通知信，並用 Gmail 寄給應徵者。
  icon: 🧑‍💼
  icon_background: '#FCE7F3'
  icon_type: emoji
  mode: workflow
  name: 履歷初篩與自動通知信
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/anthropic:0.3.24@c5e50da8c13c7ac75348df5ac75b9418c79736eb506064669dd7ca06cbd83537
    version: null
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/dify-gmail:0.2.6@a532c62b7ba405169a464e251df742c3615aa417c3390edc64cdeeb1875f9fef
    version: null
kind: app
version: 0.6.0
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      enabled: false
      fileUploadConfig:
        attachment_image_file_size_limit: 2
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        file_upload_limit: 20
        image_file_batch_limit: 10
        image_file_size_limit: 10
        single_chunk_attachment_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
      number_limits: 3
    opening_statement: ''
    retriever_resource:
      enabled: true
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: start
        targetType: llm
      id: s-source-sc
      source: s
      sourceHandle: source
      target: sc
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: code
      id: sc-source-co
      source: sc
      sourceHandle: source
      target: co
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: code
        targetType: if-else
      id: co-source-ife
      source: co
      sourceHandle: source
      target: ife
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: ife-true-li
      source: ife
      sourceHandle: 'true'
      target: li
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: ife-hold-lh
      source: ife
      sourceHandle: hold
      target: lh
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: ife-false-lr
      source: ife
      sourceHandle: 'false'
      target: lr
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: li-source-agg
      source: li
      sourceHandle: source
      target: agg
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: lh-source-agg
      source: lh
      sourceHandle: source
      target: agg
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: lr-source-agg
      source: lr
      sourceHandle: source
      target: agg
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: variable-aggregator
        targetType: tool
      id: agg-source-gs
      source: agg
      sourceHandle: source
      target: gs
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: tool
        targetType: end
      id: gs-source-e
      source: gs
      sourceHandle: source
      target: e
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        selected: false
        title: 開始
        type: start
        variables:
        - default: ''
          label: 職缺說明 JD
          options: []
          required: true
          type: paragraph
          variable: jd
        - default: ''
          label: 應徵者履歷
          options: []
          required: true
          type: paragraph
          variable: resume
        - default: ''
          label: 應徵者姓名
          max_length: 60
          options: []
          required: true
          type: text-input
          variable: applicant_name
        - default: ''
          label: 應徵者信箱
          max_length: 120
          options: []
          required: true
          type: text-input
          variable: applicant_email
      height: 187
      id: s
      position:
        x: 0
        y: 13.57142857142857
      positionAbsolute:
        x: 0
        y: 13.57142857142857
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: sy
          role: system
          text: '你是嚴謹的招募初篩官。依【職缺 JD】客觀評估【履歷】的適配度，第一行只輸出「SCORE=<0到100整數>」，換行後再寫 3-5
            點評估理由（必備條件符合度、亮點、疑慮）。

            JD：

            {{#s.jd#}}


            履歷：

            {{#s.resume#}}


            規則：只依 JD 與履歷判斷、不臆測與職務無關因素；資訊不足據實說明。'
        - id: us
          role: user
          text: 請評分並說明。
        selected: false
        title: 適配度評分
        type: llm
        vision:
          enabled: false
      height: 88
      id: sc
      position:
        x: 342
        y: 94.23809523809524
      positionAbsolute:
        x: 342
        y: 94.23809523809524
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        code: "def main(text):\n    import re\n    m = re.search(r'SCORE\\s*=\\s*(\\\
          d+)', text)\n    score = int(m.group(1)) if m else 0\n    flag = 'PASS'\
          \ if score >= 80 else ('HOLD' if score >= 60 else 'REJECT')\n    return\
          \ {'flag': flag, 'score': score}\n"
        code_language: python3
        outputs:
          flag:
            type: string
          score:
            type: number
        selected: false
        title: 判定結果
        type: code
        variables:
        - value_selector:
          - sc
          - text
          variable: text
      height: 52
      id: co
      position:
        x: 684
        y: 126.90476190476193
      positionAbsolute:
        x: 684
        y: 126.90476190476193
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: contains
            id: p
            value: PASS
            variable_selector:
            - co
            - flag
          id: 'true'
          logical_operator: and
        - case_id: hold
          conditions:
          - comparison_operator: contains
            id: h
            value: HOLD
            variable_selector:
            - co
            - flag
          id: hold
          logical_operator: and
        selected: false
        title: 依評分三向分流
        type: if-else
      height: 172
      id: ife
      position:
        x: 1026
        y: 75.57142857142858
      positionAbsolute:
        x: 1026
        y: 75.57142857142858
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.3
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: sy
          role: system
          text: '你是招募團隊 HR。為應徵者寫一封恭喜通過初篩、邀請進入面試（請對方回覆可面試時段）的繁體中文通知信內文（不要主旨行）。

            應徵者：{{#s.applicant_name#}}

            職缺 JD：

            {{#s.jd#}}


            規則：開頭以「{{#s.applicant_name#}} 您好」稱呼；語氣專業有溫度、簡潔；結尾署名「招募團隊」。只輸出信件內文。'
        - id: us
          role: user
          text: 請撰寫這封信。
        selected: false
        title: 邀約面試信
        type: llm
        vision:
          enabled: false
      height: 88
      id: li
      position:
        x: 1388
        y: 0
      positionAbsolute:
        x: 1388
        y: 0
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.3
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: sy
          role: system
          text: '你是招募團隊 HR。為應徵者寫一封目前資歷不錯但暫列備取、後續有機會再聯繫的繁體中文通知信內文（不要主旨行）。

            應徵者：{{#s.applicant_name#}}

            職缺 JD：

            {{#s.jd#}}


            規則：開頭以「{{#s.applicant_name#}} 您好」稱呼；語氣專業有溫度、簡潔；結尾署名「招募團隊」。只輸出信件內文。'
        - id: us
          role: user
          text: 請撰寫這封信。
        selected: false
        title: 待定通知信
        type: llm
        vision:
          enabled: false
      height: 88
      id: lh
      position:
        x: 1388
        y: 168
      positionAbsolute:
        x: 1388
        y: 168
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        context:
          enabled: false
          variable_selector: []
        model:
          completion_params:
            temperature: 0.3
          mode: chat
          name: claude-sonnet-5
          provider: langgenius/anthropic/anthropic
        prompt_template:
        - id: sy
          role: system
          text: '你是招募團隊 HR。為應徵者寫一封婉謝這次應徵、肯定其能力、鼓勵未來再合作，語氣體貼的繁體中文通知信內文（不要主旨行）。

            應徵者：{{#s.applicant_name#}}

            職缺 JD：

            {{#s.jd#}}


            規則：開頭以「{{#s.applicant_name#}} 您好」稱呼；語氣專業有溫度、簡潔；結尾署名「招募團隊」。只輸出信件內文。'
        - id: us
          role: user
          text: 請撰寫這封信。
        selected: false
        title: 婉拒信
        type: llm
        vision:
          enabled: false
      height: 88
      id: lr
      position:
        x: 1388
        y: 336
      positionAbsolute:
        x: 1388
        y: 336
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        output_type: string
        selected: true
        title: 彙整信件
        type: variable-aggregator
        variables:
        - - li
          - text
        - - lh
          - text
        - - lr
          - text
      height: 160
      id: agg
      position:
        x: 1750
        y: 155.5
      positionAbsolute:
        x: 1750
        y: 155.5
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        provider_id: langgenius/dify-gmail/dify-gmail
        provider_name: langgenius/dify-gmail/dify-gmail
        provider_type: builtin
        selected: false
        title: Gmail 寄送通知
        tool_configurations: {}
        tool_label: Send Gmail Message
        tool_name: send_message
        tool_node_version: '2'
        tool_parameters:
          body:
            type: mixed
            value: '{{#agg.output#}}'
          subject:
            type: mixed
            value: 【招募通知】關於您應徵本公司職缺
          to:
            type: mixed
            value: '{{#s.applicant_email#}}'
        type: tool
      height: 52
      id: gs
      position:
        x: 2092
        y: 236.16666666666669
      positionAbsolute:
        x: 2092
        y: 236.16666666666669
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    - data:
        outputs:
        - value_selector:
          - co
          - score
          value_type: number
          variable: score
        - value_selector:
          - co
          - flag
          value_type: string
          variable: decision
        - value_selector:
          - sc
          - text
          value_type: string
          variable: assessment
        - value_selector:
          - gs
          - text
          value_type: string
          variable: send_result
        selected: false
        title: 輸出
        type: end
      height: 166
      id: e
      position:
        x: 2434
        y: 187.83333333333334
      positionAbsolute:
        x: 2434
        y: 187.83333333333334
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 242
    viewport:
      x: -638.6378584046743
      y: 340.3270371880238
      zoom: 0.40494632422883536
  rag_pipeline_variables: []
