AutomationFlowsEmail & Gmail › Applicant Selection to Gmail Notification

Applicant Selection to Gmail Notification

Original n8n title: Stage B

Stage B. Uses executeWorkflowTrigger, postgres, dataTable, gmail. Event-driven trigger; 8 nodes.

Event trigger★★★★☆ complexity8 nodesExecute Workflow TriggerPostgresData TableGmail
Email & Gmail Trigger: Event Nodes: 8 Complexity: ★★★★☆ Added:

This workflow follows the Datatable → 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": "Stage B",
  "nodes": [
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "applicantId"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -304,
        -32
      ],
      "id": "e5900e13-c0b4-478f-947a-24d92d4debec",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "operation": "select",
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "table": {
          "__rl": true,
          "value": "applicant",
          "mode": "list",
          "cachedResultName": "applicant"
        },
        "where": {
          "values": [
            {
              "column": "id",
              "value": "={{ $json.applicantId }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        -64,
        -32
      ],
      "id": "f572061e-cfb3-4961-b3b8-6c3fb1f1f997",
      "name": "Select Applicant",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "CdX4cQJJWoDSCBT7",
          "mode": "list",
          "cachedResultUrl": "/workflow/CdX4cQJJWoDSCBT7",
          "cachedResultName": "Email Formatter"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "keyId": "STAGE_B_TEMPLATE_ID",
            "values": "={{ $input.last().json }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "keyId",
              "displayName": "keyId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "values",
              "displayName": "values",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "object",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": true
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.3,
      "position": [
        560,
        -32
      ],
      "id": "53782785-9930-4748-82fa-a727284dcd08",
      "name": "Produce Email"
    },
    {
      "parameters": {
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "value": "wvUDYhfWqI8YbIGS",
          "mode": "list",
          "cachedResultName": "Configuration",
          "cachedResultUrl": "/projects/w1ZISLUlzWcdlJxB/datatables/wvUDYhfWqI8YbIGS"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "key",
              "keyValue": "HKRECRUITMENT_URL"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        144,
        -32
      ],
      "id": "3688c0eb-e027-4c36-b233-7a9b120f48df",
      "name": "Get row(s)"
    },
    {
      "parameters": {
        "jsCode": "const baseUrl = $input.first().json.value;\nconst applicantData = $('Select Applicant').first().json;\nconst { id: applicantId, token } = applicantData;\n\nreturn {\n  ...applicantData,\n  interviewBookingUrl: `${baseUrl}/interview/book/${applicantId}?token=${token}`\n}"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        352,
        -32
      ],
      "id": "7b5580bc-af7b-4940-931e-d18c260d8284",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "sendTo": "={{ $('Select Applicant').last().json.email }}",
        "subject": "[IEEE-HKN]\u00a0Testing",
        "message": "={{ $json.emailContents }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        752,
        -32
      ],
      "id": "0e3fcaeb-1489-48b0-b1a1-3dc470beb4b8",
      "name": "Send a message",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "d3pwvH005RdIrKXy",
          "mode": "list",
          "cachedResultUrl": "/workflow/d3pwvH005RdIrKXy",
          "cachedResultName": "Notify"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "type": "verbose",
            "contents": "={{ JSON.stringify($input.last()) }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "type",
              "displayName": "type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "contents",
              "displayName": "contents",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.3,
      "position": [
        960,
        -128
      ],
      "id": "e211d0c7-6497-46cd-b2d7-d27bfd810466",
      "name": "Call 'Notify'"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "d3pwvH005RdIrKXy",
          "mode": "list",
          "cachedResultUrl": "/workflow/d3pwvH005RdIrKXy",
          "cachedResultName": "Notify"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "type": "hr",
            "contents": "=Inviato Interview Booking a {{ $('Select Applicant').item.json.name }} {{ $('Select Applicant').item.json.surname }} ({{ $('Select Applicant').item.json.email }})"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "type",
              "displayName": "type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "contents",
              "displayName": "contents",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.3,
      "position": [
        960,
        128
      ],
      "id": "4b617a11-4a87-45e7-b7ac-19b28b8e92b5",
      "name": "HR notify"
    }
  ],
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Select Applicant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Applicant": {
      "main": [
        [
          {
            "node": "Get row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Produce Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Produce Email": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Call 'Notify'",
            "type": "main",
            "index": 0
          },
          {
            "node": "HR notify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HR notify": {
      "main": [
        []
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "2d933b60-8cbc-4824-b73d-842ec97d0504",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "dZmda6G2AnVNAlEX",
  "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

Stage B. Uses executeWorkflowTrigger, postgres, dataTable, gmail. Event-driven trigger; 8 nodes.

Source: https://github.com/MuNuChapterHKN/HKrecruitment/blob/2f27f97cc2146df53de7962e71504db1c9d1ed68/n8n/workflows/b.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

Splitout Code. Uses manualTrigger, httpRequest, stickyNote, splitOut. Event-driven trigger; 46 nodes.

HTTP Request, Execute Workflow Trigger, Gmail +1
Email & Gmail

Automate CSV imports into HubSpot without the mess. Powered by n8n. Supercharged by Pollup AI.

HTTP Request, Execute Workflow Trigger, Gmail +1
Email & Gmail

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

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

Code Filter. Uses googleSheets, gmail, stickyNote, executeWorkflowTrigger. Event-driven trigger; 32 nodes.

Google Sheets, Gmail, Execute Workflow Trigger
Email & Gmail

This n8n workflow enables teams to automate and standardize multi-step onboarding or messaging workflows using Google Sheets, Forms, Gmail, and dynamic logic powered by Code and Switch nodes. It ensur

Google Sheets, Form, Execute Workflow Trigger +2