Calendly Connector

Forbind Calendly med Brevo gennem Tajo for automatisk at synkronisere mødeinvitéer som kontakter, udløse e-mailsekvenser baseret på bookinghændelser og strømline dine salgs- og onboarding-workflows.

Oversigt

EgenskabVærdi
PlatformCalendly
KategoriPlanlægning (brugerdefineret)
OpsætningskompleksitetLet
Officiel integrationNej
Synkroniserede dataHændelser, kontakter, bookinger, annulleringer
AutentifikationsmetodeOAuth 2.0 / Personal Access Token

Funktioner

  • Synkronisering af invitéer - Opret automatisk Brevo-kontakter fra mødeinvitéer
  • Bookingtriggere - Udløs Brevo-automatiseringer, når møder bookes
  • Håndtering af annulleringer - Udløs re-engagement-flows ved annulleringer
  • Detektering af no-shows - Opdatér kontaktstatus, når invitéer udebliver fra møder
  • Mapping af hændelsestyper - Kortlæg forskellige Calendly-hændelsestyper til Brevo-lister
  • Scheduling API - Indbyg planlægning direkte i din app uden omdirigeringer

Forudsætninger

Før du begynder, skal du sikre dig, at du har:

  1. En Calendly-konto (Professional-plan eller derover for API-adgang)
  2. Et Personal Access Token fra Calendly Integrations
  3. En Brevo-konto med API-adgang
  4. En Tajo-konto med connector-tilladelser

Autentifikation

Personal Access Token

Terminal window
# Generate at https://calendly.com/integrations/api_webhooks
export CALENDLY_ACCESS_TOKEN=your_personal_access_token
export TAJO_API_KEY=your_tajo_api_key
export BREVO_API_KEY=your_brevo_api_key

OAuth 2.0

// OAuth 2.0 Authorization Code Flow
const authUrl = 'https://auth.calendly.com/oauth/authorize?' +
new URLSearchParams({
client_id: process.env.CALENDLY_CLIENT_ID,
redirect_uri: 'https://your-app.com/callback',
response_type: 'code'
});
// Exchange code for token
const tokenResponse = await fetch('https://auth.calendly.com/oauth/token', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'authorization_code',
code: authorizationCode,
client_id: process.env.CALENDLY_CLIENT_ID,
client_secret: process.env.CALENDLY_CLIENT_SECRET,
redirect_uri: 'https://your-app.com/callback'
})
});

Konfiguration

Grundlæggende opsætning

connectors:
calendly:
enabled: true
access_token: "${CALENDLY_ACCESS_TOKEN}"
sync:
contacts: true
events: true
cancellations: true
event_mapping:
discovery_call:
list_id: 10
event_type_uri: "https://api.calendly.com/event_types/abc123"
demo:
list_id: 11
event_type_uri: "https://api.calendly.com/event_types/xyz789"
webhook:
signing_key: "${CALENDLY_WEBHOOK_SIGNING_KEY}"

Feltmapping

field_mapping:
email: email
name: FIRSTNAME
questions_and_answers:
company: COMPANY
role: JOB_TITLE
phone: SMS
event_type_name: CALENDLY_EVENT_TYPE
scheduled_at: MEETING_DATE
status: BOOKING_STATUS

API-endpoints

EndpointMetodeBeskrivelse
https://api.calendly.com/users/meGETHent aktuel bruger
https://api.calendly.com/event_typesGETVis hændelsestyper
https://api.calendly.com/scheduled_eventsGETVis planlagte hændelser
https://api.calendly.com/scheduled_events/{uuid}GETHent en planlagt hændelse
https://api.calendly.com/scheduled_events/{uuid}/inviteesGETVis invitéer
https://api.calendly.com/scheduling_linksPOSTOpret planlægningslink
https://api.calendly.com/webhook_subscriptionsPOSTOpret webhook
https://api.calendly.com/webhook_subscriptionsGETVis webhooks
https://api.calendly.com/invitee_no_shows/{uuid}GETHent no-show-status

Kodeeksempler

Initialisér connector

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
await tajo.connectors.connect('calendly', {
accessToken: process.env.CALENDLY_ACCESS_TOKEN
});

Vis planlagte hændelser

// Retrieve scheduled events
const response = await fetch(
'https://api.calendly.com/scheduled_events?' +
new URLSearchParams({
user: 'https://api.calendly.com/users/YOUR_USER_ID',
min_start_time: '2024-01-01T00:00:00Z',
max_start_time: '2024-12-31T23:59:59Z',
status: 'active',
count: 100
}),
{
headers: {
'Authorization': `Bearer ${process.env.CALENDLY_ACCESS_TOKEN}`,
'Content-Type': 'application/json'
}
}
);
const events = await response.json();

Synkronisér invitéer til Brevo

// Get invitees for a scheduled event and sync to Brevo
const inviteesResponse = await fetch(
`https://api.calendly.com/scheduled_events/${eventUuid}/invitees`,
{
headers: {
'Authorization': `Bearer ${process.env.CALENDLY_ACCESS_TOKEN}`
}
}
);
const { collection } = await inviteesResponse.json();
for (const invitee of collection) {
await tajo.contacts.sync({
email: invitee.email,
attributes: {
FIRSTNAME: invitee.name,
CALENDLY_EVENT_TYPE: invitee.event,
MEETING_DATE: invitee.created_at,
BOOKING_STATUS: invitee.status
},
listIds: [10]
});
}

Opsæt webhook-abonnementer

// Subscribe to Calendly events
const webhook = await fetch(
'https://api.calendly.com/webhook_subscriptions',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CALENDLY_ACCESS_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://api.tajo.io/webhooks/calendly',
events: [
'invitee.created',
'invitee.canceled',
'invitee_no_show.created'
],
organization: 'https://api.calendly.com/organizations/YOUR_ORG_ID',
scope: 'organization',
signing_key: process.env.CALENDLY_WEBHOOK_SIGNING_KEY
})
}
);

Håndtér webhook-hændelser

app.post('/webhooks/calendly', async (req, res) => {
// Verify webhook signature
const signature = req.headers['calendly-webhook-signature'];
const isValid = verifyCalendlySignature(
req.rawBody, signature, process.env.CALENDLY_WEBHOOK_SIGNING_KEY
);
if (!isValid) return res.status(401).send('Unauthorized');
const { event, payload } = req.body;
switch (event) {
case 'invitee.created':
await tajo.contacts.sync({
email: payload.email,
attributes: { BOOKING_STATUS: 'booked' },
listIds: [10]
});
break;
case 'invitee.canceled':
await tajo.contacts.update(payload.email, {
attributes: { BOOKING_STATUS: 'cancelled' }
});
break;
case 'invitee_no_show.created':
await tajo.contacts.update(payload.email, {
attributes: { BOOKING_STATUS: 'no_show' }
});
break;
}
res.status(200).send('OK');
});

Rate limits

RessourceGrænseNoter
API-anmodninger6.000/min.Organisationsdækkende grænse
Webhook-abonnementer30 pr. organisationPå tværs af alle hændelsestyper
PlanlægningslinksUbegrænsetIngen grænse pr. minut

Paginering

Calendly API-svar bruger cursor-baseret paginering. Brug next_page_token fra pagination-objektet til at hente yderligere resultater. Standardsidestørrelsen er 20 elementer, med maksimalt 100.

Fejlfinding

ProblemÅrsagLøsning
Webhook ikke modtagetForkert scopeBrug organization-scope til webhooks
401 UnauthorizedToken udløbetGenerér nyt token eller opdatér OAuth-token
Manglende invitéedataSpørgsmål ikke konfigureretTilføj brugerdefinerede spørgsmål til hændelsestypen
Duplikerede kontakterIngen dedup-logikBrug e-mail som unik identifikator til upserts
Rate limit 429For mange anmodningerImplementér backoff og batch-anmodninger

Debug-tilstand

connectors:
calendly:
debug: true
log_level: verbose
log_webhooks: true

Bedste praksis

  1. Brug webhooks - Abonnér på invitee.created og invitee.canceled til synkronisering i realtid
  2. Tilføj brugerdefinerede spørgsmål - Indsaml virksomheds-, rolle- og telefondata for rigere kontaktprofiler
  3. Kortlæg hændelsestyper - Tildel forskellige Brevo-lister pr. Calendly-hændelsestype
  4. Håndtér no-shows - Spor no-shows for at justere lead-scoring og opfølgningssekvenser
  5. Brug planlægningslinks - Generér unikke planlægningslinks for personaliserede bookingoplevelser
  6. Angiv organisations-scope - Brug webhooks på org-niveau for at fange hændelser fra alle teammedlemmer

Sikkerhed

  • OAuth 2.0 - Scopes token-baseret autentifikation
  • Webhook-signaturer - HMAC-signaturvalidering til indgående webhooks
  • Kun HTTPS - Alle API-endpoints kræver TLS-kryptering
  • Token-udløb - OAuth-tokens udløber og kræver refresh-flows
  • Minimale scopes - Anmod kun om de nødvendige OAuth-scopes
  • Sikker opbevaring - Gem tokens i miljøvariabler eller secret-managere

Relaterede ressourcer

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

auto-detect
AI-assistent

Hej! Spørg mig om dokumentationen.