Line Save File to Google Drive and Log File's URL

For Google Drive, this workflow automates the process of saving files from LINE, organizing them into date and file type folders, and logging their details in Google Sheets. It efficiently handles file uploads, ensures compliance with allowed file types, and provides users with immediate feedback via LINE, enhancing file management and accessibility.

7/8/2025
27 nodes
Complex
w3zsajhri2hxa9gtwebhookcomplexgooglesheetsgoogle drivesticky noteadvancedlogicconditionalapiintegration
Categories:
Complex WorkflowData Processing & AnalysisWebhook Triggered
Integrations:
GoogleSheetsGoogle DriveSticky Note

Target Audience

  • Developers: Individuals looking to automate file uploads from LINE to Google Drive.
    - Business Professionals: Those who need to manage and store files efficiently based on date and type.
    - Content Creators: Users who frequently share files and need a systematic way to log and access them.
    - Team Collaborators: Teams working with shared files who require organized storage solutions in Google Drive.
  • Problem Solved

    This workflow automates the process of saving files sent via LINE to Google Drive, categorizing them based on date or file type. It eliminates manual file management, reduces errors, and ensures that important files are easily accessible and logged correctly in Google Sheets.

    Workflow Steps

  • LINE Webhook Listener: Receives incoming file messages from LINE.
    2. Get Config: Retrieves configuration details from Google Sheets, such as allowed file types and folder paths.
    3. Merge Event and Config Data: Combines event data with configuration settings for further processing.
    4. Determine Folder Info: Calculates folder names based on the configuration, deciding whether to store files by date or type.
    5. Search Date Folder: Checks if a folder for the current date already exists.
    6. Check Existing Date Folder: Validates the existence of the date folder and creates one if necessary.
    7. Search File Type Folder: Looks for a folder specific to the file type.
    8. Check Existing File Type Folder: Similar to date folder checks, it verifies or creates the file type folder.
    9. Upload File to Google Drive: Once validated, the file is uploaded to the determined folder.
    10. Log File Details to Google Sheet: Records the file's metadata including name, type, upload date, and Google Drive URL.
    11. Check Reply Enabled Flag: Determines if replies are enabled in the configuration.
    12. Send LINE Reply Message: Sends a confirmation or error message back to the user on LINE, providing the file's URL or an error description.
  • Customization Guide

    To customize this workflow, users can:
    - Modify Configuration in Google Sheets: Update allowed file types, folder IDs, and paths in the Google Sheets document referenced in the workflow.
    - Adjust Folder Naming Logic: Change the JavaScript code in nodes like 'Determine Folder Info' to alter how folders are named or organized.
    - Change Response Messages: Edit the message content in the 'Send LINE Reply Message' node to tailor responses sent back to users.
    - Add Additional Processing Steps: Insert new nodes for further processing, such as notifications, additional logging, or integrations with other services.

    Line Save File to Google Drive and Log File's URL - N8N Workflow Directory