Quick overview
This workflow accepts website lead submissions via a webhook, creates a new lead in Odoo CRM, sends an automatic thank-you email through Gmail, and notifies a Slack sales channel, then waits 3 days and emails a follow-up reminder if the lead is still "New".
How it works
- Receives a POST request from a web form via a webhook endpoint.
- Validates that the lead has a non-empty name and a properly formatted email address, returning HTTP 400 if validation fails.
- Creates a new
crm.lead record in Odoo CRM from the submitted details, returning HTTP 502 if Odoo lead creation fails.
- Sends an automatic thank-you email to the lead using Gmail and posts a new-lead notification to a selected Slack channel (errors in these steps do not block the workflow).
- Returns a success response to the webhook caller with the created Odoo lead ID.
- Waits 3 days, re-fetches the same lead from Odoo, and checks whether its stage is still “New”.
- If the lead is still “New”, sends a follow-up reminder email via Gmail to a configured sales email address; otherwise, it takes no action.
Setup
- Create and connect Odoo credentials with access to the CRM app and the
crm.lead model.
- Add Gmail credentials for sending the auto-reply and follow-up reminder emails, and update the follow-up recipient address (default is
[email protected]).
- Add Slack credentials, choose the target channel for notifications, and update the Odoo lead link URL in the Slack message to match your real Odoo host.
- Copy the webhook URL from n8n and configure your website form (or any HTTP client) to POST lead fields (name, email, phone, company, message) to it.
Requirements
- Odoo with the CRM app installed
Customization
- Change the 3-day wait to match your own follow-up cadence, add more required fields to the validation step, or swap Gmail for any other email node.
Additional info
Questions or need this adapted to your Odoo setup? Reach out at [email protected].