Why am I getting a "Missing } in template expression" SyntaxError when setting up a Notion to Google Calendar sync in pipedream?

This topic was automatically generated from Slack. You can find the original thread here.

Hi,
I’m trying to create a Notion to Google Calendar one-way sync in pipedream, and I’m at the very end of setting up the automation, however, when I test the Google Calendar Sync, It says the following:

SyntaxError
Missing } in template expression
Details

SyntaxError: Missing } in template expression

at _pd_deep_evaluate (/var/task/params_evaluator.js:68:65)
at MessagePort.<anonymous> (/var/task/params_evaluator.js:11:9)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:757:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28)
I’m not quite sure what’s the error about, can someone explain to me what’s going wrong?

Hi Sven, that error is most likely due to a missing } bracket in your prop input statement. I would double check that all of your JS expressions have double opening and closing brackets.

For example:

{{ steps.trigger.event.body.name }}

So, I think start time variable was messed up as it seemed that there was part of a piece of code in another piece of code, (Which I’ve now fixed) but now it says the following:

Error
Bad Request
Details

at null.handleError (/var/task/common.js:38:40)
>

Good, glad you were able to find that issue.

The Bad Request error is coming from the API you’re trying to interact with.

So I could console.log the params you’re inputting to it, or try to read the response to see exactly what is missing from the params or malformed.

I’m not quite sure where I’d get the console.log file from, but at the bottom at console it says the following:

16/10/2023, 13:57:27

{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
16/10/2023, 13:57:27

ACTIVE_HANDLEThis step was still trying to run code when the step ended. Make sure you promisify callback functions and await all Promises. (Reason: TLSSocket, Learn more: https://pipedream.com/docs/code/nodejs/async/)

Usually APIs will return the reason why the request was failed, but in this case it’s not very helpful error message.

I would double check that all inputs are actually passing data.

I can create a share link if that makes it easier?

I’ll have a look at the inputs

eeeeeey!

Nicely done. What input was the problem?

the date, It had something along (…)ate.date.end}}.end}}

don’t how that happened lol

Ah got it. Very nice. Glad to hear you were able to sort through that