How to Build a Freshdesk AI Support Agent in MegaNova Studio
Most Freshdesk deployments have the same problem: tickets get created for everything, including questions the system should be able to answer on its own. An AI layer in front of Freshdesk handles the resolvable cases and only creates tickets for the ones that actually need a human.
MegaNova Studio has two separate Freshdesk integrations. Understanding which one fits your use case before you build saves time.
The agent tool (create_freshdesk_ticket): an agent decides mid-conversation that the user needs human follow-up, and creates a ticket directly from the conversation.
The workflow Freshdesk node: a workflow runs automated evaluation, a Condition node determines whether escalation is warranted, and the Freshdesk node creates a ticket only when the condition fires.
Both pull context from the conversation automatically. The ticket is not blank — it includes what the AI said, what the user said, and where the conversation stalled.
What You Need From Freshdesk
Before setting up either integration, you need two things from your Freshdesk account:
Your domain — either the subdomain alone (mycompany) or the full domain (mycompany.freshdesk.com or, for Freshworks accounts, the full URL like mycompany.myfreshworks.com). MegaNova handles both formats.
Your API key — in Freshdesk, go to your profile (top right) → Profile Settings → scroll to Your API Key. Copy it. This key authenticates all requests from MegaNova to your Freshdesk account.
Option 1: Deploy an Agent With the Freshdesk Tool
This is the simpler of the two options. Your character is deployed as an agent. During a conversation, the agent determines it cannot resolve the user's issue and creates a Freshdesk ticket without leaving the conversation.
Step 1: Add the Freshdesk Integration to Your Space
In MegaNova Studio, navigate to the Integrations section (accessible from the main navigation or Agent Market). Find Freshdesk and click to configure it.
Enter:
- Domain — your Freshdesk subdomain or full domain
- API Key — the key you copied from Freshdesk profile settings
- Default Priority (optional) — the priority assigned to tickets when none is specified (default: Medium)
- Default Group ID (optional) — routes tickets to a specific agent group in Freshdesk
After saving, the integration runs a connection test by fetching your ticket list. If the domain and API key are correct, the integration shows as active.
Step 2: Enable the Tool on Your Agent
Open your agent in MegaNova Studio and go to the Tools tab. Find Create Freshdesk Ticket in the available tools list and enable it. Link it to the Freshdesk integration you just configured.
The tool is now available to the agent during conversations. Its description tells the model exactly when to use it:
"Create a support ticket in Freshdesk. Use when the user has an issue that needs human follow-up."
Step 3: Configure the Agent's Instructions
The tool fires when the agent decides to create a ticket. Without guidance, the agent may create tickets too aggressively or too rarely. Add explicit instructions to the agent's system prompt about when to escalate:
- If the user has a billing issue the agent cannot resolve, create a ticket
- If the user asks to speak to a human, create a ticket
- If the same issue has been raised more than twice in the conversation without resolution, create a ticket
- For general questions the agent can answer, do not create a ticket
When the agent calls the tool, it passes:
- Subject — a one-line summary it generates from the conversation
- Description — a detailed description of the issue
- Priority —
low,medium,high, orurgent(defaults tomedium)
The ticket is created in Freshdesk immediately. The agent tells the user a ticket has been created and provides the ticket number. In Freshdesk, the ticket appears with status Open and source Chat.
Option 2: Escalate via Workflow
The workflow approach is better when you want explicit control over the escalation logic rather than relying on the agent's judgment. You define the condition; the workflow executes it consistently.
Step 1: Add the Same Freshdesk Integration
Same as Option 1 — add your Freshdesk domain and API key in the Integrations section. The workflow node uses the same integration.
Step 2: Build the Workflow
In the Workflow Editor, you need at minimum four nodes:
Trigger → Chat → Condition → Freshdesk
Here is what each node does in a support workflow:
Trigger node: receives the incoming customer message. This can be a webhook trigger from your website's contact form, an API call, or a workflow that fires when a new support request arrives. The trigger passes customer email, name, and message content downstream.
Chat node: your AI character processes the request. Set the Chat node to your support character. It receives the customer's message and generates a response. If it can handle the issue, the response is the resolution. If it cannot, it outputs a response that signals the issue is unresolved.
Condition node: evaluates whether escalation is needed. This is the gate — the Freshdesk node will not fire without an explicit should_escalate: true from this node. Configure conditions such as:
- Customer explicitly requests a human agent
- Keyword match on escalation phrases ("not working", "billing issue", "refund")
- AI confidence score below threshold
- Conversation turn count exceeds a limit
When the condition evaluates to true, it sets should_escalate: true and passes the reason downstream. When false, it sets should_escalate: false with a deflect reason — the Freshdesk node skips silently and the workflow continues on the deflect path.
Freshdesk node: creates the ticket when escalation is approved. Drag it from the Materials Library under Channels → Freshdesk. Connect the Condition node's output to the Freshdesk node's Trigger input. Connect any upstream nodes you want included in the ticket to the Context input.
In the Freshdesk node's properties:
- Integration — select the Freshdesk integration you configured
- Label — this becomes the ticket subject
- Priority — Low, Medium, High, or Urgent (color-coded in the node: green, yellow, orange, red)
- Tags — optional tags added to the Freshdesk ticket
Step 3: What Goes Into the Ticket
The Freshdesk node assembles the ticket description automatically from connected upstream nodes:
- Character context: if a Character node is connected, the ticket includes the AI character's name and description
- Trigger context: the original customer message, customer email, and customer name from the trigger
- Chat response: the AI agent's response, marked with
--- AI Agent Response ---so the human reviewer knows what was already said - Storage or lorebook content: if text from a storage node or knowledge lookup is connected, it is included in the description
The assembled description becomes the ticket body. A human reviewing the ticket in Freshdesk can see the full context — who the customer is, what they asked, what the AI tried, and why it escalated.
The outputs of the Freshdesk node are:
- Ticket ID — the Freshdesk ticket number (can be passed to a downstream Chat node to tell the user their ticket number)
- Status —
success,deflected,failed, ornot_configured
Step 4: Close the Loop
Connect the Freshdesk node's output back to a final Chat node that tells the customer:
"I've created a support ticket (#12345) for you. Our team will follow up within [timeframe]."
Use the Ticket ID output from the Freshdesk node as a variable in that message.
What the Ticket Looks Like in Freshdesk
Every ticket created by MegaNova arrives in Freshdesk with:
- Status: Open
- Source: Chat (source code 7 — visible in the ticket's source field)
- Priority: mapped from the node or tool setting (Low=1, Medium=2, High=3, Urgent=4)
- Email/Name: customer contact details from the workflow context
- Tags: any tags configured on the node
- Description: the assembled context from upstream nodes
If you configured a Default Group ID in the integration, tickets are automatically routed to that agent group in Freshdesk. Without it, tickets go to the default unassigned queue.
You can also add notes to existing tickets after creation using the integration — the add_note operation posts a follow-up to an existing ticket, marked as private by default.
Choosing Between the Two Approaches
| Agent Tool | Workflow Node | |
|---|---|---|
| Escalation decision | Agent decides | Condition logic decides |
| Flexibility | Agent adapts per conversation | Consistent, rule-based |
| Setup complexity | Lower | Higher |
| Best for | Conversational support agents | Automated triage pipelines |
| Human oversight | Agent judgment | Explicit conditions |
Use the agent tool when your use case is a conversational customer support bot where the AI should autonomously judge when to escalate. The agent reads the conversation, determines the issue is unresolvable, and creates the ticket — no external workflow needed.
Use the workflow node when you want deterministic escalation logic — specific conditions that always trigger a ticket, regardless of how the AI interprets the conversation. Workflows are also better for automated pipelines that run without a human in the loop at all.
Testing the Integration
Before going live, test that tickets are creating correctly:
For the agent tool: start a conversation with your agent in the Test tab and ask about an issue the agent cannot resolve. It should create a ticket and return the ticket number. Check your Freshdesk dashboard to confirm the ticket arrived with the correct subject, description, and contact details.
For the workflow node: in the Workflow Editor, trigger a test execution. Connect a test trigger with sample customer data. Let the workflow run through to the Condition node. Verify the should_escalate value matches your expectations, then check Freshdesk for the resulting ticket.
If the connection test passes in the Integrations section but ticket creation fails, the most common cause is an API key with insufficient permissions. Freshdesk API keys need Agent role access, not just view access, to create tickets.
Stay Connected
💻 Website: Meganova Studio
🎮 Discord: Join our Discord
👽 Reddit: r/MegaNovaAI
🐦 Twitter: @meganovaai