Webhook Integration Guide: Thunai App with Freshdesk
To configure a Thunai application to trigger a webhook from Freshdesk upon ticket creation via automation rule, follow the steps below:
Step-by-Step Guide
1. Prepare the Webhook in Thunai
- Go to the Thunai Dashboard → Application > MCP Tool
This will redirect you to the Create Custom App page.
- Click Create, then fill in the required fields:
- App Name
- Type: Select Event-Based
- (Optional: Add Description and Logo)
- After creating the application and enable the toggle then, add a webhook:
- Fill in the Webhook Name
- Set a Primary Key (this is a mandatory field used in the webhook payload)
- Define Webhook Fields in JSON format, related to the target application — for example, Freshdesk ticket creation:
{ "ticket_id": "{{ticket.id}}", "subject": "{{ticket.subject}}", "description": "{{ticket.description}}", "priority": "{{ticket.priority}}", "status": "{{ticket.status}}", "requester_email": "{{ticket.requester.email}}" }
- Once added, you’ll have access to:
- Webhook Name:
freshdesk_ticket_create
- Webhook CURL Endpoint
- The JSON structure for the webhook fields (as shown above)
- Webhook Name:
2. Create or Modify Freshdesk Automation Rule
- Go to Freshdesk Admin → Workflows → Automations → Ticket Creation
Click on “New Rule” or Edit an existing rule
- Set the Trigger Conditions, e.g.:
- When → Ticket is → Created
(Add other conditions if needed)
Under Then Actions, select:
Trigger Webhook
Configure the webhook:
Request Type:
POST
URL: Paste the Thunai Webhook URL
Requires Authentication:
Use Freshdesk API key or username/password as required
Add Custom Headers:
Fetch authorization details from:
Thunai Dashboard → Settings → API Keys → API Secret & Key
- Sample header format:
{ "Content-Type": "application/json", "Authorization": "Basic <Base64Encoded_Auth_Key>" }
- Encoding:
JSON
- Content/Payload: Use the same JSON structure defined earlier
- Save the rule.
3. Test the Integration
- Create a test ticket in Freshdesk (with matching rule conditions)
- The webhook will be triggered automatically
- You can verify the webhook trigger from Thunai’s dashboard/logs
Voice/Chat Agent Integration
If this webhook is mapped to a Voice or Chat Agent (Workflow Version 3), then:
- While generating the flow, during application selection, this webhook can be selected
- Upon trigger, it will automatically start the agent workflow, executing the predefined conversation or logic