Quick overview
This workflow receives client intake submissions via a webhook, sends a tailored confirmation email through Gmail, generates a personalized advisory reply using Groq’s OpenAI-compatible Chat Completions API, and emails both the client response and an internal notification to Cyrus with urgency-based routing.
How it works
- Receives an intake form submission via a POST webhook and immediately returns a JSON acknowledgement to the form.
- Sends a service-specific HTML confirmation email to the client using Gmail based on the selected offering.
- Sends the intake details (story, urgency, goals, and context) to Groq’s Chat Completions API to generate a personalized written response.
- Checks the submitted urgency score and classifies the intake as urgent when the score is 7 or higher.
- Emails Cyrus a formatted intake summary via Gmail, using an URGENT alert version for high-urgency submissions and a standard version otherwise.
- Emails the AI-generated personal response to the client via Gmail.
Setup
- Create and connect a Gmail OAuth2 credential for sending emails, and update the internal notification recipient address if needed.
- Add a Groq API key and store it securely, then replace the hardcoded Authorization bearer token in the Groq HTTP request.
- Publish the webhook and copy the production URL to your intake form or frontend so submissions POST to /intake-form.
- Ensure your form sends the expected fields (at minimum email, name, service, urgency, area, and story) so the email templates and urgency routing work correctly.