Skip to content

Every 5 minutes

Save notes and business cards from a Teams chat to OneDrive

Post a note or contact details in a Teams chat and a tidy version is saved to OneDrive, with a reply confirming it.

Runs
Every 5 minutes
Apps
Microsoft Teams, OneDrive
AI
Yes, uses the built-in AI allowance
Access
Chat.ReadWrite, Files.ReadWrite

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check my Notes chat in Teams for new messages, pull out contact details or notes with AI, save them to OneDrive, and reply in the chat to confirm.

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

At a trade show or after a client visit, people jot notes and type contact details into whatever is open on their phone, which for many teams is Teams. Those messages scroll away and never make it into a proper file.

Using a Teams chat as the inbox, with AI tidying each note into a consistent format and saving it to OneDrive, turns quick messages on the go into records you can actually find later.

What you get out of it

  • Capture in the app you already have open

    No new app to install. Type a note into a Teams chat and it's handled.

  • Contacts in a consistent format

    Names, companies, emails and phone numbers are pulled out of the message. Every contact is saved the same way.

  • Notes you can find later

    Each note is saved in OneDrive with a date. They're searchable instead of buried in chat history.

  • Confirmation in the chat

    A reply tells you it was saved and what was understood. You can correct it on the spot.

How it works

What happens, step by step

  1. Every 5 minutes it checks your chosen Teams chat for new messages.

  2. AI reads each message and decides whether it is a contact or a note, then tidies it up.

  3. Contacts are added to a contacts file and notes are saved as dated files in OneDrive.

  4. A reply in the chat confirms what was saved.

  5. It remembers the last message it handled, so nothing is saved twice.

Before it runs live

  • Connect Microsoft Teams
  • Connect OneDrive

What you get

RunsEvery 5 minutes
Save notes and business cards from a Teams chat to OneDrivetoday, 9:00Succeeded
Teams · Notes chat✅ Saved contact Robin Hale (Northwind Logistics)

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 Microsoft Teams and OneDrive 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.
teams_message_notes_and_business_cards_saved_to_onedrive.pyexample
GRAPH = "https://graph.microsoft.com/v1.0"
import csv, io
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched

CHAT_ID = "your-chat-id"
SCHEMA = {"type": "object", "properties": {"kind": {"type": "string", "enum": ["contact", "note"]}, "name": {"type": "string"},
          "company": {"type": "string"}, "email": {"type": "string"}, "phone": {"type": "string"}, "note": {"type": "string"}}, "required": ["kind"]}

@on_trigger
def run(event):
    h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
    since = state.get("since") or "2026-01-01T00:00:00Z"
    msgs = [m for m in http.get(f"{GRAPH}/chats/{CHAT_ID}/messages", headers=h, params={"$top": 30}).json()["value"]
            if m["createdDateTime"] > since and m.get("from", {}).get("user") and not m["body"]["content"].startswith("✅")]
    report_fetched(len(msgs))
    if not msgs:
        return {"summary": "Nothing new"}
    for m in msgs:
        r = ai.generate(m["body"]["content"][:2000], system="Is this a contact or a note? Extract the fields.", json_schema=SCHEMA, max_output_tokens=200).json
        if r["kind"] == "contact":
            line = io.StringIO(); csv.writer(line).writerow([r.get(k, "") for k in ("name", "company", "email", "phone")])
            old = http.get(f"{GRAPH}/me/drive/root:/Notes/contacts.csv:/content", headers=h).text
            http.put(f"{GRAPH}/me/drive/root:/Notes/contacts.csv:/content", headers=h, data=(old + line.getvalue()).encode())
            reply = f"✅ Saved contact {r.get('name')} ({r.get('company', '')})"
        else:
            stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d-%H%M")
            http.put(f"{GRAPH}/me/drive/root:/Notes/{stamp}.txt:/content", headers=h, data=r.get("note", "").encode())
            reply = f"✅ Saved note {stamp}"
        http.post(f"{GRAPH}/chats/{CHAT_ID}/messages", headers=h, json={"body": {"content": reply}})
    state.set("since", max(m["createdDateTime"] for m in msgs))
    return {"saved": len(msgs)}

FAQ

Common questions

Does it read photos of business cards?
It works from the text of the message. Typing or pasting the card details works best; Teams' own text recognition on photos can help.
Which chat does it watch?
One chat you choose, such as a chat with yourself or a small Notes group, so other conversations aren't read.
Where are contacts saved?
In a contacts file in OneDrive, one line per contact, which opens in Excel.
What permissions does it need?
Chat.ReadWrite, Files.ReadWrite. 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 each time it checks. Checks that find nothing new and stop right away aren't counted.
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 notes and business cards from a Teams chat to OneDrive” from your assistant

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