n8n actions and lookups
The Harmony AI node changes contacts, sends them to agents, reads contacts, calls, and transcripts, and can make any other Harmony API call. It uses the Harmony AI API credential. Each operation runs once per input item, except Add Many to Agent, which sends all of them together.
Change contacts
- Add to Agent: creates or updates the contact and sends it to Voice Agent Name or ID. Harmony calls the contact on that agent's schedule, the same as a contact added any other way. A contact the agent already handled is skipped, so running the same item again doesn't call it twice. The list shows agents that are not archived; the agent must be published and not paused. To set the agent with an expression, use its agent ID, the same ID the Harmony AI Trigger outputs as
agentId. - Add Many to Agent: the same as Add to Agent, for every input item at once. It sends the items to each agent in requests of up to 1,000 contacts, so a large list runs much faster than one item at a time. Each output item has
accepted, andreasonwhen Harmony rejected that contact, such asinvalid-phone. A rejected contact doesn't stop the flow, because the other contacts in its request were already sent. - Create or Update: updates the contact that matches Source Kind and External ID, or creates one when none matches.
- Update by External ID: updates the contact that matches Source Kind and External ID. Only the fields you add change.
Fields:
- Source Kind: the system the contact comes from, n8n by default, so Contacts can filter the contacts your flows add. With External ID, it identifies the contact.
- External ID: the contact's ID in that system. For Add to Agent and Create or Update, leave it empty to give a new contact its Harmony ID as its external ID.
- Contact Fields or Update Fields: First Name, Last Name, Full Name, Phone with the country code, Location, Time Zone, Language, and Priority. When Time Zone is empty, Harmony fills it as described in Contact fields and time zones.
- Custom Fields: keys and values your agent reads. A key sent with an empty value is removed from the contact.
Add to Agent fails the item with Harmony's reason when Harmony rejects the contact, such as invalid-phone. There is no option to call immediately; the agent's Dialer settings decide when the call happens.
Look up contacts and calls
- Contact > Get: one contact by its Harmony Contact ID.
- Contact > Get by External ID: one contact by Source Kind and External ID.
- Contact > Get Calls: the calls to a contact found by Source Kind and External ID. Turn on Return All, or set Limit.
- Call > Get: one call by Call ID, such as
callIdfrom the Harmony AI Trigger. Turn on Include Transcript to add the call'stranscript, a list of utterances, each withspeaker,content, andtimestamp.
Make any Harmony API call
Custom API Call > Make an API Call sends a request the other operations don't cover, with the credential's API key and region:
- Method:
GET,POST,PUT,PATCH, orDELETE. - Path: a Harmony API path that starts with
/api/v1/, such as/api/v1/contacts. The node refuses any other path, so the key is only sent to Harmony. The API reference lists every path and its fields. - Query Parameters: name and value pairs. Repeat a name to send a list.
- Body: the JSON body, for
POST,PUT, andPATCH.
The response becomes the output item. A response that is a list outputs one item per element.
Use with an n8n AI Agent
Connect Harmony AI to an AI Agent node's Tool input, choose its operation, and let the model fill fields such as External ID with $fromAI(). For example, an agent can read a lead's last calls before it drafts a follow-up email.
Attach Add to Agent or Add Many to Agent as a tool only when the model should decide whom Harmony calls. Pick the agent in the node rather than letting the model fill it, and don't give the same agent untrusted text, such as inbound emails, that could carry someone else's phone number.
Don't attach Custom API Call as a tool unless the model should be able to run any request the API key allows.
Good to know
- With Settings > On Error set to Continue, a failed item outputs
errorwith Harmony's message instead of stopping the flow. - A Viewer's API key can run the Get operations only. Add to Agent, Add Many to Agent, Create or Update, and Update by External ID fail with
403, and so does a Custom API Call that changes data.