GUIDE: Parse Calendly Questions & Answers (Line Items) with Formatter and Code to Use as Custom Variables

  • 29 September 2023
  • 16 replies
  • 459 views

Userlevel 7
Badge +14

GUIDE: Parse Calendly Questions & Answers (Line Items) with Formatter and Code to Use as Custom Variables

 

Contribution by Troy Tessalone

Troy is a Certified Zapier Expert who puts Programmable Productivity to work for YOU!

 

Apps

 

See more below.

 

 About

This is applicable to the Calendly Zap app version released at the end of September 2023.

 

 

Issue

The Calendly Zap app now returns a different data structure than the previous version.

That means it's likely your dependent Zap action steps will need to be updated.

Also, the returned data payload has these field variable changes:

  • Some variables have changed names.
  • Some new variables are available.
  • Some previous variables no longer available.
    • UUIDs (Universally Unique Identifiers) are no longer available as individual variables.

 

Apps

 

Steps

  1. Trigger: Calendly - Invitee Created
  2. Action: Formatter > Utilities > Line Items to Text
  3. Action: Code > Run JavaScript
  4. Action: ???
    1. Your choice!

 

NOTE: The reason this solution isn’t all done using 1 Code step is because of the way Zapier returns arrays of line items and the possible existence of commas in those values.

 

 

Trigger: Invitee Created

Calendly trigger data is scoped for either:

  • User
  • Organization

 

 

Action: Formatter > Utilities > Line Items to Text

CONFIG

 

OUTPUT

EXAMPLE

 

Action: Code > Run JavaScript

NOTE: Code created with the help of ChatGPT.

 

CONFIG

 

CODE

let QA = inputData.QA; // QA = Questions & Answers

// Split the input string into an array of items using '^' as the delimiter
QA = QA.split('^');

// Initialize an object to store questions and their corresponding answers
let SET = {};

// Iterate through the items and add them to the object
for (const item of QA) {
const [question, answer] = item.split('|');
SET[question] = answer;
}

output = [{SET, QA}];

 

OUTPUT

EXAMPLE

 

ACTION: ???

How the new variables show when using the ‘Custom’ option to map variables between Zap steps.


TIPS

To narrow down the available variables from previous Zap steps:

  • Search for “SET”
  • Search for a variable name
  • Search for a variable value

 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

16 replies

Userlevel 1
Badge

Thanks so much for this @Troy Tessalone  - really helpful. 

 

My action is into Monday.com, so I don’t need the question information included in the output, just the answer. How would I modify the code for this? Thanks heaps in advance.

Userlevel 7
Badge +14

@ellieroberts 

This returns each question as a variable with the answer as the value.

Userlevel 1
Badge

Thanks @Troy Tessalone - still having a few issues. 

 

My output isn’t quite matching yours - the items are coming under a QA layer, instead of a SET, so when I go to put it into my action, the answers are still grouped together:

 

 

Any ideas on what I might be doing wrong? Thanks heaps in advance!

 

Userlevel 1
Badge

Thanks @Troy Tessalone - still having a few issues. 

 

My output isn’t quite matching yours - the items are coming under a QA layer, instead of a SET, so when I go to put it into my action, the answers are still grouped together:

 

 

Any ideas on what I might be doing wrong? Thanks heaps in advance!

 

Figured it out! Must have been something wrong with the formatter action earlier in the piece. Thanks!

Userlevel 7
Badge +14

@ellieroberts 

Can you show screenshots with how your Formatter step is configured?

Userlevel 1
Badge

@ellieroberts

Can you show screenshots with how your Formatter step is configured?

See attached:

 

 

 

 

The Zap is now producing this output, which seems to be working well:

 

Userlevel 7
Badge +14

@ellieroberts 

How you have it configured:

 

How it should be configured per the GUIDE:

 

Userlevel 1
Badge

Oh wonderful, thank you for your help on this post and the other post relating to single-use Calendly links. Everything seems to be running well and has solved a really big challenge for our small charity in New Zealand. Thanks so much!

Userlevel 1
Badge

Hi @Troy Tessalone - sorry, me again! 

 

I have two Monday boards that have this Zap set up on, one is bringing the data into Monday great, the other is only bringing through the answer of one Calendly question’s answers. The top item is from the test inside Zapier, the bottom two are when I schedule an event in Calendly itself. Any insight as to what I might be doing wrong? Thanks so much in advance!

 

 

Userlevel 7
Badge +14

@ellieroberts 

Best to start a new topic related to this issue so it gets proper attention.

We would need to see screenshots of the DATA IN/OUT from your Zap Runs: https://zapier.com/app/history/

Hi there

I need to import my calendly data into a database where each field has a different name.

I would really appreciate some assistance with this.

I see the javascript above but that does not help me since i cannot match the output to separate fields as separate values in a zapier update, unless i am missing something.

i got it seperated out in numbers 1 to 9 but as a batch and i dont see output where i can ask for only number 1 etc in the database 

eg Name = Value1

Phone = Value2 etc 

Please help! 

 

 

Userlevel 7
Badge +14

Hi @cliffpza 

Please post your issue as it’s own topic and include screenshots with how your Zap steps are configured.

hey thanks for putting together this suport. I have been able to follow along and get the Questions and answers to match up using the formatter but i can not seperate them.

 

I think my issue is with the Javacode, it does not seem to do anything

Userlevel 7
Badge +14

@patberry_0001 

Please post your issue as it’s own topic and include screenshots with how your Zap steps are configured.

Troy,

 

Really helpful post.

 

I get error message “Specified authentication isn't for CalendlyCLIAPI@2.0.0” when I try to publish. 

 

When I try to reconnect, I get the error message pictured.

 

The test worked brilliantly. Am I doing something wrong?

 

Thanks for all and continued help.

 

Marco

Userlevel 7
Badge +14

@marcostaal 

Try connecting Calendly to Zapier here: https://zapier.com/app/connections

You may need to use a new/different private browser.