Part 1: Basic Automation
Build your first n8n automation by connecting a student form to Gmail.
1. Part One: Basic Automation
In this part, we will create our first simple automation using n8n.
The goal is to allow a student to submit a form and automatically send that information through Gmail.
Student fills the form → n8n receives the information → Gmail sends the email automatically.
2. Create the Form with whatever field that you desire
The first step is to create a form that collects the information required to send the gmail.
Form Fields
| Field | Type | Example |
|---|---|---|
| faculty@gmail.com | ||
| Department | Dropdown | SSD |
| Email Subject | Text | Leave Request |
| Message | Textarea | I am feeling sick and need leave for today's class. |
Department Options (Examples)
- SSD
- RTE
- Student Service
- Finance Department
- IT Department
3. Connect the Form to Gmail
Once the form has been created, we can connect it to Gmail. This allows n8n to automatically send an email whenever a student submits the form.
Gmail Configuration
Add a Gmail node after the Form Trigger node.
The Gmail node will take the information received from the form and use it to send an email automatically.
Connected Account
In the Gmail node, find the Credential section and click Create New Credential.
Example account:
example123@gmail.com
Set Up Gmail Credentials
- Open the Gmail node in n8n.
- Under Credential, click Create New Credential.
- n8n will open the Google authentication page.
- Sign in using the Google account that you want to connect to n8n.
- Review the requested permissions.
- Allow n8n to access the required Gmail functionality.
- Return to n8n and confirm that your Gmail credential is connected successfully.
Never share your Google password, Gmail credentials, API keys, or other private authentication information with other participants.
Each participant should connect their own authorised Gmail account when creating their workflow.
Recipient
In the To field, enter the Gmail address where you want the automated message to be sent.
Workshop example:
test123@gmail.com
For the workshop demonstration, we can use one demo email address. In a real college automation, this could be changed depending on the selected department.
Resource and Operation
Configure the Gmail node to send an email message.
| Setting | Value |
|---|---|
| Resource | Message |
| Operation | Send |
| Credential | Your connected Gmail account |
Email Subject
Map the form's Email Subject field to the Gmail subject field.
{{ Email Subject }}
Email Body
Map the form's Message field to the Gmail message body.
{{ Message }}
Final Gmail Configuration
| Gmail Field | What to enter |
|---|---|
| Credential | Your connected Gmail account |
| Resource | Message |
| Operation | Send |
| To | test123@gmail.com |
| Subject | {{ Email Subject }} |
| Message | {{ Message }} |
The Form Trigger collects the student's information. n8n then passes that information to the Gmail node. The Gmail node uses the student's subject and message to automatically send the email.
Basic Automation Flow
This is our first automation.
You do not need to manually open Gmail and compose an email.
n8n handles that process automatically.
Test the Workflow
- Open the form.
- Enter a student's email.
- Select a department.
- Enter an email subject.
- Enter a message.
- Submit the form.
- Check the Gmail inbox.
If the email arrives automatically, your first n8n automation is working.
Ready for Part 2?
Now that we have basic automation working, we can make it smarter by adding AI.