[✅ Solution] Using webhook date when creating new records

Hey friends.

Not sure why but I’m overlooking something here.

I have a very basic payload from TidyCal (Calendly alternative)

2024-11-12_ (5)

I formatted a field with the details from the payload -nothing fancy

2024-11-12_ (3)

My output never includes the date fields or the answers to the questions

2024-11-12_ (6)


Any thoughts as to why?

I sometimes get that when inputting the value directly from the payload (the value appears empty, but I have no idea why). A solution is to create a script to extract the value from the payload. The script looks something like this:

Let me know if this works for you

1 Like

I appreciate you taking a stab at this for me but I’m still running into the same issue.

I’m going to ask @Tim to take a look at this for me as it may be a bug since you have run into this in the past as well.

Before Tim comes back, this is not a bug as such it is due to JSONata (Tape uses JSONata to generate those Webhook variables you get) refusing to handle fields with a - which is why you are having issues with the three fields that you are.

What I am not sure about is how Luis’s solution is working reliably and would love to understand. I don’t believe you can change the way TidyCal delivers its data so I think the only way to get the information reliably is to bypass JSONata completely.

const {
    email,
    name,
    "question-answers": questionAnswers,
    "time-end": timeEnd,
    "time-start": timeStart
} = webhook_payload_parsed;

var_start = timeStart;
var_end = timeEnd;
var_details = questionAnswers;
var_name = name;
var_email = email;

console.info(`Email: ${var_email}`);
console.info(`Details: ${var_details}`);
console.info(`endTime: ${var_end}`);
console.info(`startTime: ${var_start}`);
2 Likes

Great catch @Jason

@tim mentioned the same thing yesterday.

I have an official solution:

  • JSONata cannot handle ‘-’
  • workaround is setting up a script that uses “bracket notations”

var_tcemail = webhook_payload_parsed['email'];
var_tcname = webhook_payload_parsed['name'];
var_tcanswers = webhook_payload_parsed['question-answers'];
var_tctimeend = webhook_payload_parsed['time-end'];
var_tctimestart = webhook_payload_parsed['time-start'];

Thanks you everyone.
Leaving this hear to help someone in the future.

5 Likes