Calendly Event Listener (Skeleton) with Error Handling
Calendly Event Listener (Skeleton) with Error Handling
This workflow provides a starting point for automating tasks based on Calendly scheduling events. It listens for new invitees or cancelled bookings and includes a built-in error handler to catch and log failures gracefully. Useful for sending follow‑up emails, updating CRM records, or triggering notifications when someone books or cancels a meeting.
Because the workflow contains only the trigger and error handler, it is designed to be extended by adding your own processing nodes. The Calendly Trigger fires on invitee.created and invitee.canceled events, passing the full event payload to the next node. The Error Handler catches any errors from downstream nodes and stops execution with a custom error message, preventing partial runs.
Nodes in the Workflow
-
Calendly Trigger (n8n-nodes-base.calendlyTrigger) — API Key auth (requires a Calendly Personal Access Token)
- Events:
invitee.created,invitee.canceled— fires whenever a new invitee schedules or cancels a booking. - This is a webhook-based trigger; n8n automatically registers the webhook URL with Calendly using the provided API token.
- Events:
-
Error Handler (n8n-nodes-base.stopAndError) — No auth
- Message:
"Workflow execution error"— this message is shown in execution logs when an error occurs. - This node is connected as an error workflow; it stops execution and prevents the workflow from continuing after an error.
- Message:
Setup Instructions
- Calendly Account & API Token: You need a Calendly account (free or paid). Generate a Personal Access Token from your Calendly Settings → Integrations → API & Webhooks. Copy the token.
- n8n Credential: In n8n, create a new credential of type „Calendly API“ and paste your token. This credential will be used by the Calendly Trigger node.
- Optional: Add nodes after the trigger to process the event data (e.g., a Slack node, a Google Sheets node, or an HTTP Request to your CRM). Connect them to the trigger’s output. If you add nodes, connect the Error Handler via the error output of the last node (or use the workflow’s error handling settings).
Use Cases & Variations
- New booking notifications: After the trigger, add a Slack node to post a message to a channel when someone books a call.
- CRM integration: Use an HTTP Request node to create/update a contact in HubSpot, Salesforce, or your own API.
- Email follow‑up: Add a Gmail or SendGrid node to send a thank‑you email to the invitee.
- Cancellation handling: Because the trigger also listens for
invitee.canceled, you can add conditional logic (e.g., via an IF node) to handle cancellations differently — like removing the event from a calendar or updating a status field.
To adapt the workflow, simply duplicate the trigger or add new nodes with appropriate credentials. The error handler ensures that any failures in downstream nodes are caught and reported, making this skeleton robust enough for production use after extension.
Workflow JSON
{
"nodes": [
{
"name": "Calendly Trigger",
"type": "n8n-nodes-base.calendlyTrigger",
"position": [
880,
400
],
"webhookId": "9d13bcea-781a-4462-a9af-44bfb1fb6891",
"parameters": {
"events": [
"invitee.created",
"invitee.canceled"
]
},
"credentials": {
"calendlyApi": "calendly_creds"
},
"typeVersion": 1,
"id": "c65e9ee6-2d77-489c-8ffb-2205031a5ad5",
"notes": "This calendlyTrigger node performs automated tasks as part of the workflow."
},
{
"id": "error-0d3d19b4",
"name": "Error Handler",
"type": "n8n-nodes-base.stopAndError",
"typeVersion": 1,
"position": [
1000,
400
],
"parameters": {
"message": "Workflow execution error",
"options": {}
}
}
],
"connections": {},
"name": "Calendlytrigger Workflow",
"description": "Automated workflow: Calendlytrigger Workflow. This workflow processes data and performs automated tasks.",
"settings": {
"executionOrder": "v1",
"saveManualExecutions": true,
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": null,
"timezone": "UTC",
"executionTimeout": 3600,
"maxExecutions": 1000,
"retryOnFail": true,
// ... truncated (copy to see full JSON)How to Import This Workflow
- 1Copy the workflow JSON above using the Copy Workflow JSON button.
- 2Open your n8n instance and go to Workflows.
- 3Click Import from JSON and paste the copied workflow.
Don't have an n8n instance? Start your free trial at n8nautomation.cloud
Related Templates
Sync Calendly Invitees to Mautic Contacts
Overview This workflow automatically creates or updates a contact in Mautic whenever a new invitee schedules an event through Calendly. It eliminates manual data entry, ensures your CRM stays current, and helps you follow up with leads immediately after they book a call. How It Works The workflow runs in two main steps: first, it listens for a new Calendly event; second, it uses the invitee's email and name to either create a new contact in Mautic or update an existing one if the email already exists. Nodes and Their Roles On new event () – OAuth2 – Listens for the event from Calendly. When someone schedules an event, this node fires with the invitee's email, name, and other details. - Parameters: set to Create/update contact () – Basic Auth – Receives the trigger data and sends a request to Mautic to create or update a contact. It maps the invitee's email (from the trigger's ) and first name (from ). If a contact with that email already exists in Mautic, its first name is overwritten. - Parameters: = , = Error Handler () – No auth – Catches any execution errors and stops the workflow with a user-defined message, preventing silent failures. Setup Instructions Calendly account: You need a Calendly account with OAuth access. In n8n, create a Calendly OAuth2 credential (Client ID and Client Secret from your Calendly developer app). Mautic instance: You need a running Mautic instance with API access. In n8n, create a Mautic credential with the instance URL, your Mautic username, and password (Basic Auth). Workflow activation: Set the Calendly trigger to “Webhook” mode and use the provided webhook URL in your Calendly webhook settings. Activate the workflow. Use Cases & Variations Sales follow‑up: Automatically add new leads from demo bookings into Mautic for immediate email sequences. Marketing automation: Combine with Mautic segments and campaigns to send tailored content based on event type. Other CRMs: Replace the Mautic node with Salesforce, HubSpot, or any other CRM node supported by n8n. Enrichment: Add an HTTP Request node to look up company details before creating the contact.
Import Leads from Google Drive to Pipedrive with Duplicate Detection
This workflow automatically imports new leads from a spreadsheet file (CSV or Excel) placed in a specific Google Drive folder into Pipedrive. It checks for existing contacts by email to avoid duplicates, then creates an organization, person, lead, and note for each new entry. Ideal for sales teams that receive lead lists via shared files and want to streamline CRM updates. Workflow Steps Google Drive Trigger (OAuth2) — Polls a specific Google Drive folder every minute for newly created files. Configured to watch the folder with ID . Google Drive (OAuth2) — Downloads the file identified by the trigger using its . Spreadsheet File (No auth) — Parses the downloaded file (CSV/Excel) into JSON rows. No additional parameters set. Pipedrive (OAuth2 or API Key) — Fetches all existing leads from Pipedrive ( operation). Runs once per workflow execution. IF (No auth) — For each lead, checks if is greater than 0 (i.e., the lead is linked to a person). If true, proceeds to fetch the person details. Pipedrive1 (OAuth2 or API Key) — Retrieves the person record using the from the lead. Merge (No auth) — Combines the spreadsheet rows (Input 0) with the fetched person data (Input 1). Uses mode: it removes rows from the spreadsheet where the matches the from Pipedrive persons, effectively filtering out duplicates. Set (No auth) — Extracts and renames fields: (from ), (concatenation of and ), (from ), (from ). Only these fields are kept. Create Organization (OAuth2 or API Key) — Creates a new Pipedrive organization with the name set to the value. Create Person (OAuth2 or API Key) — Creates a person with the and from the Set node, linked to the newly created organization (). Also sets a custom property (likely "Lead Source") to . Create Lead (OAuth2 or API Key) — Creates a lead with title , associated with the organization and person. Owner ID is hardcoded to . Create Note (OAuth2 or API Key) — Adds a note to the lead containing the company size. Setup Instructions Google Drive: You need a Google account with access to the folder where lead files will be uploaded. In n8n, create a Google Drive OAuth2 credential (or use a service account). Pipedrive: You need a Pipedrive account. Create an API token or OAuth2 credential in n8n. The workflow uses a hardcoded owner ID () — replace it with your own user ID from Pipedrive. Spreadsheet Format: The file must have columns named , , , , . Adjust the Set node if your column names differ. Folder ID: The trigger watches a specific folder. Replace the folder ID with your own Google Drive folder ID. Use Cases & Variations Lead Import from CSV/Excel: Perfect for marketing teams that receive lead lists from events, webinars, or purchased lists. Deduplication: The merge step prevents creating duplicate contacts by email. You could extend it to check other fields (e.g., phone number). Custom Fields: The Create Person node sets a custom property. Modify the property ID and value to match your Pipedrive setup. Alternative Triggers: Replace the Google Drive Trigger with an email trigger (e.g., Gmail) to process leads sent as attachments. Error Handling: Add error workflows or notifications (e.g., Slack) if a file fails to parse or a Pipedrive API call fails.
Automated Birthday & Anniversary Wishes from Airtable via Gmail
Overview This workflow automatically sends personalized birthday and anniversary wishes to your contacts (clients, employees, or members) every day at 8 AM. It checks an Airtable base for any records where today matches the person's date of birth or anniversary, then sends a warm email via Gmail. Perfect for maintaining relationships without manual effort. How It Works Schedule Trigger — Runs the workflow daily at 8 AM (no auth) Search Client — Queries Airtable for records where the or field matches today's month and day (API Key auth) Check Available Dates — An IF node that verifies the record actually has a date in either field (no auth) No Operation, do nothing — A placeholder for records that don't have a date (false branch) Generate Subject & Body — A Code node that creates a custom subject line and message depending on whether it's a birthday or anniversary (no auth) Send Emails — Sends the email to the person's address using Gmail (OAuth2) Node Details Schedule Trigger (No auth) — Configured to trigger at 8:00 AM every day. You can adjust the hour in the node settings. Search Client (API Key auth) — Uses an Airtable credential. The filter formula finds all records where either date matches today. Check Available Dates (No auth) — Two conditions combined with AND: is not empty AND is not empty. This ensures the record has at least one date to work with. Records that pass go to the true branch; others go to the false branch (No Operation). Generate Subject & Body (No auth) — JavaScript code that extracts the person's name, email, and dates. It compares today's month-day to the date fields and sets a subject like "🎂 Happy Birthday!" or "💍 Happy Anniversary!" along with a friendly message. The output includes the original data plus , , and . Send Emails (OAuth2) — Uses a Gmail credential. Sends a plain text email to the recipient's email address with the generated subject and message. The option is disabled to keep the email clean. Setup Instructions Airtable — Create a base with a table containing at least these fields: (text), (email), (date), (date). Populate with your contacts. Airtable Credential — In n8n, create an Airtable credential using your API key (get it from your Airtable account settings). Gmail Credential — Create a Gmail OAuth2 credential in n8n. You'll need a Google Cloud project with the Gmail API enabled and the necessary redirect URIs configured. Update Node Parameters — Open the Search Client node and select your Airtable base and table. The filter formula is already set; you may need to adjust field names if they differ. Activate Workflow — Once everything is connected, toggle the workflow to active. It will run daily at 8 AM. Use Cases & Variations Employee Recognition — Replace the email with a Slack message to a company channel for public recognition. Client Appreciation — Add a discount code or special offer in the email body. Multi‑channel — Combine with SMS (e.g., Twilio) for a more personal touch. Different Triggers — Change the schedule to run weekly or on specific days. Custom Templates — Modify the Code node to pull from a Google Doc or use HTML email formatting. This workflow is easily adaptable to any scenario where you want to automatically celebrate important dates with your network.