I have an SQLAlchemy database that is having data added to it in real time. I want a way to be able to send a keyword or message in Teams and run an SQL call that will return in teams. It is the reverse of this post Send automated messages to Microsoft Teams using Python_
Does anyone know if this is possible? Here is my current SQL call:
from sqlalchemy import create_engine
import pandas as pd
link = "WEBHOOK_LINK"
myTeamsMessage = pymsteams.connectorcard(link)
pwd = "path_to_working_directory"
engine = create_engine(f'sqlite:///{pwd}\\database.db', echo=False)
pd.DataFrame(engine.execute("""
SELECT *
FROM California_table
ORDER BY Page_Num DESC
LIMIT 1
"""))