Quick overview
This workflow polls Gmail for new emails, checks whether the sender exists as a contact in Clientify, and uses OpenAI to classify and summarize the message. It logs the triage result to the contact timeline and escalates high-urgency emails or complaints with a Clientify task and a Slack alert.
How it works
- Triggers every minute when a new email arrives in Gmail.
- Extracts sender, subject, and body, and ignores internal emails (matching your domain), no-reply addresses, and newsletter-style messages.
- Searches Clientify contacts by the sender’s email address and stops if there is no exact email match.
- Sends the email and contact context to OpenAI (GPT-4o-mini) to return structured triage output including category, urgency, sentiment, a two-sentence summary, whether a reply is needed, and a suggested action.
- Adds the triage details as a note on the matching Clientify contact.
- If urgency is high or the category is complaint, creates a follow-up task in Clientify due today and posts the summary and suggested action to a Slack channel.
Setup
- Install the community node
n8n-nodes-clientify and create/connect a Clientify API credential.
- Connect Gmail OAuth2 credentials for the Gmail Trigger and ensure the inbox you want to monitor is available.
- Add OpenAI credentials (Chat Model set to gpt-4o-mini) and Slack credentials, then set the target Slack channel (for example,
#crm-alerts).
- Update the
ownDomains list in the email extraction step to match your company domains so internal messages are skipped.
- Review the Clientify task due date timezone setting (
Europe/Madrid) and adjust it to your preferred timezone and due-time.
Requirements
- Clientify account with the API add-on and an API key
- Gmail account connected to n8n (OAuth2, read access is enough)
- OpenAI API key
- Slack workspace with a bot that can post to the alert channel
- Self-hosted n8n with community nodes enabled
Customization
- Edit the categories, urgency rules and the system message of "Classify email" to match your business
- Change the escalation rule in "Needs attention?" (for example only complaints, or also billing)
- Add Clientify "Add Contact Tag" with the category to segment contacts by what they write about
- Create the contact when the sender is unknown, or draft a reply in Gmail using the contact timeline as context