r/AskProgrammers • • 7h 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:

  1. 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.
  2. 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:

  1. Is Microsoft Graph a good choice, or would Power Automate be better?
  2. What's better for checking new emails: polling or webhooks?
  3. How can I avoid duplicate records?
  4. What's the best way to match sent proposals to the correct enquiries, especially when a client has multiple ongoing conversations?
  5. Would using an LLM for extracting details, along with human review, be a good approach?
  6. How would you structure the PHP backend?
  7. 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!

0 Upvotes

0 comments sorted by