To streamline company workflows, you can create a customized AI Assistant based on OpenAI GPT models and integrate it with SendPulse-powered chatbots.
Your virtual Assistant will handle customer inquiries in your chatbot and reply to users based on preset instructions, conversation context, or uploaded file analysis.
In particular, it can:
- Process customer inquiries around the clock, deliver personalized recommendations, and provide expert customer support without delay;
- Create job descriptions, conduct initial candidate screenings, and develop comprehensive eLearning materials and online courses for your staff.
- Help design marketing strategies, analyze financial data, and generate reports on your business performance;
- Write selling text, create content for social media, or perform other business tasks.
Now, let’s talk about how to create and connect an AI Assistant to your SendPulse-powered chatbots.
Step 1. Set Up an OpenAI Assistant
Sign up or log in to OpenAI using the link in the description.
Go to the “Assistants” tab in your dashboard and click “Create.”
Name your Assistant and define its instructions. For instance, you can create “a chatbot that answers questions about your products, helps place orders, collects contact information, and communicates with customers in a friendly manner.”
You can also use the built-in AI editor to modify your instructions whenever you want to.
Select a GPT model from the list.
You can also upload files your Assistant will use to find answers — it can be a list of frequently asked questions, your company description, or other important information. OpenAI automatically analyzes files and uses keyword searches to generate responses to user messages.
Through integration with external APIs, your Assistant can also analyze and generate code, build charts, and invoke custom functions. You can either paste the finished function code or generate it.

Select a response format and adjust the “Temperature” and “Top P” settings.
Temperature sets model creativity. A low value, like 0.2, makes your result more accurate, and a high value, like 1, makes it more creative.
Top P determines how many word options your model considers when predicting the next word. In particular, 0.5 limits choices to the top 50% of most likely options, while 0.9 expands it to 90%.
We usually recommend you change only one of these values.
You can test your Assistant in the “Playground” section.

Step 2. Generate an API Key
Go to “API Keys” and create a new secret key.
Copy your key and save it.
Once you close this modal window, you will no longer be able to copy your key. If you didn’t copy it, you’ll have to generate and save a new one.

Step 3. Connect the Assistant to Your SendPulse-Powered Chatbot
Log in to your SendPulse account, then go to the “Chatbots” section. Select the chatbot you want to integrate with your Assistant. Go to the “Bot Variables” tab in the settings to add global variables that will maintain the same value across all flow elements where they are used.
Setting Up Global Variables
Create the $OPENAI_KEY variable of the string type. This is a global variable that will store your OpenAI API key. Paste the copied key into the variable’s value field and save your changes.
Create another $OPENAI_ASSISTANT_ID global variable of the string type. This variable will determine which Assistant to send requests to.
To find your Assistant’s ID, go to its OpenAI page and copy the string of characters above the name.
Insert the Assistant ID and save the changes.

Step 4. Create a Flow and Set Up Your Messages
To simplify the process, you can use the ready-made Assistant flow. Go to the “Templates” section in your SendPulse account, find the “OpenAI Assistants” template, copy it to your chatbot, and edit the flow to customize your Assistant.
This template includes prompts with a list of variables you need to create.
You can create variables in the “Audience” tab of your bot or directly within flow elements.
Flow Variables
The request variable saves user requests.
The thread_id variable in the “API Request” element stores the ID of the conversation session between the user and your Assistant to preserve context. Add this variable to the response field and update the “Filter” element as per the template.
The thread_message_id variable stores the ID of a specific flow message.
The thread_run_id variable stores the ongoing run ID to get a response from your Assistant, maintaining the current context.
The thread_run_status variable saves the run status, such as “In progress,” “Completed,” or “Error.”
Once you create your variables, update every flow element where they will be used.
Save your flow and test the integration.
An average response time is about 20 seconds, as the OpenAI Assistant API takes time to process requests.

You can connect your flow to a trigger or another flow to launch it for users according to your scenario.
Customize your Assistant’s instructions to fit your business identity. This will allow you to optimize workflows, increase user engagement, and provide accurate and quick responses to customer inquiries.