{"product_id":"n8n-telegram-bot-openai-manage-google-contacts","title":"n8n Telegram Bot → OpenAI: Manage Google Contacts","description":"\u003ch3\u003eTurn Telegram messages into Google Contacts updates—using OpenAI in n8n\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow listens to your \u003cstrong\u003eTelegram bot\u003c\/strong\u003e messages, uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to understand contact requests (from text or photos), and then \u003cstrong\u003elooks up, creates, or updates\u003c\/strong\u003e entries in \u003cstrong\u003eGoogle Contacts\u003c\/strong\u003e. It finishes by replying back in Telegram with a confirmation or lookup result.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTelegram trigger:\u003c\/strong\u003e Starts when your Telegram bot receives a new message, capturing the chat ID, message text (or caption), and any attached photo.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eVision or text extraction via OpenAI:\u003c\/strong\u003e\n    \u003cul\u003e\n      \u003cli\u003eIf a photo is included, the workflow downloads the image and sends it to \u003cstrong\u003eOpenAI Vision\u003c\/strong\u003e to extract contact details and the intended action as a \u003cstrong\u003eJSON array\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eIf it’s text-only, it sends the text to \u003cstrong\u003eOpenAI\u003c\/strong\u003e to classify whether it’s a contact request and extract contact fields as a \u003cstrong\u003eJSON array\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntelligent processing loop:\u003c\/strong\u003e Iterates through extracted items, skipping non-contact chatter and routing parsing failures to an error reply in Telegram.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Contacts lookup (People API):\u003c\/strong\u003e Searches for matches using \u003cstrong\u003eemail first\u003c\/strong\u003e, then \u003cstrong\u003ename\u003c\/strong\u003e, then \u003cstrong\u003ephone\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLookup \/ create \/ update:\u003c\/strong\u003e For lookup requests, it returns top matches in Telegram. For create\/update requests, it creates a new Google Contact or merges updates into the first matching contact.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCapture leads by sending contact details to your Telegram bot (text or a business card photo).\u003c\/li\u003e\n  \u003cli\u003eKeep Google Contacts current by updating existing entries when new info arrives.\u003c\/li\u003e\n  \u003cli\u003eRequest “find my contact” via Telegram and receive top Google Contacts matches immediately.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes:\u003c\/strong\u003e Telegram, HTTP Request, OpenAI (Chat Completions for text + Vision), if, code, no op, and sticky note.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCredentials:\u003c\/strong\u003e Telegram bot token (via Telegram credential), \u003cstrong\u003eOpenAI API\u003c\/strong\u003e, and \u003cstrong\u003eGoogle Contacts OAuth2\u003c\/strong\u003e with the required People API scope.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45862253068467,"sku":"N8N-18055","price":31.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Yd2uPdCzEXItIAg5vse22_eRi5ExBo.png?v=1786958253","url":"https:\/\/buyflowscripts.com\/products\/n8n-telegram-bot-openai-manage-google-contacts","provider":"N8N Commerce","version":"1.0","type":"link"}