Overview
This node updates an existing appointment and its related opportunity in a calendar and CRM system via API calls. It is useful for workflows that need to modify scheduled events, such as changing appointment times, statuses, or associated sales opportunities automatically based on external triggers or data changes.
Typical use cases include:
- Rescheduling appointments with updated start/end times and timezones.
- Changing the status of an appointment (e.g., confirmed, cancelled).
- Updating the title of an appointment or the name/stage of a related sales opportunity.
- Linking appointments to specific calendars, pipelines, and stages dynamically.
For example, you could automate updating a meeting's details after a customer reschedules or cancel an appointment and update the opportunity status accordingly.
Properties
| Name | Meaning |
|---|---|
| API Token (Pit-Token) | Bearer authentication token required to authorize API requests. |
| Event ID | Unique identifier of the appointment to update. |
| Location ID | Identifier of the account/location where the appointment and opportunity belong. |
| Calendarios. Name or ID | Calendar where the appointment will be created/updated. Select from list or specify ID via expression. |
| Fecha Y Hora De Inicio de la cita | Start date and time of the appointment. |
| Fecha Y Hora De Fin de la cita (opcional) | Optional end date and time of the appointment. |
| Zona horaria | Timezone for the appointment's start and end times. |
| Titulo de cita (opcional) | Optional title of the appointment. |
| Nombre de oportunidad (opcional) | Optional name of the related opportunity; if not provided, the appointment title is used. |
| Pipeline. Name or ID | Pipeline where the opportunity belongs. Select from list or specify ID via expression. |
| Stage Name or ID (optional) | Optional stage within the selected pipeline for the opportunity. Select from list or specify ID via expression. |
| Contact ID | ID of the contact for whom the appointment is scheduled. (Required) |
| New Status | New status of the appointment. Possible values: "confirmed", "new", "cancelled", "showed", "noshow", "invalid". |
Output
The node outputs a single JSON object containing two main fields:
updatedAppointment: The response from the API after updating the appointment, including all updated appointment details.updatedOpportunity: The response from the API after upserting (creating or updating) the related opportunity, reflecting the current state of the opportunity linked to the appointment.
No binary data output is produced by this node.
Dependencies
- Requires an API token (Bearer token) for authentication with the external service.
- Makes HTTP requests to the following endpoints:
- To update appointments:
PUT https://services.leadconnectorhq.com/calendars/events/appointments/{eventId} - To upsert opportunities:
POST https://services.leadconnectorhq.com/opportunities/upsert
- To update appointments:
- Uses timezone data from the
moment-timezonelibrary internally to validate and convert date/time inputs. - Requires proper configuration of input parameters, especially the API token, event ID, location ID, pipeline ID, and contact ID.
Troubleshooting
- Missing Required Parameters: The node throws errors if any of the mandatory parameters (
pitToken,eventId,locationId,pipelineId, orcontactId) are missing. Ensure these are correctly set either as node parameters or passed in the input JSON. - Timezone Errors: If
startTimeorendTimeis specified without a valid timezone, the node will error out. Always provide a valid timezone when specifying appointment times. - Invalid Date Ranges: The node checks that
endTimeis not earlier thanstartTime. If this occurs, it throws an error. - API Request Failures: Errors from the external API are caught and rethrown with messages indicating whether the failure occurred during appointment update or opportunity upsert. Check the API token validity, network connectivity, and parameter correctness.
- Empty or Invalid Option Lists: If dependent options like calendars, pipelines, or stages fail to load due to missing tokens or location IDs, the dropdowns will be empty. Verify credentials and location IDs.
Links and References
- n8n Expressions Documentation
- Moment Timezone Names
- External API documentation should be consulted for detailed information about the appointment and opportunity endpoints (not included here).