Latenode

Creating and Configuring WhatsApp Bots Using API

This template receives WhatsApp Business Cloud callbacks on a Latenode webhook, reads the sender and text in JavaScript, asks ChatGPT for a reply, and sends that reply on WhatsApp.

Connect WhatsApp Business Cloud and put the Cloud API token on that connection. In Meta, point the webhook URL at Latenode. ChatGPT is a Latenode AI step, so you do not paste an OpenAI key.

Updated Sep 16, 2026Est. run: 4sEst. cost: $0.0003
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Turns inbound WhatsApp messages into bot replies
  • Receives Cloud API callbacks on a webhook
  • Writes the answer with ChatGPT
  • Sends the reply with WhatsApp Business Cloud

How it works

1
Trigger

Receive the WhatsApp callback

The scenario starts when WhatsApp Business Cloud POSTs an incoming message to your webhook.

2
Logic

Read sender and text

JavaScript takes the customer number, message text, and message id from the payload.

3
AI

Write the reply

ChatGPT returns the answer for that message.

4
Action

Send on WhatsApp

WhatsApp Business Cloud sends the reply to that customer number.

Setup guide

1

Add a webhook trigger

Add a webhook trigger and copy its URL. In Meta Business Manager, set that URL as the WhatsApp Cloud API callback.

2

Connect WhatsApp Business Cloud

Add a WhatsApp Business Cloud connection and paste your Cloud API token there. Use a phone number that is registered for Cloud API.

3

Parse the inbound payload

In JavaScript, read the sender, text, and message id. Skip status callbacks that are not customer messages.

4

Reply with ChatGPT

Send the customer text to ChatGPT, then send the answer with WhatsApp. ChatGPT is a Latenode AI node. Use Send Message while the customer window is open.

Requirements

A WhatsApp Business Cloud app and a registered business number
The Cloud API token stored on the WhatsApp Business Cloud connection
The webhook URL saved as the Cloud API callback in Meta

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work. Plug-and-Play AI nodes are billed separately.

More templates

You might also like

Browse all templates →

123FormBuilder to Insightly: Create leads from form submissions

Manually copying form responses into your CRM wastes time and risks errors. This integration captures each New Submission event from 123FormBuilder and uses it to Create a Lead in Insightly, mapping the respondent's name, email, and custom fields directly into a new lead record. Marketing managers and sales teams can eliminate data entry and get leads into Insightly instantly for follow-up. By connecting 123FormBuilder's form capture with Insightly's CRM, you keep your sales pipeline fed without manual work.

8s~$0.002

Create a Pipeline deal from a new Discord channel message

Sales teams often miss leads buried in Discord conversations. This scenario captures every new message in a chosen Discord channel and creates a corresponding deal in Pipeline, using the message text as the deal description and the author's username as part of the deal name. Sales managers and business development reps can log inbound signals from team discussions directly into Pipeline CRM without manual data entry. The connection turns Discord into a lead source, so no opportunity slips through the cracks.

8s~$0.002

Create a Pipeline deal when a new HubSpot deal is added

Manually copying deal data from HubSpot to Pipeline wastes time and risks errors. This automation triggers on the New Deal event in HubSpot and then runs the Create Deal action in Pipeline, mapping the deal name, amount, and associated contact email and name. Sales operations teams and CRM administrators who use both HubSpot and Pipeline can eliminate duplicate data entry. HubSpot captures the initial deal, and Pipeline receives a matching record immediately, so both systems stay aligned without manual work.

8s~$0.002