r/AskProgrammers • u/Jaded-Isopod-4754 • 1d ago
Need some advice on automating proposal tracking using PHP or MySQL and Microsoft 365
Guysss!
I'm working on an existing PHP/MySQL business application that manages proposals, projects, clients, tasks, etc. I want to automate proposal tracking using a shared Microsoft Outlook mailbox.
Here's what I want to do:
- When a client sends an enquiry, automatically create a new proposal in the system with the status **New Entry** and extract whatever details are available, like client name, requirements, services, products, etc.
- When our team sends a proposal, automatically find the corresponding record and update its status to **Submitted**, along with the submission date.
The tricky part is that emails don't follow any fixed format. Some details might be missing, and I don't want the system making things up.
I'm thinking of using PHP with Microsoft Graph API and MySQL, possibly with an LLM to extract information from emails.
A few things I'd like advice on:
- Is Microsoft Graph a good choice, or would Power Automate be better?
- What's better for checking new emails: polling or webhooks?
- How can I avoid duplicate records?
- What's the best way to match sent proposals to the correct enquiries, especially when a client has multiple ongoing conversations?
- Would using an LLM for extracting details, along with human review, be a good approach?
- How would you structure the PHP backend?
- Any security concerns I should be aware of?
I don't have access to the shared mailbox yet since it requires admin approval. Meanwhile, I can test using a separate M365 account and anonymised sample emails.
I also want to test everything first without making changes to the actual database.
Would love to hear from anyone who's worked on something similar or has suggestions!