Agent Templates
Freshdesk CSAT agent

CSAT survey automation that emails resolved Freshdesk tickets

Watches Freshdesk for resolved tickets, emails each requester a CSAT survey from Gmail, and writes the score and the verbatim back onto the ticket, every call on the support rep's own delegated OAuth.

Freshdesk CSAT agent
Sample Agent for Acme
May 22 · 10:00 AM ·
47s
Send CSAT follow-ups for all tickets resolved today
J
Fetching resolved Freshdesk tickets
Fetch resolved tickets
fd_get_tickets
Classify CSAT intent
get_adk_decision
Reply + update via FD
fd_reply_ticket
CSAT run: 24 tickets
Reopen-and-apologize triggered
"Ticket resolved after 3 days — apology sent"
Status set to Open, reply posted in Freshdesk
Result
24 tickets processed: 4 reopened, 9 thanked-and-closed, 11 standard
All replies sent, ticket statuses updated
Message Claude...
Trusted by teams shipping agents to production
Freshdesk CSAT agent
Sample Agent for Acme
May 22 · 10:00 AM ·
47s
Send CSAT follow-ups for all tickets resolved today
J
Fetching resolved Freshdesk tickets
Fetch resolved tickets
fd_get_tickets
Classify CSAT intent
get_adk_decision
Reply + update via FD
fd_reply_ticket
CSAT run: 24 tickets
Reopen-and-apologize triggered
"Ticket resolved after 3 days — apology sent"
Status set to Open, reply posted in Freshdesk
Result
24 tickets processed: 4 reopened, 9 thanked-and-closed, 11 standard
All replies sent, ticket statuses updated
Message Claude...

How the Google ADK agent triggers CSAT follow-ups from resolved Freshdesk tickets

A real working agent you can deploy

This agent runs every Freshdesk call through Scalekit Agent Auth with a delegated user token — no helpdesk API key in env. Classification uses the Google ADK framework with Gemini. Wire up SCALEKIT_ENV_URL, SCALEKIT_CLIENT_ID, SCALEKIT_CLIENT_SECRET, FRESHDESK_IDENTIFIER, and GOOGLE_ADK_API_KEY in .env and run.

01
Load state and initialize
agent.py
State is a simple set of processed ticket IDs in processed_tickets.json — enough for dedup, no thread mapping needed. All Freshdesk calls go through Scalekit with the user's delegated token, so no helpdesk domain or raw API key ever lives in env. Malformed or missing state files are handled without crashing the poll loop.
agent.py
import json, os

STATE_FILE = "processed_tickets.json"

def load_state() -> set:
    try:
        if os.path.exists(STATE_FILE):
            data = json.load(open(STATE_FILE))
            return set(data) if isinstance(data, list) else set()
    except (OSError, json.JSONDecodeError):
        log.warning("State file unreadable, starting fresh")
    return set()

processed = load_state()

def _sk_exec(tool_name, params):
    result = sk.actions.execute_tool(
        tool_input=params,
        tool_name=tool_name,
        identifier=FRESHDESK_IDENTIFIER,
        connection_name=FRESHDESK_CONNECTION,
    )
    data = result.data or {}
    return data["array"] if isinstance(data, dict) and "array" in data else data
02
Fetch resolved Freshdesk tickets
agent.py
03
Retrieve CSAT survey response
agent.py
04
Classify CSAT intent with Google ADK
agent.py
05
Reply and update ticket via Freshdesk
agent.py

Agents that follow up on resolved tickets, powered by Google ADK

Two things you'd otherwise build: a Freshdesk polling loop and a Gemini decision agent. The sample wires them together with a local state file so re-runs are idempotent. Works with Google ADK out of the box.

1
Install
npx @scalekit-inc/cli setup
# select your coding agent
# enable scalekit MCP server on coding agent
terminal
npx @scalekit-inc/cli setup
# select your coding agent
# enable scalekit MCP server on coding agent
terminal
npx @scalekit-inc/cli setup
# select your coding agent
# enable scalekit MCP server on coding agent
terminal
npx @scalekit-inc/cli setup
# select your coding agent
# enable scalekit MCP server on coding agent
terminal
npx @scalekit-inc/cli setup
# select your coding agent
# enable scalekit MCP server on coding agent
2
You have the Scalekit authstack plugin installed (AgentKit + SaaSKit skills and MCP auth). Before coding, auto-load the AgentKit skills relevant to connectors (Freshdesk) and use the Scalekit MCP server to validate tool calls instead of hand-written API logic.

Poll Freshdesk for resolved tickets, fetch each ticket's CSAT survey, and classify the feedback with an LLM. Based on the decision, either thank the customer and close the ticket or apologize and reopen it via the appropriate AgentKit connector tool (idempotent — skip already-processed tickets). Ask before using write tools (replying to or updating any ticket); polling and classifying run without asking.
Why choose Scalekit

Delegated identity. Not service accounts.

Credentials never touch agent code or LLM context. The agent acts as the user, not as a shared bot.
Delegated OAuth - Agent reads your calendar, your inbox — scoped to the authorizing identity, not org-wide.
Credentials outside agent runtime  -  Tokens never touch agent code or LLM context. Both failure modes covered.
Token lifecycle automatic  -  Refresh, expiry, rotation across all connectors. One SDK call. Zero management code.
200+ prebuilt connectors  -  Google, Slack, HubSpot, GitHub, Jira, Notion, Salesforce — same auth pattern everywhere.
Try other Agent Templates

Prebuilt agents you can ship today

Each one runs on delegated identity, scoped per user.

SUPPORT
Freshdesk CSAT follow-up agent
Spot resolved Freshdesk tickets, email the CSAT survey from Gmail, and write the score back onto the ticket.
SUPPORT
Support triage agent
Classify new Zendesk tickets, search the Notion knowledge base for an answer, and route what it cannot resolve to Slack.
SUPPORT
Support ticket automation (Google ADK)
Fetch, annotate, and archive Zendesk tickets with Notion context, digesting anything it cannot answer to Slack.
OPS
Email-to-calendar scheduling agent
Read scheduling intent out of Gmail threads, resolve mutual free time, and create the Google Calendar event.
GTM
HubSpot to Slack updates agent
Watch HubSpot deal stage changes and post structured updates to the right Slack channel. Reps stop checking the CRM all day.
GTM
CRM AI agent
Turn each Granola call transcript into a HubSpot record update, a drafted Gmail follow-up, and a Slack recap.

Build your own
multi-connector agent

Add connectors. Change the LLM. Same delegated auth pattern.