LangChain Automate

For LangChain, automate meal logging by sending voice or text messages via Telegram. The workflow transcribes audio inputs, analyzes nutritional content, and stores results in Google Sheets, enabling users to track their dietary intake effortlessly.

7/8/2025
23 nodes
Complex
manualcomplexlangchaintelegramtelegramtriggersplitoutgooglesheetssticky noteadvancedcommunicationbotlogicconditional
Categories:
Communication & MessagingComplex WorkflowManual TriggeredData Processing & Analysis
Integrations:
LangChainTelegramTelegramTriggerSplitOutGoogleSheetsSticky Note

Target Audience

  • Nutritionists: To analyze dietary intake and provide nutritional insights.
    - Fitness Enthusiasts: To track nutrient intake and ensure balanced diets.
    - Health Coaches: To assist clients in monitoring their meals and nutritional values.
    - Developers: To integrate and customize the workflow for specific applications or services.
    - Telegram Users: Anyone who uses Telegram and wants to log their meals efficiently.
  • Problem Solved

    This workflow automates the process of logging meals through Telegram messages, whether written or voice. It transcribes voice messages, analyzes the content for nutritional information, and stores the results in Google Sheets. This eliminates the need for manual entry and provides quick access to dietary insights.

    Workflow Steps

  • Receive Message: The workflow starts when a chat message is received via Telegram.
    - Check Message Type: It checks if the message is a voice message or a text message.
    - Get Audio File: If it's a voice message, the workflow retrieves the audio file.
    - Transcribe Recording: The audio is transcribed into text using OpenAI.
    - Set Input for Analysis: The transcribed text or the original text is set as input for nutritional analysis.
    - Nutritional Analysis: The input is processed to estimate the nutritional content (like protein, carbs, and fats) and outputs a structured JSON response.
    - Store Results: The results, along with the current date, are stored in a Google Sheet for tracking.
    - Respond to User: Finally, a confirmation message is sent back to the user on Telegram indicating that their meal has been logged successfully.
  • Customization Guide

  • Change Nutritional Analysis Prompt: Modify the prompt in the List of Ingredients and nutrients node to tailor the analysis to specific dietary needs or preferences.
    - Update Google Sheet: Change the Google Sheets document ID and sheet name to store data in a different location.
    - Adjust Telegram Settings: Update the Telegram API credentials to connect to a different bot or channel.
    - Add More Nodes: Users can add additional nodes for further processing or different integrations, such as sending notifications or alerts based on nutrient thresholds.