Back to Catalog

Extract pay slip data with Line Chatbot and Gemini to Google Sheets

Sirisak ChantanateSirisak Chantanate
3200 views
2/3/2026
Official Page

Workflow Overview:

Extract text from image using AI is worth because you need no code. It incorporates Google Gemini 2.0 Flash model for important text extraction from image. If you code without AI, you have to use multiple condition and may cause a lot of bug but with Google Gemini, you don't need any coding and if the Pay Slip is different, Gemini will extract it automatically.

Workflow description:

  1. User uses Line Messaging API to send Pay Slip image or message to the chatbot, create Line Business ID from here: Line Business
  2. Classify the message which is image or text
  3. If the message is Pay Slip image, it will process using Gemini 2.0 Flash EXP and extract important information and response in JSON format without coding by using the following prompt: Analyze image and then return in JSON Response that has the only following value: Status, From, To, Date, Amount slip.png To get Google AI Studio API Key, you can find from the following link: Google AI Studio API Key
  4. Create Google Sheets which include the fileds (Status, From, To, Date, Amount) that we have created related to the AI prompt Google Sheets as the following example: Google Sheets Example.png
  5. If the message is text, it will process using Gemini 2.0 Flash EXP model as the AI Assistant else if the message is image, it will extract the important fields then reply to the User and insert into Google Sheets

Key Features:

  • Extract text from image with No Code Without N8N, we have to write code to extract text from image, but with N8N and Google Gemini 2.0 Flash EXP together, we don't need to code and it will process all slip vendors or other document vendors.
  • Multipurpose Chatbot this chatbot accept both text and image so we don't have to create many chatbot accounts
  • Reduce human error this workflow let any officer to verify document status when the job ends

Note: You can change the information by changing your prompt and also Google Sheets Column names relatively.

n8n Workflow: Extract Pay Slip Data with LINE Chatbot and Gemini to Google Sheets

This n8n workflow provides a robust solution for automating the extraction of data from pay slips and storing it in Google Sheets, leveraging a LINE chatbot for user interaction and Google Gemini for AI-powered data extraction.

The workflow listens for messages from a LINE chatbot, processes them using an AI agent powered by Google Gemini, and then records the extracted information into a Google Sheet. It also includes a basic memory for conversational context.

What it does

  1. Receives LINE Chatbot Input: The workflow is triggered by incoming messages from a LINE chatbot via a webhook.
  2. Initial Data Processing: Edits and prepares the incoming data for the AI agent.
  3. AI-Powered Data Extraction: An AI Agent (Langchain) utilizing a Google Gemini Chat Model processes the message content to extract relevant pay slip data.
  4. Maintains Conversational Context: A simple memory buffer is used to maintain context within the AI agent's conversation.
  5. Conditional Logic: A Switch node allows for branching logic based on the AI agent's output, enabling different actions for various scenarios (e.g., successful extraction vs. clarification needed).
  6. Writes to Google Sheets: Extracted pay slip data is appended as a new row to a specified Google Sheet.
  7. Responds to LINE Chatbot: Sends a response back to the LINE chatbot, confirming data extraction or asking for more information.

Prerequisites/Requirements

  • n8n Account: A running n8n instance (cloud or self-hosted).
  • LINE Developer Account: To set up a LINE Messaging API chatbot and obtain necessary credentials.
  • Google Account: For Google Sheets integration.
  • Google Gemini API Key: For the Google Gemini Chat Model.
  • Google Sheets Credential: Configured in n8n to allow writing to your Google Sheet.
  • LINE Credential: Configured in n8n for sending and receiving messages.
  • HTTP Request Credential (Optional): If the HTTP Request node requires authentication.

Setup/Usage

  1. Import the Workflow:

    • Download the provided JSON file.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the three dots in the top right corner and select "Import from JSON".
    • Paste the workflow JSON or upload the file.
  2. Configure Credentials:

    • Webhook: The "Webhook" node will generate a unique URL. Configure this URL in your LINE Messaging API settings as the webhook endpoint.
    • LINE: Set up a LINE credential in n8n with your Channel Access Token and Channel Secret.
    • Google Gemini: Configure a Google Gemini credential in n8n with your API Key.
    • Google Sheets: Set up a Google Sheets credential in n8n, granting it access to the specific spreadsheet where you want to store the data.
      • In the "Google Sheets" node, specify the "Spreadsheet ID" and "Sheet Name".
    • HTTP Request: If the HTTP Request node is used for a LINE reply, ensure it's configured with the correct LINE API endpoint and authentication (e.g., Bearer Token using your Channel Access Token).
  3. Customize Nodes:

    • Edit Fields (Set): Review and adjust the data transformation logic if needed to match the expected input from LINE and the desired format for the AI agent.
    • AI Agent:
      • Ensure the "Google Gemini Chat Model" is correctly linked and configured.
      • The "Simple Memory" node should be connected to the AI Agent for conversational context.
      • You might need to adjust the prompt or tools used by the AI Agent to optimize pay slip data extraction.
    • Switch: Customize the conditions in the "Switch" node to handle different outcomes from the AI agent (e.g., if the AI confirms data extraction, if it asks for clarification, etc.).
    • Google Sheets: Verify the column names and data mapping in the "Google Sheets" node to ensure data is written correctly.
    • HTTP Request: Adjust the payload for the LINE reply to provide appropriate feedback to the user.
  4. Activate the Workflow: Once all credentials are set up and nodes are configured, activate the workflow.

Now, when a user sends a pay slip image or text details to your LINE chatbot, this workflow will process it, extract the relevant information, store it in Google Sheets, and respond to the user.

Related Templates

Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets

This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitor’s webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger — Manually start the workflow or schedule it to run periodically. Input Setup — Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) — Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring — Clean and convert GPT output into JSON format. Data Storage (Google Sheets) — Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the “Set Input Fields” node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors → Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection → Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report → Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization → Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs → Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting It’s a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.

Ranjan DailataBy Ranjan Dailata
161

Create personalized email outreach with AI, Telegram bot & website scraping

Demo Personalized Email This n8n workflow is built for AI and automation agencies to promote their workflows through an interactive demo that prospects can try themselves. The featured system is a deep personalized email demo. --- 🔄 How It Works Prospect Interaction A prospect starts the demo via Telegram. The Telegram bot (created with BotFather) connects directly to your n8n instance. Demo Guidance The RAG agent and instructor guide the user step-by-step through the demo. Instructions and responses are dynamically generated based on user input. Workflow Execution When the user triggers an action (e.g., testing the email demo), n8n runs the workflow. The workflow collects website data using Crawl4AI or standard HTTP requests. Email Demo The system personalizes and sends a demo email through SparkPost, showing the automation’s capability. Logging and Control Each user interaction is logged in your database using their name and id. The workflow checks limits to prevent misuse or spam. Error Handling If a low-CPU scraping method fails, the workflow automatically escalates to a higher-CPU method. ⚙️ Requirements Before setting up, make sure you have the following: n8n — Automation platform to run the workflow Docker — Required to run Crawl4AI Crawl4AI — For intelligent website crawling Telegram Account — To create your Telegram bot via BotFather SparkPost Account — To send personalized demo emails A database (e.g., PostgreSQL, MySQL, or SQLite) — To store log data such as user name and ID 🚀 Features Telegram interface using the BotFather API Instructor and RAG agent to guide prospects through the demo Flow generation limits per user ID to prevent abuse Low-cost yet powerful web scraping, escalating from low- to high-CPU flows if earlier ones fail --- 💡 Development Ideas Replace the RAG logic with your own query-answering and guidance method Remove the flow limit if you’re confident the demo can’t be misused Swap the personalized email demo with any other workflow you want to showcase --- 🧠 Technical Notes Telegram bot created with BotFather Website crawl process: Extract sub-links via /sitemap.xml, sitemap_index.xml, or standard HTTP requests Fall back to Crawl4AI if normal requests fail Fetch sub-link content via HTTPS or Crawl4AI as backup SparkPost used for sending demo emails --- ⚙️ Setup Instructions Create a Telegram Bot Use BotFather on Telegram to create your bot and get the API token. This token will be used to connect your n8n workflow to Telegram. Create a Log Data Table In your database, create a table to store user logs. The table must include at least the following columns: name — to store the user’s name or Telegram username. id — to store the user’s unique identifier. Install Crawl4AI with Docker Follow the installation guide from the official repository: 👉 https://github.com/unclecode/crawl4ai Crawl4AI will handle website crawling and content extraction in your workflow. --- 📦 Notes This setup is optimized for low cost, easy scalability, and real-time interaction with prospects. You can customize each component — Telegram bot behavior, RAG logic, scraping strategy, and email workflow — to fit your agency’s demo needs. 👉 You can try the live demo here: @emaildemobot ---

Michael A PutraBy Michael A Putra
474

Create verified user profiles with email validation, PDF generation & Gmail delivery

Verified User Profile Creation - Automated Email Validation & PDF Generation --- Overview This comprehensive automation workflow streamlines the user onboarding process by validating email addresses, generating professional profile PDFs, and delivering them seamlessly to verified users. 🎯 What This Workflow Does: Receives User Data - Webhook trigger accepts user signup information (name, email, city, profession, bio) Validates Email Addresses - Uses VerifiEmail API to ensure only legitimate email addresses proceed Conditional Branching - Smart logic splits workflow based on email verification results Generates HTML Profile - Creates beautifully styled HTML templates with user information Converts to PDF - Transforms HTML into professional, downloadable PDF documents Email Delivery - Sends personalized welcome emails with PDF attachments to verified users Data Logging - Records all verified users in Google Sheets for analytics and tracking Rejection Handling - Notifies users with invalid emails and provides guidance ✨ Key Features: ✅ Email Verification - Prevents fake registrations and maintains data quality 📄 Professional PDF Generation - Beautiful, branded profile documents 📧 Automated Email Delivery - Personalized welcome messages with attachments 📊 Google Sheets Logging - Complete audit trail of all verified users 🔀 Smart Branching - Separate paths for valid and invalid emails 🎨 Modern Design - Clean, responsive HTML/CSS templates 🔒 Secure Webhook - POST endpoint for seamless form integration 🎯 Perfect Use Cases: User registration systems Community membership verification Professional certification programs Event registration with verified attendees Customer onboarding processes Newsletter signup verification Educational platform enrollments Membership card generation 📦 What's Included: Complete workflow with 12 informative sticky notes Pre-configured webhook endpoint Email verification integration PDF generation setup Gmail sending configuration Google Sheets logging Error handling guidelines Rejection email template 🛠️ Required Integrations: VerifiEmail - For email validation (https://verifi.email) HTMLcsstoPDF - For PDF generation (https://htmlcsstopdf.com) Gmail OAuth2 - For email delivery Google Sheets OAuth2 - For data logging ⚡ Quick Setup Time: 15-20 minutes 🎓 Skill Level: Beginner to Intermediate --- Benefits: ✅ Reduces manual verification work by 100% ✅ Prevents spam and fake registrations ✅ Delivers professional branded documents automatically ✅ Maintains complete audit trail ✅ Scales effortlessly with user growth ✅ Provides excellent user experience ✅ Easy integration with any form or application --- Technical Details: Trigger Type: Webhook (POST) Total Nodes: 11 (including 12 documentation sticky notes) Execution Time: ~3-5 seconds per user API Calls: 3 external (VerifiEmail, HTMLcsstoPDF, Google Sheets) Email Format: HTML with binary PDF attachment Data Storage: Google Sheets (optional) --- License: MIT (Free to use and modify) --- 🎁 BONUS FEATURES: Comprehensive sticky notes explaining each step Beautiful, mobile-responsive email template Professional PDF styling with modern design Easily customizable for your branding Ready-to-use webhook endpoint Error handling guidelines included --- Perfect for: Developers, No-code enthusiasts, Business owners, SaaS platforms, Community managers, Event organizers Start automating your user verification process today! 🚀

Jitesh DugarBy Jitesh Dugar
51