How it works

In manual customer support, businesses often struggle with delays in responses and limited availability, which can lead to decreased customer satisfaction and loss of potential revenue. However, with AI in customer support, embodied in an AI-powered customer service system, these challenges are alleviated. AI-based customer support enables businesses to provide round-the-clock support, ensuring prompt responses to customer inquiries at any hour. This not only enhances efficiency but also boosts customer satisfaction levels. By leveraging AI customer services, companies can overcome the limitations of manual support and maintain a competitive edge in the market. Additionally, AI chat support facilitates personalized interactions, further enhancing the customer experience.

By following the detailed step-by-step instructions outlined below, you'll be able to set up your own automated email response system in no time. This system will enable your customer support chatbot AI Assistant to handle customer inquiries seamlessly, referencing attached files as needed to provide comprehensive answers.

Let's dive in and see how to create this powerful tool to enhance your ai customer support workflow.


  • ChatGPT Assistant API access
  • Latenode account

Step 1: Creating GPT Assistant & API Key

Log in and Navigate to Assistants:

Create a New Assistant:

  • Click on the "Create" button in the upper right corner.
  • Provide a name for your assistant, such as "AI Customer Service Bot."
  • Specify instructions for how you want it to respond, including context about using attached files.
  • Choose a model and select available tools, enabling file retrieval.
Illustation how to create a new AI assistent

Add Files:

  • Upload any files that the assistant may need to reference, ensuring file retrieval is enabled.

Generate API Key:

  • Copy the assistant's ID.
  • Navigate to API keys and create a new key.
  • Save the API key for later use.

Step 2: Creating the Latenode Scenario with AI based customer support

Now, we'll set up the automation scenario in Latenode with Ai for customer service, incorporating chatbot customer support.

Illustration of Latenode Scenario How to create Support AI assistent

Authorization Token:

  • Go to Authorizations and create a new authorization for Google Workspace, specifically for Gmail.
  • Use the email address where your users will send their questions to obtain an access token.

Create Scenario:

  • Navigate to scenarios and create a new one.
  • Add the first node, "Create Thread."

Creating a Thread:

  • Inside the "Create Thread" node, insert your OpenAI API key in the authorization column and click "run once" to generate a thread ID.
Illustration how to create a Theard in scenario

Schedule Trigger:

  • Add a schedule trigger node and set the activation period and timezone.
Illustration how to create a Schedule Trigger in scenario

Get List of Messages:

  • Add an HTTP-request node to fetch a list of unread messages from your mailbox.
  • Configure the node with the appropriate URL, replacing {userId} with your email address, and add "?q=is:unread" to retrieve only unread messages.
  • Set the method to "GET" and include the authorization token.


  • Add an iterator node to process each message in the array obtained from the previous node.
Illustration how to add an iterator in scenario

Get Messages:

  • Add another HTTP-request node to retrieve the data from each unread message.

  • Configure the node with the appropriate URL using the message ID obtained from the iterator.

JavaScript Node:

  • Add a JavaScript node to process sender emails and email bodies.
  • Employ the provided code or customize it according to your requirements, enhancing AI-powered customer support.

    Here’s the code that you can put here:

export default async function run({ execution_id, input, data }) {
  let headers = JSON.parse(data["{{6.body.payload.headers}}"]); // Corrected the data path
  // from
  const email_from = headers.find((item) => === "From");
  const email_from_value = email_from.value.match(/<([^>]+)>/)[1]; // Use regex to extract email

  // snippet (content)
  const email_content = data["{{6.body.snippet}}"]; // Corrected the data path

  return {
    "email_from": email_from_value,
    "email_content": email_content
  • Ensure to replace the number of the previous node accordingly.
Illustration of code you need to this scenario

Create Message:

  • Add a ChatGPT node to generate a response message using the extracted email body.
Illustration how to create a right message in scenario
  • Insert your OpenAI API key and Thread ID.

Create Run:

  • Add a node to send the message to the assistant.
  • Insert OpenAI API key, Thread ID, and Assistant ID.
  • Choose the model version and set "true" in the Retrieval field.

Gmail Node:

  • Select the Gmail "send message" node and configure it with the necessary details.
  • Use the email_from variable from the JavaScript node in the "To" field.
  • Include the email body from the Create Run node.

Modify Messages:

  • Add a request to mark messages as read.

Choose raw format of the body and insert this:


  "removeLabelIds": ["UNREAD"]


  • Configure the node with the appropriate URL and method.
  • Include the necessary key-value pairs.

Save the scenario, deploy it, and here you are! You have an AI powered customer service assistant which can answer customer emails for you!


In conclusion, leveraging AI in customer service and chatbot customer support can revolutionize customer interaction. Integrating AI for customer support streamlines processes, while AI-powered customer service enhances satisfaction. Adopting AI customer care enables accurate issue resolution. AI tech support offers round-the-clock assistance. Deploying an AI assistant to handle customer emails amplifies efficiency. 

For assistance, reach out to Latenode's Discord community. 

Now, deploy your scenario and enjoy the AI support benefits of automated email response!

Apps in this workflow


Advertising & Marketing


Can I use Latenode if I'm not familiar with programming?

Yes, Latenode is designed for users of all skill levels. It offers advanced features for those proficient in JavaScript and intuitive visual tools and AI assistance for beginners. Whether you're an experienced developer or a novice, Latenode provides a user-friendly experience tailored to your skill level.‍‍

Can Latenode integrate with third-party services and APIs?

Yes, Latenode supports integration with a wide range of third-party services and APIs. You can connect Latenode to various online platforms, databases, and software systems to automate data transfers, trigger actions, and streamline workflows. Latenode also provides tools and resources to facilitate the integration process.

Is there a free version of Latenode available?

Yes, Latenode offers a free version that lets you explore its capabilities. This version includes a subset of Latenode's features, enabling you to start with automation and experience its benefits. You can then decide whether to upgrade to a paid plan for additional features and resources.

What is Latenode?

Latenode is a visible and intuitive automation tool designed to empower customers to streamline their workflows through automation. It allows customers to create computerized strategies via connecting diverse internet offerings and gadgets, permitting them to automate obligations and decorate productivity successfully.

How does Latenode help maximize opportunities?

By integrating all your marketing tools in one place through data integration, Latenode helps you gain a comprehensive view of your operations. This enables you to identify potential opportunities more easily and make informed decisions based on accurate data.