Example use case
You've connected Salesforce to your Calendly account. You want to sync event data for your Sales team — but not for users outside of Sales. You can do this by modifying your Salesforce flow to run only for certain event types or users.
Editing the flow vs. the process
Your setup depends on which package version you’re using.
- If you're on Version 2, you’ll edit the flow directly.
- If you're on Version 1.11, you'll use the Process Builder.
To check your version, visit the Salesforce Integration page in Calendly.
Adjust the flow to run for certain events or users
- In Salesforce Setup, search for Flows. Select Flows.
- If you haven't customized the CreateEventTemplate before, you'll need to create a new flow based on the template. To do so, you can open the CreateEventTemplate, customize it directly, then Save as. Saving it will create a new flow. You can call the new flow something like "CreateEvent."
- If you've already customized the CreateEventTemplate flow, then open your customized flow.
- In the beginning part of the flow, locate Object: CalendlyAction, and select Edit.
- Under Condition Requirements, select the conditional logic you'd like the flow to follow (All Conditions are Met (ALL), Any Condition is Met (OR), or Custom Condition Logic is Met).
- Under Field, select Calendly__EventTypeName__c or Calendly__EventPrimaryPublisherEmail__c, depending on if you want to filter the flow by Calendly event type or by user.
- Under Field value, enter the event type name exactly as it appears in Calendly, or the Calendly user's email, depending on what field you selected in the previous step.
- Select Done.
- To save your customized flow, select Save.
- To activate your customized flow, select Activate. Note: you will also need to deactivate the CreateEventTemplate, so you don’t have duplicate events in Salesforce.
Adjust the Process to run for certain events
You can modify the OnCalendlyActionCreated Process in the Process Builder to trigger your flow based on certain criteria, such as Event Type Name or Event Primary Publisher Name (Calendly user).
With the steps below, you can set the flow to only run if a Calendly event type has a specific name. To do so, you will need to filter by Event Type Name.
- In Salesforce, search for Process. Select Process Builder from the dropdown.
- Select the OnCalendlyActionCreated process.
- See the page refresh, then select Invitee.Created. Note: You may have to clone the process if it's already active and modify the duplicate process.
- At Define Criteria for this Action Group, and under Set Conditions, select +Add Row, then select the empty Field box to input a field.
- At Select a Field and next to CalendlyAction__c, enter Event Type Name, then select Choose.
- For Value of the newly added row, enter the event type name for which you want to trigger the flow, then select Save.
- To activate the new process, select Activate, then Confirm. This will deactivate any other versions of the process.
Adjust the Process to run for certain users
You can trigger the flow to only run for certain users if you modify the Process to add [CalendlyAction__c].EventPrimaryPublisherEmail__c (the primary publisher in Calendly’s email) choose Equals, and add the Calendly user's email addresses.
Conversely, you can choose Does not equal, which will exclude a person from running the Process when they are booked.