How to Use ChatGPT in Splunk®
- Eric Jorgensen
- Aug 7
- 1 min read
This will be the first of many blog posts detailing how to use Dataflect to implement AI driven workflows without leaving Splunk®.
There are several options out here for integrating Splunk® with ChatGPT. Dataflect allows you to approach this integration with maximum ease and flexibility.
This very basic example will demonstrate how you could leverage Dataflect to enable your users to interact with ChatGPT without leaving Splunk®.
This dashboard leverages two of Dataflect's core functionalities:
Using dfsearch, we create a dynamic dropdown that allows the user to select from available models:

| dfsearch url="https://api.openai.com/v1/models" credential=openai | stats count by idThen, we use the selected model, and the prompt entered by the user, to interact with the OpenAI API and output the ChatGPT response.

| dfengage url="https://api.openai.com/v1/chat/completions" credential=openai headers="{'Content-Type': 'application/json'}" data="{'model': '$model$', 'messages': [{'role': 'user', 'content': '$message$'}]}" data_format=json containing_field=choices | spath input=message | table contentYou'll notice that all of the API calls are authenticated using a stored credential, to maximize security and control.
it's really that simple and quick. This is a fairly basic example, but you can imagine using this capability to:
Allow SOC analysts to gain information on a potential incident
Allow Splunk Admins to gain troubleshooting support
Allow Splunk Users to gain SPL support, or get ideas for dashboards.
All of this without ever leaving Splunk® web.
If you would like help implementing this or other related use cases - reach out to us today at sales@dataflect.com.