Articles on: AI Tools for WhatsApp

ChatGPT Agents for WhatsApp

TimelinesAI’s ChatGPT Agents integration brings intelligent automation to your WhatsApp communication. With this setup, you can:

  • Create and customize an AI assistant in your OpenAI account, fully leveraging OpenAI’s configuration tools—including files, text, and links and ability to use custom and pre-trained models.
  • Assign the pre-configured assistant to any WhatsApp number in your TimelinesAI workspace
  • Use the connected AI agent to handle a wide range of automated responses—reply to incoming chats instantly to improve first response times and minimize customer wait times. The agent can also gather essential customer information upfront, ensuring a smooth and efficient handoff to a human agent when needed. It is all up to how you configure the assitant.
  • Generate GPT-powered summaries of existing WhatsApp chats—no more manual scrolling needed.
ChatGPT require both TimelinesAI credits and OpenAI tokens to generate and send WhatsApp message reply


This guide will walk you through simple steps to successfully use all the features of the TimelinesAI ChatGPT Agents integration.


Prerequisites
Connecting Timelines to OpenAI account
How the Integration Works
How Live WhatsApp Chat Extension works?
How WhatsApp To Zoho Sync works?


Let’s get started 🚀


Prerequisites


To access TimelinesAI ChatGPT integration feature following is required:


  • An active TimelinesAI workspace with sufficient automation credits available (mass messaging quota balance).
  • An active OpenAI account with enough token balance to support agent usage.

Connecting TimelinesAI to OpenAI account


To begin with the Timelines and ChatGPT integration, you must add your OpenAI API key to TimelinesAI ChatGPT agents settings at https://app.timelines.ai/openai/assistants/settings/


To obtain OpenAI API key:


  1. Login to OpenAI Dashboard > API keys ( https://platform.openai.com/api-keys)
  2. Create a new secret key with permissions "All"
  3. Copy the key
  4. Add and save copied OpenAI API key in ChatGPT Agents settings page at https://app.timelines.ai/openai/assistants/settings/

Creating and training OpenAI assistant


  1. Create OpenAI assistant at https://platform.openai.com/assistants/
  2. Give your assistant easily recognisable name
  3. Provide system instructions: those are your guidelines to AI on what you would like or would not like the AI to do and how to do it
  4. Select desired model. Example: gpt-4o . Here are guidelines on model selection recommended by OpenAI : https://platform.openai.com/docs/guides/model-selection
  5. Enabled desired tools. Example: enable File search and upload files assistant assistant can use when replying to WhatsApp messages
  6. Select desired model configurations
  7. Save the assistant

Creating ChatGPT agent in TimelinesAI


You have completed the following steps:

  • Configured a custom assistant with your own instructions and/or files inside your OpenAI account
  • Added your OpenAI API key to your TimelinesAI account


You're now ready to connect the assistant to a WhatsApp account—this creates a ChatGPT agent. To create a ChatGPT Agent:

  1. Go to OpenAI’s Assistants page
  2. Click on "Connect an Agent" to set up the integration
  3. On Step1:
  • Select desired WhatsApp account: You can choose between a specific WhatsApp account and All Numbers ( the assistant will be linked to all current and future WhatsApp numbers connected to your TimelinesAI workspace).
  • Define Chat Scope: Specify where the assistant should operate: Only in new direct chats or In new and existing direct chats. Note that ChatGPT agents can work only with direct chats. WhatsApp group chats are not supported.
  1. On Step2:
  • Select desired OpenAI assistant from the list
  1. On Step3:
  • Select Auto response override time: The Auto Response Override defines how long the ChatGPT agent waits (in seconds) from the first new message received before it starts preparing a reply. During this window, it collects any additional received messages. After the timeout ends, the agent prepares and sends a single, unified response to all received messages combined. Note: the countdown does not reset with each new message received within a wait window.
  • Add desired agent name: This name setting does not affect the agent's behavior—it’s just for display within your TimelinesAI workspace.
  • Save and optionally activate configured Agent


Agent activation/de-activation


There can be only one active Agent per WhatsApp account. If you try to activate an agent where WhatsApp account is already linked to another active agent - system will de-activate all duplicates and keep only the most recent agent active


You can activate an agent at the last step of agent creation wizard. Already saved agents can be activated/deactivated from the Agents list at https://app.timelines.ai/openai/assistants


  • Active agents will join chats that match agent's settings
  • Inactive agents never join any chats

How it works?


Assuming you've added an API key and activated at least 1 agent, here is how ChatGPT Agent will work moving forward:


  1. When a new message is received on any WhatsApp number connected to your TimelinesAI workspace, the system will first check whether a GPT Agent is enabled for that specific chat. Not all conversations should be handled automatically. You might want to:
  • Keep some chats strictly human-operated
  • Manually manage sensitive or high-priority conversations
  • Prevent auto-replies in certain workflows (e.g., internal communication)
    To respect this flexibility, TimelinesAI checks the agent status per chat before doing anything else. If the ChatGPT Agents are disabled in chat, the agent does not join the chat.
  1. If ChatGPT Agents are enabled for a chat where a new message is received, the system will look for an active agent that matches the conversation based on:
  • The WhatsApp number the message was received at
  • The agent’s configured chat scope
    Note: If an agent was set to work in “new direct chats only”, and it has already replied in that specific chat, it will continue responding to all future messages in that same chat,
    even though the chat is no longer technically “new.”
  1. Once the system identifies a ChatGPT agent that matches the chat (based on WhatsApp number and chat scope), the following steps take place:
  • Agent Joins the Chat
  • 1 TimelinesAI Credit unit (also referred to as a quota unit) is reserved. This unit is deducted from your available balance, representing the agent's engagement with the chat.
  • The agent waits for the duration you set in the Auto Response Override (e.g., 10 seconds), allowing multiple user messages to be collected during this time.
  • Messages Are Batched and Sent to OpenAI Assistant. Each WhatsApp chat is represented by a unique thread in your OpenAI account. TimelinesAI appends new messages to this same thread associated with the given chat if it exists OR creates a new thread if the chat is new and doesn't have its own thread in OpenAI.
  1. Assistant Analyzes the Message. The assistant processes the new messages by:
  • Applying the instructions, files, and tools you used to configure it
  • Taking into account all previous messages in the same thread to maintain context and coherence
    This ensures the assistant provides intelligent, relevant, and personalized replies and that responses are relevant over time.
  1. When the assistant generates a reply:
  • Tokens are consumed based on the length and complexity of both the input and output.
  • These tokens are billed to your OpenAI account, according to your plan and usage
  1. Generated reply is sent back to TimelinesAI ChatGPT agent, and the agent sends it as a WhatsApp messages in corresponding chat.
  2. If the message is sent successfully:
  • The previously reserved TimelinesAI credit unit is permanently deducted from your account.
  • The interaction is logged and the conversation continues normally.
  • The chat is marked as currently having ChatGPT agent "Active" in the chats list.

  1. If there's an error while generating OpenAI response to sending it as a message:
  • The reserved credit unit is restored to your balance.
  • If the issue is related to OpenAI API key, the agent will be flagged as having issues to help you troubleshoot or take corrective action.



Enable and Disable GPT agents for individual chats


If an agent that was already active in a chat is disabled and then re-enabled again, it will not process or respond to any messages that were received while it was disabled. The agent will only reply to new messages that come in after it has been re-enabled.


You can manage whether ChatGPT agent is enabled or disabled for a particular chat within the "ChatGPT Agent" toolbarl in chat details page.

  • By default ChatGPT agent is enabled in all direct chats. This means that when an active agent that match's chat's WhatsApp number or scope is found - it is allowed to join this chat and reply on your behalf.
  • ChatGPT agent are disabled automatically when an outgoing message is sent in a chat by anybody other then GPT agent itself. For example: when a human operator responds, GPT agent will be disabled automatically. This means that even if an active agent exists for this chat, it will not join it, unless you manually enable and allow it to join.
  • GPT agent can be disabled manually in each chat using the "Disable in this chat" button in chat details's sidebar

Editing saved ChatGPT agent


To edit an agent open https://app.timelines.ai/openai/assistants/settings/ and click the pencil ( Edit) icon next to the desired agent.


When an agent is active, it's currently in use — possibly running automations, responding to queries, or handling workflows. Allowing edits during this time might cause errors or unexpected behavior. Therefore please note that:

  • Edits are locked while the agent is active.
  • Trying to edit an active agent triggers popup prompting you to deactivate it first

    Once deactivated, the system transitions to the agent setup wizard. You can change agent's settings as needed and re-activate it after the last step of the wizard.


Any changes done to agent will apply only to messages in chats going forward only.


  1. When you change the WhatsApp number for an agent, the agent will no longer respond to chats associated with the previous number (XXX). If the agent has already joined chats under number XXX, and you update the number to YYY in the agent's settings, they will only be able to respond to new chats linked to the YYY number after you save the changes and re-activate the agent. Chats from XXX number will be ignored by this agent.
  2. When you change the chat scope from "new and existing chats" to "only in new direct chats," agents who previously responded to chats will no longer be able to participate in ongoing conversations. They will only be able to join new direct chats moving forward.

Filtering chats where ChatGPT Agent is currently active or has been disabled


When a ChatGPT agent successfully sends a WhatsApp message in a chat, a badge will appear on that chat to indicate that the agent is active. This badge will remain visible as long as the ChatGPT agent is enabled for that chat.
Incoming messages from the user do not remove or affect the badge. It only goes away if the agent is disabled for that chat.
lter chats where ChatGPT agent is currently active:

  1. Open the Chats List at https://app.timelines.ai/ and create a new filter
  2. Select desired ChatGPT Agent status and apply the filter:
  • Active: will display chats where particular GPT agent is currently active and has already sent at least 1 reply
  • Deactivated: will display chats where ChatGPT agents were explicitly disabled


Troubleshooting issues with an Agent


  1. You can check the Activity log for more information about agents' performance
  2. If the system can detect the reason why an Agent failed to run the agent will be marked as having an issue. Agent will be highlighted in red with a "Fix issues" icon under "Actions". Refer to following articles for more information:






Updated on: 29/06/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!