How To Use the OpenAI API to Read Emails from the Lead inside of Zoho CRM and Provide an Engagement Score using A Custom Prompt

Are you looking for a smart solution to read emails from the lead of Zoho CRM? We got you covered. With the help of Zoho Flow, you can integrate Zoho CRM and OpenA.

Published on February 27, 2024

Share This Post
open ai

Are you looking for a smart solution to read emails from the lead of Zoho CRM? We got you covered. With the help of Zoho Flow, you can integrate Zoho CRM and OpenA. In this way, you can read emails from the lead and when you add a custom prompt to the OpenAI, it is easier to obtain the engagement score.

Who is this Feature for?

  • Sales and marketing team
  • Small and medium businesses
  • CRM administrators
  • Entrepreneurs and startups
  • Professionals managing high lead volumes
  • Compliance and data protection officers

What Progress Will You Achieve?

  • With the integration of Zoho CRM and OpenAI in Zoho Flow, the following progress can be achieved;
  • By proper analysis of email content and engagement score, businesses can tailor the interactions to potential leads
  • Time-saving process with the reduction in manual efforts of the lead management process
  • The engagement scores provide valuable insights
  • The compliance and data protection ensures that businesses are in compliance with privacy and data protection regulations


With the help of OpenAI’s advanced capabilities, it is easier to analyze email content using custom prompts and provide engagement scores. The email can be integrated into Zoho CRM then both can be connected to each other.

How to Connect Zoho CRM and OpenAI to Get Engagement Score?

Connect your mailbox with Zoho CRM first. Go to set up and choose Email from the Channel category. Choose Email Configuration and then press on the Email option it will redirect you to the Get Started interface. You will see many email software appear in the queue. Select your desired ones and choose API Integration in the protocol to choose. Then press the Configure button it will redirect you to the permission page of the email. Select email and click on the allow button to configure email to Zoho CRM. Press the save button at the Zoho CRM interface then the email is configured.

Now, sign in to Zoho Flow. Click on the new flow button and name that as per your requirements. After clicking on the Create button, choose App from the triggers option. Then press next and it will lead you to the search interface where you can select the required app to add as a trigger. Write Zoho CRM in the search bar and select.

Choose the Zoho CRM trigger of New lead and press Next. Choose a connection and name the variable. Then press done.

Write OpenAI in the search bar of the left side menu of the Workflow builder interface. Choose Create Completion, drag, and drop to connect with the Zoho CRM trigger. Choose connection, choose davinci-002 in the model, and add the custom prompt as follows;

Code Script

import openai

openai.api_key = ‘your_api_key’

def generate_engagement_score(email_content):

prompt = f”Calculate the engagement score for the following email: {email_content}”

response = openai.Completion.create(



max_tokens=50  # Adjust as needed


return response.choices[0].text


# Use this function to generate engagement scores for emails

engagement_score = generate_engagement_score(“Email content goes here”)



Add your API key from the OpenAI in place of Your API Key in the above code script prompt and press the done button. You can change the name of the OpenAI trigger.

Toggle on the button to make the flow live and test the flow by pressing the test button.


You need an API key to connect the OpenAI account to Zoho Flow.

Recent Posts
  • How to add zoho mail to iphone? Sync Emails, Notifications, Access issues
  • How to Access Your Zoho Mail Account Directly in Gmail
  • A Comprehensive Look into Zoho CRM Features
  • Zoho CRM Storage Explained: Limits, Upgrades & Optimization Tips
Share This Post

Related Posts

Discover the latest news and updates on Zoho applications.

Unlock Your Knowledge Journey!

Get three articles for free, then enjoy unlimited access by registering.