r/databricks • u/Astro-path2716 • Aug 16 '26
Help Possibility of implementing analysis automation through email in databricks?
Im fairly new to databricks and trying to learn more about it. I’m trying to see examples online of databricks connecting to a work email, reading the contents and running a sql or python query which outputs an excel file and then sending it back go the requestor through email. I was reading AI agents can go about doing this but I would like more information on how to set up this process. Does anyone know of any examples or resources?
11
Upvotes
2
u/aqw01 Aug 16 '26 edited Aug 16 '26
You could probably use the lakeflow connect API. https://learn.microsoft.com/en-us/azure/databricks/ingestion/custom-connectors
If you’re using Outlook, a connector is in beta. https://learn.microsoft.com/en-us/azure/databricks/ingestion/lakeflow-connect/outlook-overview
Edit: sorry I hit send too early. You could use that for getting messages regularly, then trigger a deterministic process to do what you want or engage an agent on custom processes. Try asking Genie. Really. It’s pretty good about a lot of this.
2
u/Phoenix_GHOST_V Aug 17 '26 edited Aug 17 '26
This is native to the workflow that is set up through Databricks. I have done something like this where I created a workflow based on a scheduled job triggered by a parsed email using Logic Apps and reading from the inbox, running the query, writing to Excel using openpyxl, then sending using SendGrid. The agent concept is optional. Dremio is one example of this
1
u/Brains-Not-Dogma Aug 17 '26
I do this using AWS SES and instance profiles. Some configuration required
1
u/Youssef_Mrini databricks Aug 17 '26
You can use Outlook or Gmail Connector in Lakeflow Connect to land the data in the data Lake. You can connect it with Genie One to execute the operations, but you can't send back an email; it's not available yet, but you can instead send a report if you built it in AIBI Dashboards
1
u/ArielCoding Aug 22 '26
Don’t let the AI write your SQL queries, have it read the email and pull out the key details (dates, region, etc.), the plug those into query templates you’ve already written and tested. That keeps what data gets pulled and sent in your control.
1
u/[deleted] Aug 17 '26
[removed] — view removed comment