Skip to content

The moment it happens

Save business cards to Google Contacts from Telegram

Send a photo of a business card to your Telegram bot and it is saved as a Google Contact, with a reply confirming the details.

Runs
The moment it happens
Apps
Google Contacts, Telegram
AI
Yes, uses the built-in AI allowance
Access
contacts write; bot token

Send this to your assistant

Create a ClickRuntime automation: when I send a photo to my Telegram bot, read the business card, create a Google Contact with the name, company, email and phone, and reply with what was saved.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

After a trade show or a day of meetings, business cards pile up in a pocket. Typing them in is tedious, so it gets put off, and by the time it happens half the context is gone and some cards are lost.

Sales people, founders and consultants who meet people in person use it to save a contact in the moment, from the phone already in their hand, without a separate scanning app.

What you get out of it

  • Saved before you leave the room

    A photo takes a few seconds, so the contact exists before the conversation is forgotten. Following up the same day becomes easy.

  • Lands where you already look

    The contact goes straight into Google Contacts, so it appears in Gmail, on your phone and in any tool that reads your contacts.

  • No extra app to install

    You use a Telegram chat you already have. There is no scanner subscription and no export step.

  • You see what was saved

    The bot replies with the name, company, email and phone it stored, so a misread digit is caught right away.

How it works

What happens, step by step

  1. When you send a photo to your Telegram bot, ClickRuntime receives it straight away and ignores messages from anyone but you.

  2. The text on the card is read from the image.

  3. AI picks out the name, company, job title, email and phone.

  4. A new contact is created in your Google Contacts, with any caption you added saved as a note.

  5. The bot replies with the details it saved.

Before it runs live

  • Connect Google Contacts
  • Connect Telegram
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Save business cards to Google Contacts from Telegramjust nowSucceeded
Telegram · Card botSaved to Google Contacts name: Priya Raman · company: Acme Logistics · email: priya@acme.example

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Contacts and Telegram steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
business_card_photo_to_google_contact_via_telegram.pyexample
import base64
from clickruntime import on_event, credentials, http, ai

MY_CHAT = 123456789
FIELDS = {"type": "object", "properties": {k: {"type": "string"} for k in ["name", "company", "title", "email", "phone"]}}

@on_event
def handle(event):
    msg = (event.json or {}).get("message") or {}
    if msg.get("chat", {}).get("id") != MY_CHAT or not msg.get("photo"):
        return {"skipped": True}
    tg = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
    path = http.get(f"{tg}/getFile", params={"file_id": msg["photo"][-1]["file_id"]}).json()["result"]["file_path"]
    image = base64.b64encode(http.get(f"https://api.telegram.org/file/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{path}").content).decode()
    auth = {"Authorization": f"Bearer {credentials.connection('google', 'work')}"}
    ocr = http.post("https://vision.googleapis.com/v1/images:annotate", headers=auth, json={"requests": [
        {"image": {"content": image}, "features": [{"type": "TEXT_DETECTION"}]}]}).json()
    text = ocr["responses"][0].get("fullTextAnnotation", {}).get("text", "")
    c = ai.generate(f"Extract the contact details from this business card:\n{text[:2000]}", json_schema=FIELDS,
                    max_output_tokens=200).json
    person = {"names": [{"unstructuredName": c.get("name", "")}],
              "organizations": [{"name": c.get("company", ""), "title": c.get("title", "")}],
              "emailAddresses": [{"value": c["email"]}] if c.get("email") else [],
              "phoneNumbers": [{"value": c["phone"]}] if c.get("phone") else [],
              "biographies": [{"value": msg["caption"]}] if msg.get("caption") else []}
    http.post("https://people.googleapis.com/v1/people:createContact", headers=auth, json=person).raise_for_status()
    summary = "\n".join(f"{k}: {v}" for k, v in c.items() if v)
    http.post(f"{tg}/sendMessage", json={"chat_id": MY_CHAT, "text": "Saved to Google Contacts\n" + summary})
    return {"saved": c.get("name")}

FAQ

Common questions

How is the text on the card read?
The photo is passed to Google's text recognition, and AI then picks out the name, company, job title, email and phone from that text. Clear, well-lit photos give the best results.
What if a field is read wrongly?
The reply shows exactly what was saved, so you can fix it in Google Contacts. Cards with unusual layouts or small print are the most likely to need a correction.
Can I add a note about where we met?
Yes. Add a caption to the photo, such as Met at Northwind Expo, and it is saved in the contact's notes.
What permissions does it need?
contacts write; bot token. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Save business cards to Google Contacts from Telegram” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.