Skip to content

Inject Custom API Content to Botium

Can be used to call a custom HTTP API and inject the response content into the Botium processing pipeline.

In this sample, the Scripting Memory function $msg is used to extract the chatbot text response from the message (JSON-Path expression $.messageText) and hand it over to an API call. The body field of the response is then again injected into the messageText field which will be used from this point on in the Botium pipeline as text response (for doing assertions).

Usage in BotiumScript - HTTP GET


give me 2

SETFROMHTTPGET$msg($.messageText) | $.body | messageText

Usage in BotiumScript - HTTP POST with Body


give me something

SETFROMHTTPPOST | { "title": "$msg($.messageText)", "body": "$msg($.messageText)", "userId": 1 } | $.body | messageText
You said: give me something


You can leave the second parameter empty to send an empty POST body

Usage in Botium Box