You can set up a basic chat bot cycle:
Install a “Generic Webhook” Utility Connector
- Navigate to the install a Utility Connector page:
- In the Cyclr Console:
- Navigate to Templates > Template Connectors.
- Select + Install New Utility.
- In the Cycle builder:
- Select + Add Utility.
- In the Cyclr Console:
- Find the Generic Webhook connector and select Install.
- Edit the Name field if you need to. This example sets the name to
Gemini webhook. - Select Next.
Setup the Generic Webhook connector
- Navigate to the Edit Connector page of the Generic Webhook Connector:
- In the Cyclr Console:
- Navigate to Templates > Template Connectors.
- Under the Installed Utility Connectors heading, select Edit Connector next to the Gemini webhook Connector.
- In the Cycle builder:
- In the right hand menu, under the Utility Connectors heading, select the Gemini webhook Connector.
- Select Settings.
- In the Cyclr Console:
- Under the Methods and Fields heading, select Webhooks > Webhook.
- Under the Request Fields heading, select the + (Add Field) icon to add request fields for:
- A
Chat Session IDfield that will receive the chat session ID to use for the chat request. - A
Messagefield that will receive the message to send to the API.
- A
- Under the Methods and Fields heading, select HTTP Methods > POST.
- Under the Request Fields heading, select the + icon to add a request field for:
- A
Chat Session IDfield that contains the chat session ID to identify which chat the response was from. - A
Messagefield that contains the response message.
- A
Create the Cycle
Create a new Cycle as follows:

Setup each Step as follows:
Webhook
Receive the chat session ID and message.
List Chat Session Messages
Check if the chat session already exists. If it does, the message from the Webhook step is sent to the chat. If it doesn’t, an initial system instruction message is sent to the chat using the Send Message step along with the webhook message.
Send Message (Existing Chat)
Sends a user message to an existing chat session.
| Field | Mapping |
|---|---|
| Chat Session ID | Webhook > Chat Session ID |
| Trim Tokens? | Use Select a Value to set if tokens should be trimmed. |
| Model | Use Select a Value to set the model. |
| Message | Webhook > Message |
Send Message (New Chat)
Sends an initial system message to a new chat session.
| Field | Mapping |
|---|---|
| Chat Session ID | Webhook > Chat Session ID |
| Trim Tokens? | Use Select a Value to set if tokens should be trimmed. |
| Model | Use Select a Value to set the model. |
| Message | Webhook > Message |
| System Instruction Part Text | Use Type a Value to set the instructions for the chat bot. |
POST
Respond to an external source with the answer Gemini generated.
| Field | Source |
|---|---|
| URL | Use Type a Value to enter a URL to post Gemini’s response to. |
| Chat Session ID | Webhook > Chat Session ID |
| Message | Send Message > Candidate Content Part Text |
Use the Cycle
To start the cycle, select Run in the Cycle builder.
To use the chat bot cycle:
- Select the Step Setup of the Webhook step.
- Make note of the webhook URL.
- Post to this webhook URL from an external source, either another Cycle or an external client such as Postman, with a request body structure as follows:
{
"chatSessionId": "test-chat-session-1",
"message": "How do I convert miles to centimeters?"
}
Cyclr saves all messages (system, user, and assistant) with the Chat Session ID provided. In this example, the ID is test-chat-session-1, and you can therefore post follow up requests with the same Chat Session ID to continue the conversation.