Narrator Documentation

Calendly Meetings

This activity creates all the meeting activities from the events of Calendly


Calendly is a webhook integration so we get a new record whenever something changes and that is why we can use the webhook timestamp _created as when the activity happened

Type: Activity Transformation

select 
    e._id as activity_id 
    , _created as ts 
    , JSON_EXTRACT_PATH_TEXT(e.invitee, 'email') as customer 
    
    , NULL as source_id 
    , NULL as source

    , CASE 
        WHEN JSON_EXTRACT_PATH_TEXT(e.invitee, 'is_reschedule') = 'True' 
            THEN 'rescheduled_meeting'
        WHEN JSON_EXTRACT_PATH_TEXT(e.invitee, 'canceled') = 'True' 
            THEN 'cancelled_meeting'
        ELSE 'scheduled_meeting' 

    END as activity 
        
    ,JSON_EXTRACT_PATH_TEXT(e.event_type, 'name') as feature_1 -- event name
    
    , nullif(
        CASE 
            WHEN JSON_EXTRACT_PATH_TEXT(e.invitee, 'canceled') <> 'True' 
                THEN JSON_EXTRACT_PATH_TEXT(e.event_type, 'kind')  
            ELSE JSON_EXTRACT_PATH_TEXT(e.invitee, 'cancel_reason') 
        END
    ,'') as feature_2 -- kind of event or cancelled reason

    , JSON_EXTRACT_PATH_TEXT(e.event, 'start_time')::TIMESTAMPTZ::TIMESTAMP as feature_3 -- canceler_name

    , NULL as revenue_impact 
    , NULL as link 
from calendly.events e 
where invitee is not null -- details about who signed up

Tips:

  • Use the tracking in calendly to improve your identity resolution.

Attended Meeting

This activity checks if the user actually atteneded a sales meeting.

Type: Activity Transformation

select 
    e._id as activity_id 
    , JSON_EXTRACT_PATH_TEXT(e.event, 'start_time')::TIMESTAMPTZ::TIMESTAMP  as ts 
    , JSON_EXTRACT_PATH_TEXT(e.invitee, 'email') as customer 
    
    , NULL as source_id 
    , NULL as source

    , 'attended_meeting' as activity 
        
    ,JSON_EXTRACT_PATH_TEXT(e.event_type, 'name') as feature_1 -- event name
    
    , JSON_EXTRACT_PATH_TEXT(e.event_type, 'kind')  as feature_2 -- kind of event
   
   , DATE_DIFF('minutes', JSON_EXTRACT_PATH_TEXT(e.event, 'start_time')::TIMESTAMPTZ::TIMESTAMP,JSON_EXTRACT_PATH_TEXT(e.event, 'end_time')::TIMESTAMPTZ::TIMESTAMP) as feature_3 
    , NULL as revenue_impact 
    , NULL as link 
    
from calendly.events e 
where invitee is not null -- details about who signed up
    and JSON_EXTRACT_PATH_TEXT(e.event, 'start_time')::TIMESTAMPTZ::TIMESTAMP < SYSDATE
  and JSON_EXTRACT_PATH_TEXT(e.invitee, 'canceled') <> 'True'



šŸ‘

Contribute to the Narrator Community

Help the Narrator community by suggesting edits or contributing SQL transformations. Use the "Suggest Edits" button at the top right or visit our Contributors page for more info on how to get involved.




Have questions?


Our data team is here to help! Here are a couple ways to get in touch...

šŸ’¬ Chat us from within Narrator

šŸ’Œ Email us at [email protected]

šŸ—“ Or schedule a 15 minute meeting with our data team

Updated about a month ago


What's Next

Can't find what you're looking for? Browse the Activity Index for more examples...

Activity Index

Calendly


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.