π¬ Save business card contacts from Telegram photos to Google Contacts with Mistral and OpenAI
β‘ 62 views Β· π¬ Document Extraction & Analysis
Description
Quick overview
This workflow listens for Telegram messages containing a business card photo and the /business caption, uses Mistral OCR and OpenAI to extract contact details, checks Google Contacts for duplicates by email, then creates a new Google Contact and replies in Telegram with the result.
How it works
- Triggers when a Telegram bot receives a message.
- Verifies the message includes a photo and a caption starting with the configured command (for example, /business).
- Checks the senderβs Telegram user ID against an allowlist to restrict who can use the bot.
- Downloads the business card photo from Telegram and runs Mistral OCR to extract the text.
- Uses OpenAI (via an information extraction step) to parse the OCR text into structured fields like name, company, role, phone, email, and address.
- Searches Google Contacts for an existing contact with the same email and either notifies the user about the duplicate or creates a new Google Contact.
- Sends a success or error confirmation message back to the user in Telegram.
Setup
- Create a Telegram bot with @BotFather and add your Telegram credential in n8n.
- Add a Mistral API key credential for OCR and an OpenAI API key credential for field extraction.
- Connect a Google Contacts OAuth2 credential with permission to read and create contacts.
- In the Configuration step, set the authorized Telegram user IDs (comma-separated) and adjust the trigger caption and reply messages if needed.
Additional info
Save business card contacts from Telegram photos to Google Contacts
π₯ Open full documentation on Notion
Need help customizing?
Contact me for consulting and support : Linkedin
MY NEW YOUTUBE CHANNEL
π Subscribe to my new YouTube channel. Here Iβll share videos and Shorts with practical tutorials and FREE templates for n8n.
π Nodes Used
Telegram, Telegram Trigger, Google Contacts, OpenAI Chat Model, Information Extractor, Mistral AI
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File
