OpenAI provides advanced AI capabilities such as text generation and content moderation. By connecting your OpenAI account with HappyFox Workflows, you can generate text and flag inappropriate content within your workflows.
Applicable Plans: ✔️ Basic ✔️ Team ✔️ Pro ✔️ Enterprise
Actions:
-
Generate Text
-
Check Moderation
Prerequisites:
Plan
-
Supported on all HappyFox plans.
-
OpenAI usage is billed separately based on the tokens consumed in your OpenAI account.
Permissions
-
You must be an Admin in HappyFox to install and configure apps.
-
Your OpenAI API key must have access to Read/Write permissions for the necessary endpoints (/v1/chat/completions and /v1/moderations).
Use Case:
- Text Generation: Automatically generate draft responses for customer tickets, summarize ticket history, internal ticket notes, customer survey replies, etc.
- Content Moderation: Check incoming ticket messages for spam, offensive language, or policy violations before routing to agents.
Setting Up the Integration:
Step 1: Get Your OpenAI API Key
- Go to your OpenAI account.
- Click on settings icon in the top-right corner and select API Keys under the project.
- Click Create new secret key or copy an existing one.
The API key must have Write access to:
-
/v1/chat/completions (for text generation)
-
/v1/moderations (for content moderation)
Step 2: Add OpenAI to HappyFox Workflows
-
Navigate to the Apps section in HappyFox Workflows.
-
Search for OpenAI and select it.
- Paste your OpenAI API key and click Save.
How to Generate Text with ChatGPT:
Once OpenAI is connected to your HappyFox Workflow, you can use the "Generate Text With AI" action to automatically create any custom text using ChatGPT.
When configuring this action, you’ll see the following fields:
- Model - Specify the model you'd like to use.
-
Default: gpt-4o-mini
-
You may also use other supported models like gpt-4, gpt-3.5-turbo, etc., based on your OpenAI plan.
-
- Context (Optional) - The context is all the prior text that the model uses to understand the current situation or conversation.
Example: "You are a customer support agent for a SaaS company. Be friendly and concise." - Instruction (Optional) - An instruction is a specific directive telling the model what to do. It's usually phrased as a command or request.
Example: “Generate a reply apologizing for the delay and confirming a refund has been processed.” - Prompt - Describe what you want OpenAI to do. It’s a combination of Context and Instruction.
Example: “You are a customer support agent. Generate a reply apologizing for the delay and confirming a refund has been processed.”
Frequently Asked Questions:
- I don't see the API keys after saving. Has it been saved?
Don’t worry — for security reasons, HappyFox hides the API key after saving. Your key has been stored securely, and the integration will work normally.
- The workflow failed with this error: "You exceeded your current quota, please check your plan and billing details."
This error means that the quota allocated to your OpenAI account has been exhausted. You will need to purchase more tokens or upgrade your OpenAI plan to continue using the service.