n8n call triggers
The Harmony AI Trigger node starts an n8n flow when a Harmony call starts, ends, or has a recording. Set up the Harmony AI API credential first.
Inputs
- Event (required):
- Call Started: a call attempt began, before it is answered.
- Call Ended: a call ended and its summary is ready, including unanswered attempts.
- Call Recording Ready: a call's recording is stored, usually a few seconds after it ends. Calls with no recording, such as unanswered calls or calls by agents with recording turned off, start no flow.
- Contact Calls Finished: a call ended and Harmony has no further call scheduled for the contact. It's Call Ended limited to calls where
isLastCallistrue, so it also fires for incoming calls. A contact sent to an agent again later can be called again and fire it again.
- Voice Agent Name or ID: run only for this agent's calls. Leave All Agents to include every agent.
- Download Recording (Call Recording Ready only, on by default): attach the recording audio to the item as binary data named
recording.
Builder test calls and the human part of transferred calls start no flow.
How it subscribes
When you activate the flow, or select Listen for test event, the node creates a Webhook endpoint in Harmony for the chosen event and agent. Contact Calls Finished creates a Call Ended endpoint, and the node drops notifications for calls with more attempts scheduled. The endpoint appears in Settings > Developers > Webhooks with the description n8n: followed by the flow's name. Deactivating the flow deletes the endpoint.
The node checks each notification's signature with the endpoint's secret and rejects any that fail with 401. It ignores test events sent from Settings > Developers > Webhooks, so a test there starts no flow.
If someone deletes the endpoint in Settings, the flow stops receiving calls and n8n shows no error. Deactivate and activate the flow to create a new one.
Outputs
Each notification starts the flow with one item. It has event (call_started, call_ended, or call_recording_ready; Contact Calls Finished items have call_ended), timestamp, webhookId, and the event's call details at the top level. Contact Calls Finished items carry the Call Ended details.
Call Ended details:
callIdandcontactId: the Harmony call and contact IDs. UsecallIdwith Call > Get to read the call and its transcript.agentIdandagentName: the agent that took the call.direction:outboundorinbound.startTime,endTime, anddurationSeconds. Each can benull.attempt: the attempt number of an outgoing call;nullfor incoming calls.callResult: the call's result, such asqualified,no_answer,voicemail, orbusy. The values are listed in call result values.contactStatus: the contact's status now, such asreachedorqualified.endReason: why the call ended, such ashang_uporcall_dropped;nullwhen the call never connected.isLastCall:falsewhen Harmony scheduled another attempt for this contact.summary: the call summary;nullwhen Harmony couldn't summarize it.contactFields: the contact's fields, with custom fields nested undercustomFields.collectedFields: values the agent collected that differ from the contact's values, by field name.
Call Started details carry the call, contact, and agent fields, contactPhoneNumber, and startTime.
Call Recording Ready details carry callId, contactId, agentId, and recordingUrl. With Download Recording on, the item also has the audio. With it off, get a short-lived download link by sending a GET request to recordingUrl with the same API key.
The same notification can arrive more than once. Use webhookId to drop repeats.