Automate Sales Opportunities with Gmail, OpenAI, and Odoo

This workflow automates capturing and summarizing sales inquiry emails from Gmail using OpenAI, then creates detailed sales opportunities in Odoo. It saves time and reduces manual data entry for sales teams.
gmailTrigger
lmOpenAi
chainSummarization
+2
Workflow Identifier: 1883
NODES in Use: gmailTrigger, lmOpenAi, chainSummarization, odoo, stickyNote

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow watches a Gmail account for new emails marked with the “Sales” label.
It reads each sales email and uses OpenAI’s GPT-3.5-turbo-instruct model to make a short, clear summary.
Then, it creates a new sales opportunity in Odoo CRM with the email details and summary.
This saves time and stops sales leads from getting missed.

The main problem solved is the slow, manual handling of sales inquiry emails that wastes many hours and causes lost chances.
The outcome is automatic capturing and organizing of sales leads in Odoo, so the sales team can act fast.


Who Should Use This Workflow

This workflow is great for small to medium sales teams receiving many inquiry emails every day.
It suits sales managers or assistants who want to cut down on manual email reading and data entry.

Users running an Odoo CRM system and using Gmail will especially find this helpful.
People wanting to add AI summaries to their sales leads without coding can use this workflow easily.


Tools and Services Used

  • Gmail API: Checks and reads emails tagged “Sales”.
  • OpenAI API: Uses GPT-3.5-turbo-instruct model to summarize email content.
  • Odoo API: Creates new sales opportunity records with lead details.
  • n8n Platform: Runs the automation workflow connecting all these services.

Inputs, Processing, and Output

Inputs

  • New emails in Gmail inbox with the label “Sales”.
  • Email content including sender, subject, and body text.

Processing Steps

  • Trigger on new Gmail emails filtering by the “Sales” label.
  • Extract full text from the email body for analysis.
  • Send the text to OpenAI’s GPT-3.5-turbo-instruct with a prompt asking for a concise summary including budget, timelines, and industry.
  • Receive and refine the summary using a custom summarization node.
  • Use Odoo’s API to create a new sales opportunity with the email’s subject as the name, sender’s email, and AI summary as description.

Output

  • New sales opportunity record created in Odoo CRM containing summarized and important lead info.

Beginner step-by-step: How to use this Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file by clicking the Download button on this page.
  2. Open the n8n editor.
  3. Use the “Import from File” option to upload the downloaded workflow.

Step 2: Configure Credentials

  1. Add your Gmail account credentials with correct OAuth2 settings.
  2. Add your OpenAI API key in the respective credential field.
  3. Add the correct Odoo API credentials that have permission to create opportunities.

Step 3: Update Parameters

  1. In the Gmail Trigger, confirm the Gmail label ID or name matches the “Sales” label in your Gmail.
  2. Check the prompt in the OpenAI node matches the example below for clear summaries.
  3. Verify the fields mapped in the Odoo node use correct expressions to insert email subject and sender email dynamically.

Step 4: Test and Activate

  1. Run the workflow manually or wait for a new “Sales” email to arrive to test the flow.
  2. Verify that the sales opportunity is created correctly in Odoo with the summary present.
  3. Activate the workflow in n8n to run automatically for production.

For private usage, consider running on your own server by exploring self-host n8n.

=Write a concise summary of the following sales inquiry:
" {{ $json.text }}"
Include structured information such as project budget, timelines, industry and a general summary

CONCISE SUMMARY: 

Common Edge Cases or Failures

  • If no new emails with the Sales label appear, check the label ID and Gmail access permissions in the Gmail Trigger node.
  • OpenAI API errors usually mean expired or missing API key. Reauthorize and test the OpenAI node.
  • Failure to create an opportunity in Odoo often comes from wrong API credentials or missing required fields. Double-check the Odoo node configuration.
  • Large or unusual email formats may confuse summarization. Adjust prompt text to improve summary accuracy.

Customization Ideas

  • Change the Gmail label to watch for other types like “Marketing Leads” by updating the label ID in the trigger node.
  • Add extra fields to the OpenAI summarization prompt for more detailed lead info such as urgency or client size.
  • Map additional Odoo opportunity fields like expected close date or product interest if available in your configuration.
  • Switch OpenAI model to balance cost and detail, for example use cheaper or more powerful models.
  • Extend workflow to download email attachments and save them alongside the opportunity record using extra n8n nodes.

Summary and Results

✓ Saves 10-15 hours weekly by automating email lead processing.
✓ Reduces mistakes from manual data entry.
✓ Captures all sales inquiries and organizes them in Odoo CRM automatically.
✓ Provides clean, concise lead summaries to the sales team fast.
✓ Improves sales follow-up speed and chance to close deals.


Frequently Asked Questions

Yes, but the Gmail Trigger node must be replaced with one that supports the other email service. The email parsing steps may also need adjustments.
Yes, every email summary uses one OpenAI API call which consumes allocated credits.
Data security depends on the hosting environment of n8n and policies from Gmail, OpenAI, and Odoo APIs. Use secure API keys and encryption where possible.
For moderate volumes it works well. High volumes may require batching emails or upgrading API limits and n8n infrastructure.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free