Skip to main content

Freshdesk ExecModule

Overview

FreshdeskModule connects ValkyrAI workflows to Freshdesk API v2 through the native map I/O ExecModule ABI. It manages bounded ticket lifecycles, replies and notes, and discovers conversations, contacts, companies, and groups for downstream agent workflows.

The connector follows the useful ticket and contact patterns in n8n's Freshdesk integration while keeping credentials in IntegrationAccount, enforcing one fixed tenant, bounding every request and response, retrying only read operations, and requiring explicit confirmation before ticket deletion.

Usage

  1. Create a dedicated Freshdesk agent with only the ticket and directory access the workflow needs.
  2. Copy that agent's Freshdesk API key into the encrypted IntegrationAccount.apiKey SecureField.
  3. Store only the tenant subdomain in IntegrationAccount.accountId, for example acme-support.
  4. Set the account to READY and bind it through ExecModuleConfig.authConfig.integrationAccount.
  5. Start with list_groups, list_contacts, or list_companies to discover stable IDs.
  6. Create, update, reply to, annotate, or delete tickets with bounded typed inputs.

Workflow payloads cannot supply credentials, authorization headers, or an arbitrary provider URL.

Inputs

NameTypeRequirementDefaultConstraints
operationstringRequiredNoneOne of the fifteen operations below.
subdomainstringOptionalIntegrationAccount.accountIdOne DNS label, 1–63 characters.
ticketIdstringTicket-specific operationsNonePositive integer.
contactIdstringget_contactNonePositive integer.
companyIdstringget_company; optional ticket assignmentNonePositive integer.
groupIdstringget_group; optional ticket assignmentNonePositive integer.
subjectstringTyped createNoneAt most 255 characters.
emailstringCreate unless requesterId is suppliedNoneRequester email, at most 320 characters.
commentTextstringCreate, reply, or noteNonePlain text, 1–100,000 characters.
publicCommentbooleanOptional for add_notetruefalse creates a private note.
requesterIdstringOptionalNoneExisting requester contact ID.
assigneeIdstringOptionalNoneFreshdesk responder agent ID.
prioritystringOptionalNonelow, medium, high, or urgent; mapped to API codes 1–4.
ticketStatusstringOptionalNoneopen, pending, resolved, or closed; mapped to API codes 2–5.
ticketTypestringOptionalNonequestion, incident, problem, feature request, or refund.
tagsstring array or JSONOptionalNoneAt most 100 non-empty values of at most 255 characters.
customFieldsobject or JSONOptionalNoneAt most 100 entries and 256 KiB.
ticketobject or JSONOptionalNoneAllowlisted provider fields only; at most 256 KiB.
querystringsearch_ticketsNoneOne-line Freshdesk search expression, 1–1,024 characters.
afterCursorstringOptional1Positive page number from a prior output, at most 300.
limitintegerOptional501–10,000 emitted items.
returnAllbooleanOptionalfalseContinues until exhaustion, page 300, or 10,000 items.
confirmDeletebooleandelete_ticketfalseMust be exactly true before a DELETE is sent.

The ticket object accepts only subject, description, html_description, email, requester_id, responder_id, group_id, company_id, product_id, email_config_id, priority, status, source, type, tags, custom_fields, cc_emails, due_by, and fr_due_by. Typed inputs override corresponding fields. create_ticket requires a description plus either an email or requester ID; update_ticket rejects empty mutations.

Outputs

NameTypeWhen presentDescription
statusstringAlwayssuccess or error.
operationstringAlwaysNormalized operation name.
attemptsintegerAlwaysProvider attempts consumed across all pages.
httpStatusintegerProvider respondedLast HTTP status.
dataobjectSingle-resource or mutation successProvider resource normalized into the native output shape.
id / urlscalar / stringProvider supplies themConvenience resource fields.
resourceStatusintegerTicket response supplies statusFreshdesk ticket state without overwriting execution status.
items / countarray / integerList or search successBounded resources and emitted count.
hasMorebooleanList or search successWhether the next bounded page may exist.
nextCursorstringAnother page may existNext Freshdesk page number.
requestIdstringProvider supplies oneTrace reference for support.
errorobjectFailureSafe code, message, optional HTTP status, and retryable flag.

API keys and Basic authorization values are redacted from provider failures, outputs, logs, and workflow events.

IntegrationAccount Requirements

SettingRequirement
ProviderFreshdesk agent API access
accountNameHuman-readable automation identity
accountIdFreshdesk tenant subdomain, such as acme-support
apiKeyEncrypted SecureField containing the Freshdesk API key
statusREADY or an unset legacy status; CLOSED and ERROR fail closed

Freshdesk API v2 uses HTTP Basic authentication with the API key as the username and X as the password. The module constructs that header internally; the workflow never receives either value. API-key rotation remains an IntegrationAccount lifecycle responsibility.

Configuration

{
"version": "1.0.0",
"authConfig": {
"authStrategy": 1,
"integrationAccount": "integration-account:freshdesk-support-ops"
},
"retryPolicy": {
"maxAttempts": 3,
"backoffStrategy": "EXPONENTIAL",
"initialDelayMs": 1000,
"maxDelayMs": 60000
},
"executionConfig": {"timeoutMs": 30000},
"payloadConfig": {
"parameters": "{\"operation\":\"search_tickets\",\"query\":\"status:2 AND priority:4\",\"limit\":50}"
}
}

The account reference is symbolic. Persisted workflows bind the generated relationship, never a plaintext API key.

Operations

OperationFreshdesk behaviorSide effect
list_ticketsLists visible tickets with bounded page pagination.Read-only; safe retries.
get_ticketReads one ticket by ID.Read-only; safe retries.
search_ticketsRuns a bounded Freshdesk ticket search.Read-only; safe retries.
create_ticketCreates one ticket from allowlisted fields.New ticket and possible notifications; one attempt.
update_ticketUpdates one ticket with supplied allowlisted fields.Mutation and possible notifications; one attempt.
delete_ticketSoft-deletes one ticket after explicit confirmation.Destructive but restorable under provider policy; one attempt.
reply_ticketAdds one public ticket reply.Conversation and possible notifications; one attempt.
add_noteAdds one public or private note.Conversation/audit mutation; one attempt.
list_conversationsLists replies and notes for one ticket.Read-only; safe retries.
list_contacts / get_contactDiscovers requester contacts.Read-only; safe retries.
list_companies / get_companyDiscovers customer companies.Read-only; safe retries.
list_groups / get_groupDiscovers support groups.Read-only; safe retries.

Errors and Failure Modes

CodeTypical causeRetryableResolution
VALIDATION_ERRORMissing ID, description/requester, confirmation, invalid tenant/page/JSON, unsupported field/value, or empty update.NoCorrect the named input; no unsafe request was sent.
UNSUPPORTED_OPERATIONUnknown operation.NoSelect a documented operation.
INTEGRATION_ACCOUNT_REQUIREDNo bound account.NoBind a Freshdesk IntegrationAccount.
INTEGRATION_ACCOUNT_NOT_READYAccount is closed or in error.NoRepair or reconnect the account.
FRESHDESK_HTTP_400Invalid field, value, search syntax, or provider constraint.NoCorrect the bounded provider error.
FRESHDESK_HTTP_401API key is missing, revoked, or invalid.NoRotate or reconnect the IntegrationAccount.
FRESHDESK_HTTP_403Agent lacks resource or operation authority.NoGrant the minimum required role permission.
FRESHDESK_HTTP_404ID is wrong, deleted, or invisible.NoRe-run discovery under the same account.
FRESHDESK_HTTP_429Account or endpoint rate limit is exhausted.Yes for readsHonor Retry-After and reduce concurrency.
FRESHDESK_HTTP_5xxTransient provider failure.Yes for readsRetry reads; reconcile writes before manual replay.
NETWORK_ERRORTimeout, DNS, TLS, or connectivity failure.Yes for readsVerify connectivity; inspect Freshdesk before repeating writes.
RESPONSE_TOO_LARGEResponse exceeded 5 MiB.NoLower the limit or narrow the search.
INVALID_PROVIDER_RESPONSEA list/search response did not contain an array.NoUse requestId and verify API compatibility.

Example

Create an urgent escalation after a governed workflow validates the customer impact:

{
"operation": "create_ticket",
"subject": "Production onboarding is blocked",
"commentText": "Customer cannot complete activation after the verified redirect step.",
"email": "ops@example.com",
"priority": "urgent",
"groupId": "9001",
"tags": ["activation", "customer-blocked"],
"customFields": {"cf_incident_reference": "INC-2026-0811"}
}

Expected result:

{
"status": "success",
"operation": "create_ticket",
"attempts": 1,
"httpStatus": 201,
"id": 12345,
"resourceStatus": 2,
"data": {"id": 12345, "status": 2, "priority": 4}
}

Notes

  • Pagination: ordinary list endpoints use page and per_page with at most 100 items. Search uses Freshdesk's 30-result page contract. The module stops at provider exhaustion, page 300, the requested limit, or 10,000 emitted items.
  • Rate limits: read operations may retry HTTP 408, 429, 500, 502, 503, and 504 and network failures, honoring numeric or RFC-1123 Retry-After. Mutations never retry automatically.
  • API limits: structured inputs are capped at 256 KiB and responses at 5 MiB. Ticket descriptions are capped at 100,000 characters and list/search output at 10,000 items.
  • Idempotency: reads are repeatable for a fixed provider state. Create, update, reply, note, and delete operations are single-attempt because a timeout can follow a committed mutation. Reconcile the ticket or conversation before replaying a write.
  • Destructive behavior: delete_ticket requires confirmDelete=true and uses Freshdesk's ticket DELETE endpoint. Permanent contact deletion, bulk deletion, and attachment deletion are not exposed.
  • API behavior: ticket creation can trigger dispatch rules, email notifications, automations, SLA timers, and webhooks configured in Freshdesk. Those effects are provider-owned and can continue after the request returns.
  • External verification: deterministic local tests cover Basic auth, tenant routing, request bodies, page controls, retries, mutation non-retry, delete confirmation, redaction, validation, and metadata discovery. Live roles, plan limits, automations, email delivery, and tenant-specific custom fields require separately authorized Freshdesk credentials and are not exercised in repository tests.
  • Deferred operations: attachments, ticket merge/restore/archive, bulk jobs, contact/company mutations, agents, roles, solutions, satisfaction ratings, time entries, products, SLA policies, automations, custom objects, and webhooks are deferred.
  • Functional references: n8n Freshdesk source and Freshdesk API v2.