{
  "name": "AI drafts the reply, Signatoro signs it (n8n)",
  "nodes": [
    {
      "parameters": {
        "content": "## AI drafts the reply, Signatoro signs it\nEvery new email gets a warm draft reply in the same Gmail thread, signed with the sender's real, current signature from Signatoro. A person reads it and clicks Send.\n\n**Before you test**\n1. Gmail Trigger and Save draft reply: connect your Google account.\n2. Write the reply: pick your OpenAI credential (n8n's free OpenAI credits work).\n3. Get signature: create a Bearer Auth credential with your Signatoro API key.\n\nSignatoro's free plan includes the API, with a monthly request limit.\n\n**Free step-by-step lesson:** learn.ynteractive.com/modules/n8n-signatoro-signed-reply",
        "height": 540,
        "width": 400,
        "color": 4
      },
      "id": "s0",
      "name": "Sticky Note: overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        -320
      ]
    },
    {
      "parameters": {
        "content": "### Add your Signatoro key\nGET https://signatoro.com/api/v1/signature\nAuthentication: Generic > Bearer Auth.\nCreate a Bearer Auth credential and paste your key from signatoro.com > For tools and assistants > Generate API key. The key lives in the credential, never in the URL or the prompt. Returns `html`, `text` and `sender`.",
        "height": 220,
        "width": 300,
        "color": 3
      },
      "id": "s1",
      "name": "Sticky Note: key",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        540,
        -260
      ]
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "simple": false,
        "filters": {},
        "options": {}
      },
      "id": "a1",
      "name": "New patient email",
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.4,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-5-mini",
          "mode": "list",
          "cachedResultName": "GPT-5-MINI"
        },
        "responses": {
          "values": [
            {
              "content": "=You are the front desk at Brookside Dental, a friendly family dental practice. Write a short email reply to a patient who just emailed us.\n- Greet them by first name and thank them.\n- Respond to what they asked in one or two warm sentences.\n- Say we will call within one business day to book a time.\n- No medical advice, no prices, no promises about treatment.\n- End with a short closing line such as \"Kind regards,\" and no name or signature: the signature is added after the email.\nWrite only the email body, as simple HTML with each paragraph in <p> tags.\n\nThe patient's email:\n{{ $json.text }}"
            }
          ]
        },
        "builtInTools": {},
        "options": {}
      },
      "id": "a2",
      "name": "Write the reply",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.3,
      "position": [
        260,
        0
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "https://signatoro.com/api/v1/signature",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "options": {}
      },
      "id": "a3",
      "name": "Get signature (Signatoro)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        620,
        0
      ]
    },
    {
      "parameters": {
        "resource": "draft",
        "operation": "create",
        "subject": "=Re: {{ $('New patient email').item.json.subject }}",
        "emailType": "html",
        "message": "={{ $('Write the reply').item.json.output[0].content[0].text }}\n{{ $json.html }}",
        "options": {
          "threadId": "={{ $('New patient email').item.json.threadId }}",
          "sendTo": "={{ $('New patient email').item.json.from.value[0].address }}"
        }
      },
      "id": "a4",
      "name": "Save draft reply",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        880,
        0
      ]
    }
  ],
  "connections": {
    "New patient email": {
      "main": [
        [
          {
            "node": "Write the reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write the reply": {
      "main": [
        [
          {
            "node": "Get signature (Signatoro)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get signature (Signatoro)": {
      "main": [
        [
          {
            "node": "Save draft reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
