AutomationFlowsEmail & Gmail › Generate Chácara Contracts with Google Docs

Generate Chácara Contracts with Google Docs

Original n8n title: Gerador De Contratos Chácara - Limpo

Gerador de Contratos Chácara - Limpo. Uses formTrigger, googleDrive, gmail, googleDocs. Event-driven trigger; 7 nodes.

Event trigger★★★★☆ complexity7 nodesForm TriggerGoogle DriveGmailGoogle Docs
Email & Gmail Trigger: Event Nodes: 7 Complexity: ★★★★☆ Added:

This workflow follows the Form Trigger → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Gerador de Contratos Ch\u00e1cara - Limpo",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Contrato de Loca\u00e7\u00e3o Tempor\u00e1ria",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Nome Completo",
              "placeholder": "Digite seu nome completo",
              "requiredField": true
            },
            {
              "fieldLabel": "CPF/CNPJ do Cliente",
              "fieldType": "number",
              "placeholder": "Digite seu CPF/CNPJ",
              "requiredField": true
            },
            {
              "fieldLabel": "Endere\u00e7o Cliente",
              "placeholder": "Rua/Avnida n\u00ba",
              "requiredField": true
            },
            {
              "fieldLabel": "Cidade",
              "placeholder": "Cidade",
              "requiredField": true
            },
            {
              "fieldLabel": "Estado",
              "placeholder": "Estado",
              "requiredField": true
            },
            {
              "fieldLabel": "CEP",
              "fieldType": "number",
              "placeholder": "Digite seu CEP",
              "requiredField": true
            },
            {
              "fieldLabel": "Telefone",
              "fieldType": "number",
              "placeholder": "Digite seu celular",
              "requiredField": true
            },
            {
              "fieldLabel": "Valor Total",
              "fieldType": "number",
              "placeholder": "Valor Total",
              "requiredField": true
            },
            {
              "fieldLabel": "Valor Antecipado",
              "fieldType": "number",
              "placeholder": "Digite o valor antecipado",
              "requiredField": true
            },
            {
              "fieldLabel": "Forma de Pagamento - Antecipado",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "PIX"
                  },
                  {
                    "option": "Transfer\u00eancia Banc\u00e1ria"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Forma de Pagamento - Restantes",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "PIX"
                  },
                  {
                    "option": "Transfer\u00eancia Banc\u00e1ria"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Data de In\u00edcio",
              "fieldType": "date",
              "requiredField": true
            },
            {
              "fieldLabel": "Data de Sa\u00edda",
              "fieldType": "date",
              "requiredField": true
            },
            {
              "fieldLabel": "Assinatura Cliente",
              "placeholder": "Sua assinatura digital",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -496,
        -288
      ],
      "id": "form-trigger-id",
      "name": "On form submission"
    },
    {
      "parameters": {
        "operation": "copy",
        "fileId": {
          "__rl": true,
          "value": "ID_DO_MODELO_GOOGLE_DOCS",
          "mode": "list"
        },
        "name": "=Contrato - {{ $('On form submission').item.json[\"Nome Completo\"] }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -48,
        -288
      ],
      "id": "google-drive-copy-id",
      "name": "Copy file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "share",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.documentId }}",
          "mode": "id"
        },
        "permissionsUi": {
          "permissionsValues": {
            "role": "reader",
            "type": "anyone"
          }
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        400,
        -288
      ],
      "id": "google-drive-share-id",
      "name": "Share file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "condition-id",
              "leftValue": "={{ $('On form submission').item.json.Telefone }}",
              "rightValue": "",
              "operator": {
                "type": "number",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        624,
        -288
      ],
      "id": "if-node-id",
      "name": "If"
    },
    {
      "parameters": {
        "sendTo": "DESTINATARIO_EXEMPLO@EMAIL.COM",
        "subject": "Contrato de Loca\u00e7\u00e3o Tempor\u00e1ria",
        "emailType": "text",
        "message": "=Ol\u00e1, Tudo bem?\n\nAcesse o contrato pelo link:\n{{ 'https://docs.google.com/document/d/' + $('Update a document').item.json.documentId + '/view' }}\n\n",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        848,
        -384
      ],
      "id": "gmail-send-id",
      "name": "Send a message",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "get",
        "documentURL": "=https://docs.google.com/document/d/ID_DO_MODELO_GOOGLE_DOCS/edit"
      },
      "type": "n8n-nodes-base.googleDocs",
      "typeVersion": 2,
      "position": [
        -272,
        -288
      ],
      "id": "google-docs-get-id",
      "name": "Get a document",
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentURL": "={{ $json.id }}",
        "actionsUi": {
          "actionFields": [
            {
              "action": "replaceAll",
              "text": "{{nome_cliente}}",
              "replaceText": "={{ $('On form submission').item.json[\"Nome Completo\"] }}"
            },
            {
              "action": "replaceAll",
              "text": "{{cpf_cnpj}}",
              "replaceText": "={{ String($('On form submission').item.json['CPF/CNPJ do Cliente']) }}"
            },
            {
              "action": "replaceAll",
              "text": "{{endereco_cliente}}",
              "replaceText": "={{ $('On form submission').item.json['Endere\u00e7o Cliente'] }}"
            },
            {
              "action": "replaceAll",
              "text": "{{data_inicio}}",
              "replaceText": "={{ new Date($('On form submission').item.json['Data de In\u00edcio'] + \"T00:00:00\").toLocaleDateString(\"pt-BR\") }}"
            },
            {
              "action": "replaceAll",
              "text": "{{valor_total}}",
              "replaceText": "={{ new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(Number($('On form submission').item.json['Valor Total'])) }}"
            },
            {
              "action": "replaceAll",
              "text": "{{valor_antecipado}}",
              "replaceText": "={{ new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(Number($('On form submission').item.json[\"Valor Antecipado\"])) }}"
            },
            {
              "action": "replaceAll",
              "text": "{{cidade}}",
              "replaceText": "={{ $('On form submission').item.json.Cidade }}"
            },
            {
              "action": "replaceAll",
              "text": "{{estado}}",
              "replaceText": "={{ $('On form submission').item.json.Estado }}"
            },
            {
              "action": "replaceAll",
              "text": "{{data_assinatura}}",
              "replaceText": "={{ new Date($('On form submission').item.json.submittedAt).toLocaleDateString(\"pt-Br\") }}"
            },
            {
              "action": "replaceAll",
              "text": "{{data_saida}}",
              "replaceText": "={{ new Date($('On form submission').item.json[\"Data de Sa\u00edda\"] + \"T00:00:00\").toLocaleDateString(\"pt-BR\") }}"
            },
            {
              "object": "text",
              "action": "replaceAll",
              "text": "{{telefone}}",
              "replaceText": "={{ $('On form submission').item.json.Telefone.toString() }}",
              "index": 0
            },
            {
              "action": "replaceAll",
              "text": "{{valor_restante}}",
              "replaceText": "={{ new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(Number($('On form submission').item.json[\"Valor Total\"]) - Number($('On form submission').item.json[\"Valor Antecipado\"])) }}"
            },
            {
              "action": "replaceAll",
              "text": "{{assinatura_locatario}}",
              "replaceText": "={{ $('On form submission').item.json[\"Assinatura Cliente\"] }}"
            },
            {
              "action": "replaceAll",
              "text": "{{cep}}",
              "replaceText": "={{ String($('On form submission').item.json.CEP) }}"
            },
            {
              "action": "replaceAll",
              "text": "{{pagamento_antecipado}}",
              "replaceText": "={{ $('On form submission').item.json[\"Forma de Pagamento -  Antecipado\"] }}"
            },
            {
              "action": "replaceAll",
              "text": "{{pagamento_restante}}",
              "replaceText": "={{ $('On form submission').item.json[\"Forma de Pagamento - Restantes\"] }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.googleDocs",
      "typeVersion": 2,
      "position": [
        176,
        -288
      ],
      "id": "google-docs-update-id",
      "name": "Update a document",
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Get a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Copy file": {
      "main": [
        [
          {
            "node": "Update a document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Share file": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a document": {
      "main": [
        [
          {
            "node": "Copy file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update a document": {
      "main": [
        [
          {
            "node": "Share file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Gerador de Contratos Chácara - Limpo. Uses formTrigger, googleDrive, gmail, googleDocs. Event-driven trigger; 7 nodes.

Source: https://github.com/Chrysthy/contract-generator-n8n/blob/b586abcc80659d26afa2f67b2d8f4462c86eadd3/flows/contract-generator.json — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

This n8n template demonstrates automating an appointment letter creation process using a template and then having the HR approve before emailing the appointment letter to the candidate.

Form Trigger, Google Drive, Google Docs +1
Email & Gmail

Gerador de Contratos. Uses formTrigger, googleDocs, googleDrive, gmail. Event-driven trigger; 9 nodes.

Form Trigger, Google Docs, Google Drive +1
Email & Gmail

🎥 Analyze YouTube Video for Summaries, Transcripts & Content + Google Gemini AI. Uses stickyNote, httpRequest, googleDrive, gmail. Event-driven trigger; 33 nodes.

HTTP Request, Google Drive, Gmail +2
Email & Gmail

Client Form → Draft → Approve → Sign → Deliver, fully automated

Jot Form Trigger, Gmail, Google Drive +4
Email & Gmail

This workflow automates the full offer letter lifecycle, from generation to final candidate response tracking. When a new row with a Pending status is added to Google Sheets, it creates a personalized

Google Sheets Trigger, Google Drive, Google Docs +2