This is where AI agents come in really handy.
If you had provided the legal database API I could easily check to see if make.com has an app for it which will make it a native integration and would enable a drag and drop setup.
How do you get the inputs into make.com? Via a web hook I suppose? Or are you using a form that has an instant trigger like a tally.so form? Regardless of input method your need something that instantly triggers the workflow.
And if I were you I would classify inputs. This is a legal issue and it’s crazy sensitive. Your AI might end up giving your client a horrible piece of advice not because the AI is bad or wrong but because the AI needs more than enough contexts to properly handle legal cases.
Another importance of the input classification is to triage your inputs in real time and be able to escalate some inputs to you for human legal oversight which is extremely vital here. You will also need succinct logging for governance audits to ensure you don’t allow your agent in a black box.
MY RECOMMENDATIONS:
Use a webhook to send your data to make.com then use an intake AI agent to triage and classify your inputs in real time. Give this triage agent about 10 to 20 legal themes that your practice specializes in. If the form inputs are categorized under any of these cases then the agent adds a marker that a filter around a router can understand and routes the input into a second AI agent. If the incoming data is about something not categorized under your 20 legal specialities then add a send email + Slack at the second end of the router and use that branch as a fallback in your filters.
With this, the agent can escalate the case to your team without wasting credits and tokens in cases where you hand the agent an email sending tool to use.
PLEASE LOG EVERYTHING. Add a database even a simple googlesheet at the end of every branch and map all important deatils to log every input.
Now your legal advice agent doesn’t get bombarded with almost every input because the intake agent only routes inputs classified under one of these themes. This means your agent stays deterministic.
This agent will have to do 2 big things. If you ask me I will say;
-
Escalate inputs to you and your Slack team. - I’ll explain later.
-
Draft the email and send to your customer/form filler/potential client.
- You said you have access to a legal database API that doesn’t automatically mean you’ll have answers that fits every single case. If your used case is high ticket advice then I recommend an API search done by the agent 2 times and use rules to determine whether the results resonate. If yes only then will it proceed with the advice and if the database response aren’t up to standards the agent escalates everything to your team or you.
This prevents high level hallucinations where the advice looks so correct even in the eyes of legal Pros but the case is actually wrong. Success here would depend on quality standards given to the AI agent to work with.
- Draft a legal advice and send.
Please if you want this agent to work on real legal cases don’t use a dry scanty email to send advices to your clients. Use a legal advice template and get the AI populate it so the format, presentation, structure and steps stays deterministic. This makes it 10x easier for the AI to work with.
Use an execution algorithm that details the steps that the AI will use to execute the advice, what tools to use, what knowledge rags to look at etc. This is to ensure you have consistent outputs. If possible give it an exemplary document to gain inspiration from.
I also would never recommend direct AI legal advises without HITL. You should please get the AI agent send the document for you or your team to review and then if you think adjustments are needed you do it. Only confirmed documents are sent to the client as legal advice. This is cleaner and more professional. It requires more time for sure but keeps you out of legal troubles.
As general rules. Don’t forget to use error handlers in make and input validation at the level of the form. And if I were working on such high stakes automations I would re-validate inputs, I will use modules like swndpulse email validation to ensure emails are valid so that addresses that fail validation are logged immediately and the workflow is stopped instead of working all through just to send an email that never gets recievd and maybe can’t be adequately retrieved.
I can help you out.