Latenode

Automate workflows and access AI-powered insights through chat

This template is a chat endpoint that searches the web, logs useful results, and replies with an OpenAI assistant. A webhook receives the user message. Serper runs a Google search.

JavaScript normalizes title, link, and snippet. Supabase stores the keepers. GPT Assistants writes the reply, and the webhook response returns that text. Put the OpenAI key on the Assistants connection and the Serper key on the Serper connection.

Updated Sep 16, 2026Est. run: 32sEst. cost: $0.002
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

  • Takes chat in through a webhook your UI can call
  • Searches the web with Serper
  • Replies with GPT Assistants complete flow
  • Logs useful search hits to Supabase

How it works

1
Trigger

Receive the chat message

A webhook accepts the user prompt as JSON with a text field.

2
Action

Search the web

Serper runs a Google search for the query in the message.

3
Logic

Normalize hits

JavaScript flattens title, link, and snippet. A filter can keep only results above a quality rule you set.

4
Action

Store keepers

Supabase writes a row for each hit you want in the research log.

5
AI

Reply with the assistant

GPT Assistants sends the user text plus search context. The webhook response returns the assistant output.

Setup guide

1

Add the webhook

Add a webhook trigger. Point your chat UI or client at that URL.

2

Connect GPT Assistants

Add an OpenAI GPT Assistants connection, paste your OpenAI API key there, and add the send-message complete-flow step with your assistant id.

3

Connect Serper

Add a Serper connection and a Google search step. Paste your Serper API key on that connection.

4

Connect Supabase

Add a Supabase connection and a create-row step for the table that stores research rows. Map columns in JavaScript first if the search payload is nested.

Requirements

A client that POSTs chat messages to the Latenode webhook
An OpenAI API key on the OpenAI GPT Assistants connection and an assistant id
A Serper API key on the Serper connection
A Supabase project and table for stored results

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. Assistants and other vendor AI usage follows that vendor’s billing as well.