Question

How do I format multiple options from Calendly for a custom field in PipeDrive using Zapier?

  • 14 March 2024
  • 4 replies
  • 20 views

I have a Calendly question that asks the prospect which of our products they’ve previously purchased:

User: "CleanShot 2024-03-13 at 20.52.37@2x.png"

I then want to create a Zap that puts this into a custom field in PipeDrive that uses the Multiple Options field type.

User: "CleanShot 2024-03-13 at 20.53.42@2x.png"

How can I do this with Zapier? When Zapier pulls in the list of products, they look like they’re just space delimited. For example, "Books Courses Events." I must have to do something to format this data for PipeDrive to ingest it. I'm just not sure what it needs. I tried making a comma delimited list, but that didn't work.


4 replies

Userlevel 5
Badge +6

Hi @Michael Hyatt - great question! 

To synchronize checkbox options from Calendly with Pipedrive, you'll need to map each option to the corresponding field ID in Pipedrive. Since the Pipedrive field is a "Multiple Options" field, the zap must populate the field with all IDs simultaneously.

Could you possibly share a screenshot of how you get the checkbox data from Calendly in the zap?

On another note, given the complexity of this use case, it might be beneficial to consult with an expert. Our team, proficient in both Pipedrive and Zapier, would be glad to assist.

 

Nate, I would be happy to pay for help. How can I get you guys involved?

By the way, here’s the checkbox data. It’s just a space-delimited list.

 

 

Userlevel 5
Badge +6

To anyone who may find this thread, here is an update on how we solved the issue:

 

We added a code step that mapped the data from Calendly to the corresponding field IDs in Pipedrive.

I'm including the code step below for anyone who might want to use it. Replace the “X” with your variables.

Feel free to message me or my team with any questions.

 

const mappings = {
'X': 'X',
'X': 'X',
'X': 'X',
'X': 'X',
'X': 'X',
'X': 'X',
'X': 'X'
};

// Function to replace words with their corresponding numbers
function replaceWordsWithNumbers(inputText) {
let outputText = inputText;
for (const [key, value] of Object.entries(mappings)) {
// Use global and case-insensitive search to replace all occurrences
const regex = new RegExp(key, 'g');
outputText = outputText.replace(regex, value);
}
return outputText;
}

// Replace the words in the input text
const inputText = inputData.inputText; // Make sure to map your actual input variable here
let outputText = replaceWordsWithNumbers(inputText);

// Split the text by spaces or newline to handle multi-line inputs, then join with commas
outputText = outputText.split(/\s+/).join(',');

// Return the transformed text
output = {outputText: outputText};

 

Reply