Skip to main content

Send personalized job application emails with Telegram, OpenAI, and Gmail

Workflow preview

Workflow preview
100%
Send personalized job application emails with Telegram, OpenAI, and Gmail preview
Open on n8n.io

1. Workflow Overview

Setup Guide Hiring Bot Workflow [ ](https://www.linkedin.com/in/mosaab yassir lafr...

Best for

  • HR automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.telegramtrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.redis, n8n-nodes-base.telegram, n8n-nodes-base.googledrive, n8n-nodes-base.gmail

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Joe V.

Original n8n.io source

1.1 Workflow description

Title
Send personalized job application emails with Telegram, OpenAI, and Gmail
Workflow name
Send personalized job application emails with Telegram, OpenAI, and Gmail

πŸ”§ Setup Guide - Hiring Bot Workflow

πŸ“‹ Prerequisites

Before importing this workflow, make sure you have:

  • βœ… n8n Instance (cloud or self-hosted)
  • βœ… Telegram Bot Token (from @BotFather)
  • βœ… OpenAI API Key (with GPT-4 Vision access)
  • βœ… Gmail Account (with OAuth setup)
  • βœ… Google Drive (to store your resume)
  • βœ… Redis Instance (free tier available at Redis Cloud)

πŸš€ Step-by-Step Setup

1️⃣ Upload Your Resume to OpenAI

First, you need to upload your resume to OpenAI's Files API:

# Upload your resume to OpenAI
curl https://api.openai.com/v1/files \
 -H "Authorization: Bearer YOUR_OPENAI_API_KEY" \
 -F purpose="assistants" \
 -F file="@/path/to/your/resume.pdf"

Important: Save the file_id from the response (looks like file-xxxxxxxxxxxxx)

Alternative: Use OpenAI Playground or Python:

from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY")

with open("resume.pdf", "rb") as file:
 response = client.files.create(file=file, purpose="assistants")
 print(f"File ID: {response.id}")

2️⃣ Upload Your Resume to Google Drive

  1. Go to Google Drive
  2. Upload your resume PDF
  3. Right-click β†’ "Get link" β†’ Copy the file ID from URL
  • URL format: https://drive.google.com/file/d/FILE_ID_HERE/view
  • Example ID: 1h79U8IFtI2dp_OBtnyhdGaarWpKb9qq9

3️⃣ Create a Telegram Bot

  1. Open Telegram and message @BotFather
  2. Send /newbot
  3. Choose a name and username
  4. Save the Bot Token (looks like 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
  5. (Optional) Set bot commands:
/start - Start the bot
/help - Get help

4️⃣ Set Up Redis

Option A: Redis Cloud (Recommended - Free)

  1. Go to Redis Cloud
  2. Create a free account
  3. Create a database
  4. Note: Host, Port, Password

Option B: Local Redis

# Docker
docker run -d -p 6379:6379 redis:latest

# Or via package manager
sudo apt-get install redis-server

5️⃣ Import the Workflow to n8n

  1. Open n8n
  2. Click "+" β†’ "Import from File"
  3. Select Hiring_Bot_Anonymized.json
  4. Workflow will import with placeholder values

6️⃣ Configure Credentials

A. Telegram Bot Credentials
  1. In n8n, go to Credentials β†’ Create New
  2. Select "Telegram API"
  3. Enter your Bot Token from Step 3
  4. Test & Save
B. OpenAI API Credentials
  1. Go to Credentials β†’ Create New
  2. Select "OpenAI API"
  3. Enter your OpenAI API Key
  4. Test & Save
C. Redis Credentials
  1. Go to Credentials β†’ Create New
  2. Select "Redis"
  3. Enter:
  • Host: Your Redis host
  • Port: 6379 (default)
  • Password: Your Redis password
  1. Test & Save
D. Gmail Credentials
  1. Go to Credentials β†’ Create New
  2. Select "Gmail OAuth2 API"
  3. Follow OAuth setup flow
  4. Authorize n8n to access Gmail
  5. Test & Save
E. Google Drive Credentials
  1. Go to Credentials β†’ Create New
  2. Select "Google Drive OAuth2 API"
  3. Follow OAuth setup flow
  4. Authorize n8n to access Drive
  5. Test & Save

7️⃣ Update Node Values

A. Update OpenAI File ID in "PayloadForReply" Node
  1. Double-click the "PayloadForReply" node
  2. Find this line in the code:
const resumeFileId = "YOUR_OPENAI_FILE_ID_HERE";
  1. Replace with your actual OpenAI file ID from Step 1:
const resumeFileId = "file-xxxxxxxxxxxxx";
  1. Save the node
B. Update Google Drive File ID (Both "Download Resume" Nodes)

There are TWO nodes that need updating:

Node 1: "Download Resume"

  1. Double-click the node
  2. In the "File ID" field, click "Expression"
  3. Replace YOUR_GOOGLE_DRIVE_FILE_ID with your actual ID
  4. Update "Cached Result Name" to your resume filename
  5. Save

Node 2: "Download Resume1" (same process)

  1. Double-click the node
  2. Update File ID
  3. Update filename
  4. Save

8️⃣ Assign Credentials to Nodes

After importing, you need to assign your credentials to each node:

Nodes that need credentials:

Node Name Credential Type
Telegram Trigger Telegram API
Generating Reply OpenAI API
Store AI Reply Redis
GetValues Redis
Download Resume Google Drive OAuth2
Download Resume1 Google Drive OAuth2
Schedule Email Gmail OAuth2
SendConfirmation Telegram API
Send a message Telegram API
Edit a text message Telegram API
Send a text message Telegram API
Send a chat action Telegram API

How to assign:

  1. Click on each node
  2. In the "Credentials" section, select your saved credential
  3. Save the node

πŸ§ͺ Testing the Workflow

1️⃣ Activate the Workflow

  1. Click the "Active" toggle in the top-right
  2. Workflow should now be listening for Telegram messages

2️⃣ Test with a Job Post

  1. Find a job post online (LinkedIn, Indeed, etc.)
  2. Take a screenshot
  3. Send it to your Telegram bot
  4. Bot should respond with:
  • "Analyzing job post..." (typing indicator)
  • Full email draft with confirmation button

3️⃣ Test Email Sending

  1. Click "Send The Email" button
  2. Check Gmail to verify email was sent
  3. Check if resume was attached

πŸ› Troubleshooting

Issue: "No binary image found"

  • Solution: Make sure you're sending an image file, not a document

Issue: "Invalid resume file_id"

  • Solution:
  1. Check OpenAI file_id format (starts with file-)
  2. Verify file was uploaded successfully
  3. Make sure you updated the code in PayloadForReply node

Issue: "Failed to parse model JSON"

  • Solution:
  1. Check OpenAI API quota/limits
  2. Verify model name is correct (gpt-5.2)
  3. Check if image is readable

Issue: Gmail not sending

  • Solution:
  1. Re-authenticate Gmail OAuth
  2. Check Gmail permissions
  3. Verify "attachments" field is set to "Resume"

Issue: Redis connection failed

  • Solution:
  1. Test Redis connection in credentials
  2. Check firewall rules
  3. Verify host/port/password

Issue: Telegram webhook not working

  • Solution:
  1. Deactivate and reactivate workflow
  2. Check Telegram bot token is valid
  3. Make sure bot is not blocked

πŸ” Security Best Practices

  1. Never share your credentials - Keep API keys private
  2. Use environment variables in n8n for sensitive data
  3. Set up Redis password - Don't use default settings
  4. Limit OAuth scopes - Only grant necessary permissions
  5. Rotate API keys regularly
  6. Monitor usage - Check for unexpected API calls

🎨 Customization Ideas

Change AI Model

In the PayloadForReply node, update:

const MODEL = "gpt-5.2"; // Change to gpt-4, claude-3-opus, etc.

Adjust Email Length

Modify the system prompt:

// From:
Email body: ~120–180 words unless INSIGHTS specify otherwise.

// To:
Email body: ~100–150 words for concise applications.

Add More Languages

Update language detection logic in the system prompt to support more languages.

Custom Job Filtering

Edit the system prompt to target specific roles:

// From:
Only pick ONE job offer to process β€” the one most clearly related to Data roles

// To:
Only pick ONE job offer to process β€” the one most clearly related to [YOUR FIELD]

Add Follow-up Reminders

Add a "Wait" node after email sends to schedule a reminder after 7 days.


πŸ“Š Workflow Structure

Telegram Input
 ↓
Switch (Route by type)
 ↓
β”œβ”€ New Job Post
β”‚ ↓
β”‚ Send Chat Action (typing...)
β”‚ ↓
β”‚ PayloadForReply (Build AI request)
β”‚ ↓
β”‚ Generating Reply (Call OpenAI)
β”‚ ↓
β”‚ FormatAiReply (Parse JSON)
β”‚ ↓
β”‚ Store AI Reply (Redis cache)
β”‚ ↓
β”‚ SendConfirmation (Show preview)
β”‚
└─ Callback (User clicked "Send")
 ↓
 GetValues (Fetch from Redis)
 ↓
 Format Response
 ↓
 Download Resume (from Drive)
 ↓
 β”œβ”€ Path A: Immediate Send
 β”‚ ↓
 β”‚ Send Confirmation Message
 β”‚ ↓
 β”‚ Edit Message (update status)
 β”‚
 └─ Path B: Scheduled Send
 ↓
 Wait (10 seconds)
 ↓
 Download Resume Again
 ↓
 Schedule Email (Gmail)
 ↓
 Send Success Message

πŸ’‘ Tips for Best Results

  1. High-Quality Resume: Upload a well-formatted PDF resume
  2. Clear Screenshots: Take clear, readable job post screenshots
  3. Use Captions: Add instructions via Telegram captions
  1. Review Before Sending: Always read the draft before clicking send
  2. Update Resume Regularly: Keep your Google Drive resume current
  3. Test First: Try with a few test jobs before mass applying

πŸ†˜ Need Help?


πŸ“ Checklist

Use this checklist to verify your setup:

  • OpenAI resume file uploaded (got file_id)
  • Google Drive resume uploaded (got file ID)
  • Telegram bot created (got bot token)
  • Redis instance created (got credentials)
  • All n8n credentials created and tested
  • PayloadForReply node updated with OpenAI file_id
  • Both Download Resume nodes updated with Drive file_id
  • All nodes have credentials assigned
  • Workflow activated
  • Test message sent successfully
  • Test email received successfully

πŸŽ‰ You're all set! Start applying to jobs in 10 seconds!

Made with ❀️ and n8n

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 6 - Build AI request payload

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Call OpenAI API

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Parse AI response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Store draft in Redis

Type / Role
n8n-nodes-base.redis - redis
Config choices
Version 1

Block 10 - Send preview to Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - Retrieve draft from Redis

Type / Role
n8n-nodes-base.redis - redis
Config choices
Version 1

Block 12 - Parse draft data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Download resume from Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 14 - Notify immediate send

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 15 - Send email via Gmail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 16 - Wait before scheduled send

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 17 - Prepare scheduled send

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Download resume for scheduled send

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 19 - Update Telegram status

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 20 - Notify scheduled send complete

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 21 - Route by message type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 22 - Show typing indicator

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

3. Summary Table

Workflow Send personalized job application emails with Telegram, OpenAI, and Gmail
Complexity advanced
Nodes 22
Categories HR, AI Chatbot
Author Joe V
Published 28 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13077/13077.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Send personalized job application emails with Telegram, OpenAI, and Gmail do?

Setup Guide Hiring Bot Workflow [ ](https://www.linkedin.com/in/mosaab yassir lafr...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your HR, AI Chatbot use case.