{
  "nodes": [
    {
      "name": "Typeform Trigger",
      "type": "n8n-nodes-base.typeformTrigger",
      "position": [
        100,
        300
      ],
      "parameters": {
        "formId": "your-form-id"
      },
      "credentials": {
        "typeformApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        300
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "client_name",
              "value": "={{$json[\"answers\"][0].text}}"
            },
            {
              "name": "project_scope",
              "value": "={{$json[\"answers\"][1].text}}"
            },
            {
              "name": "deadline",
              "value": "={{$json[\"answers\"][2].text}}"
            },
            {
              "name": "email",
              "value": "={{$json[\"answers\"][3].email}}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Fill Contract Template",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        500,
        300
      ],
      "parameters": {
        "mode": "template",
        "fields": [
          {
            "name": "{{client_name}}",
            "value": "={{$json[\"client_name\"]}}"
          },
          {
            "name": "{{project_scope}}",
            "value": "={{$json[\"project_scope\"]}}"
          },
          {
            "name": "{{deadline}}",
            "value": "={{$json[\"deadline\"]}}"
          }
        ],
        "documentId": "your-template-id"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Export as PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        700,
        300
      ],
      "parameters": {
        "fileId": "={{$node[\"Fill Contract Template\"].json[\"documentId\"]}}",
        "mimeType": "application/pdf",
        "operation": "export"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Send via Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        900,
        300
      ],
      "parameters": {
        "text": "Hi {{$json[\"client_name\"]}},\n\nPlease find attached your contract.\n\nRegards,\nYour Company",
        "subject": "Your Contract",
        "toEmail": "={{$json[\"email\"]}}",
        "fromEmail": "user@example.com",
        "attachments": [
          {
            "binaryPropertyName": "data"
          }
        ]
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Export as PDF": {
      "main": [
        [
          {
            "node": "Send via Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Fill Contract Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Typeform Trigger": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fill Contract Template": {
      "main": [
        [
          {
            "node": "Export as PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}