Quick overview
This workflow captures customer inquiries from Gmail or a website form webhook, deduplicates them in Airtable, summarizes new messages with Groq (Llama 3.3) via an AI Agent, posts updates to Slack, and sends an automated acknowledgment email through Gmail.
How it works
- Triggers when a new Gmail message arrives or when a website form submits a POST request to the webhook.
- Normalizes the incoming payload into a consistent structure (name, email, message, source, and timestamp).
- Searches Airtable for an existing inquiry with the same email address to detect duplicates.
- If a duplicate is found, posts a duplicate alert to a Slack channel.
- If it is not a duplicate, creates a new record in Airtable with the inquiry details.
- Uses Groq (Llama 3.3) to generate a 1–2 line summary of the inquiry and posts it to Slack.
- Sends an automatic thank-you/confirmation email to the inquirer via Gmail.
Setup
- Connect credentials for Gmail OAuth2, Airtable Personal Access Token, Slack OAuth2, and a Groq API key.
- In Airtable, ensure the base and “Inquiries” table exist and include fields matching Name, Email, Message, Source, and Timestamp, then update the base/table IDs if yours differ.
- Configure the Slack channel (e.g., #inquiries) in both Slack message steps.
- If using the website form path, copy the webhook URL from n8n (path: /customer-inquiry-form) and set your form to POST name, email, and message in the request body.