8
n8n 中文网amn8n.com

使用Jotform和Gemini自动化自由职业项目接收

中级

这是一个自动化工作流,包含 9 个节点。主要使用 If, Gmail, GoogleSheets, GoogleDocsTool, JotFormTrigger 等节点。 使用Jotform和Gemini自动化自由职业项目接收与定制提案

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Sheets API 凭证
  • Google Gemini API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "93f396852104089b8670e7494b0f3668b420464668ae4a8c1d6b4b5799f8e3ef",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "4bce3ca7-ca59-429f-b557-fb5a04c07e4c",
      "name": "JotForm 触发器",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -528,
        -128
      ],
      "webhookId": "c1255bf1-40f1-457c-bc9f-4d9fe3775436",
      "parameters": {
        "form": "252853173448059"
      },
      "credentials": {
        "jotFormApi": {
          "id": "I2Xm5wbkEW1qEJC5",
          "name": "JotForm account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "664711e2-b28f-4d94-9820-62941cabb465",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -208,
        -128
      ],
      "parameters": {
        "text": "=You are an **AI Freelance Proposal Generator**, an advanced automation agent for a digital freelance agency.\n\nYour primary goal is to analyze a new **freelance project inquiry** from a form submission, create a **custom proposal**, and generate a structured JSON response containing the proposal and a personalized email.\n\nYou have access to one essential tool:\n\n**Tool Name:** My Freelance Document\n\n**Description:** When called, this tool retrieves the latest content of our Google Doc, which includes all freelance services, deliverables, pricing structures, and standard project ranges in INR. You must treat this as the single source of truth for proposal generation and pricing alignment.\n\n---\n\n### Workflow\n\n**Fetch Internal Data:**\nFirst, call the My Freelance Document tool to load our service catalog and pricing guide.\n\n**Analyze Client Request:**\nRead and interpret the client’s project requirements from the form submission provided below.\n\n**Generate Custom Proposal:**\nCompare the client’s needs, goals, and budget (if provided) against the data from the document. Based on the alignment, generate a concise, structured JSON response that includes the summary, proposal content, and email details.\n\n---\n\n### Crucial Safety Rules\n\n* Your first action **must** be to call the My Freelance Document tool.\n* If this tool fails or the document cannot be accessed, stop immediately and output an error message stating the internal guide is unavailable.\n* Your final output must contain only the **single valid JSON object** defined in the Output Specification.\n* Do **not** include explanations, conversational text, or any formatting outside the JSON block.\n\n---\n\n### Output Specification\n\nThe output must be a valid JSON object. Use `'NAN'` for missing or inapplicable fields instead of empty strings.\n\n```json\n{\n  \"project_type\": \"aligned\" | \"partially_aligned\" | \"misaligned\",\n  \"confidence\": \"An integer from 0-100\",\n  \"summary\": \"A concise summary of the client's project goals.\",\n  \"budget\": \"Extracted client budget in INR, or 'NAN' if not provided.\",\n  \"proposal_quality\": \"high\" | \"medium\" | \"low\",\n  \"next_action\": \"Send proposal\" | \"Needs clarification\" | \"Out of scope\",\n  \"email_subject\": \"A compelling proposal email subject, or 'NAN' if out of scope.\",\n  \"email_template\": \"An HTML-formatted proposal email string, or 'NAN' if out of scope.\"\n}\n```\n\n---\n\n### Logic for Each Field\n\n**project_type:** Determine if the client’s requested project fits our offerings. “aligned” if it directly matches our services and pricing; “partially_aligned” if it fits but needs budget adjustment; “misaligned” if it’s unrelated or unrealistic.\n\n**confidence:** Confidence level (0–100) in your project_type classification.\n\n**summary:** 1–2 line summary describing the client’s project intent.\n\n**budget:** Extract the budget mentioned in INR. If not present, return `'NAN'`.\n\n**proposal_quality:** Rate proposal alignment based on how clearly the client’s goals and budget fit our documented offerings.\n\n**next_action:** Suggest what the sales or freelance team should do next based on your assessment.\n\n**email_subject:** Write a concise and engaging subject line for the proposal email. If project_type is “misaligned,” return `'NAN'`.\n\n**email_template:**\n\n* If project_type is “aligned” or “partially_aligned”: write a professional HTML proposal email.\n* If the client’s budget matches our pricing, send an enthusiastic proposal and suggest a meeting or next step.\n* If the budget is too low, generate a polite and strategic negotiation email emphasizing value and deliverables.\n* If project_type is “misaligned,” return `'NAN'`.\n\n---\n\n### Client Form Submission Data\n\n**Explain Your Requirement in depth:**\n{{ $json[\"Explain Your Requirement in depth\"] }}\n\n**Name:**\n{{ $json['Your Full Name'].first }} {{ $json['Your Full Name'].last }}\n\n**Email ID:**\n{{ $json['Your Email Address'] }}\n\n**Phone Number:**\n{{ $json['Your Phone Number'].full }}\n\n**Company Name:**\n{{ $json['Your Company Name (Optional)'] }}\n",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "1c788674-22f2-459b-829c-b776cef67635",
      "name": "条件判断",
      "type": "n8n-nodes-base.if",
      "position": [
        368,
        -128
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "f39c3db4-83fa-4be6-9573-c76cba3905a9",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.project_type }}",
              "rightValue": "aligned"
            },
            {
              "id": "b914018a-909d-4b13-83e7-1ceaee823c16",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.project_type }}",
              "rightValue": "partially_aligned"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0d24224b-7b75-459f-9239-34d56ee200fb",
      "name": "在表格中追加或更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        144,
        -128
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $('JotForm Trigger').item.json['Your Email Address'] }}",
            "summary": "={{ $json.output.summary }}",
            "Full Name": "={{ $('JotForm Trigger').item.json['Your Full Name'].first }} {{ $('JotForm Trigger').item.json['Your Full Name'].last }}",
            "confidence": "={{ $json.output.confidence }}",
            "Requirement": "={{ $('JotForm Trigger').item.json['Explain Your Requirement in depth'] }}",
            "Phone number": "={{ $('JotForm Trigger').item.json['Your Phone Number'].full }}",
            "project_type": "={{ $json.output.project_type }}",
            "Email Subject": "={{ $json.output.email_subject }}",
            "budget if any": "={{ $json.output.budget }}",
            "AI generated Email body": "={{ $json.output.email_template }}"
          },
          "schema": [
            {
              "id": "Full Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Full Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone number",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Phone number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Requirement",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Requirement",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "project_type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "project_type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "confidence",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "confidence",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "summary",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "budget if any",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "budget if any",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Subject",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email Subject",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI generated Email body",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI generated Email body",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Email"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gg-xBRO93bPg41PDqOx_V_OtokWljHAf0IgIWsWgUls/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1gg-xBRO93bPg41PDqOx_V_OtokWljHAf0IgIWsWgUls",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gg-xBRO93bPg41PDqOx_V_OtokWljHAf0IgIWsWgUls/edit?usp=drivesdk",
          "cachedResultName": "Freelance Project Proposal"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "vemTjHgIvPJgj9C5",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2e31a538-e669-4ef3-9bf7-ba9a34550de9",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -416,
        80
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "qsaK3VMNWQDWLweQ",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6a3bfee5-d41a-412e-aee1-d32b987c960e",
      "name": "我的自由职业文档",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        -128,
        96
      ],
      "parameters": {
        "operation": "get",
        "documentURL": "=",
        "authentication": "serviceAccount",
        "descriptionType": "manual",
        "toolDescription": "This Google document will have what are the freelancing services i am providing and what are my priorities and what's my typical budget for this and all"
      },
      "credentials": {
        "googleApi": {
          "id": "mYRmmCMyWcLawmcE",
          "name": "Google Service Account account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "469d2cd8-2c4b-4e91-9b91-1bcb920a5624",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        16,
        96
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"project_type\": \"aligned\",\n  \"confidence\": 0,\n  \"summary\": \"A concise summary of the client's project goals.\",\n  \"budget\": \"NAN\",\n  \"proposal_quality\": \"medium\",\n  \"next_action\": \"Send proposal\",\n  \"email_subject\": \"your email subject goes here\",\n  \"email_template\": \"your-html-email-template-goes here\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "76dce5c2-8f6d-417d-aac5-229d06cf097a",
      "name": "发送消息",
      "type": "n8n-nodes-base.gmail",
      "position": [
        672,
        -144
      ],
      "webhookId": "0d0c0d05-d8d3-4b9e-a8ed-970c2a9852c7",
      "parameters": {
        "sendTo": "={{ $json.Email }}",
        "message": "={{ $json['AI generated Email body'] }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ $json['Email Subject'] }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "wreuF4NMkPPxXkKm",
          "name": "Abhiram.bvb"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "300c2c00-cdc4-44eb-b0fc-ffb899b28362",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -352
      ],
      "parameters": {
        "width": 1622,
        "height": 640,
        "content": "## 工作原理:"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JotForm Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "My Freelance Document": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量9
分类-
节点类型9
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流