AnsweredAssumed Answered

[FM17] How to correctly format call to Google Cal API via Filemaker Insert from URL?

Question asked by nalcus@mann on Jun 28, 2018
Latest reply on Jun 28, 2018 by nalcus@mann

Hi all! I've been attempting to edit Google Cal from Filemaker. The constraints I'm working under are that I cannot use any custom functions or plugins. Currently, this is what my Insert from URL call looks like:

 

Insert from URL [ Select ; With Dialog: Off ; Events::GoogleResponse ; 
"HTTPS://www.googleapis.com/calendar/v3/calendars/ & $Calendar_ID & "/events/" & $Event_id ; 
cURL options: "
"--show-error " &
"--dump-header $HeaderDump " &
"--header " & $header2 &
"--header " & $header1 &
"-X POST " &
"-data-ascii @$postParams"

The URL seems to be correct as I'm making contact with the google API (and I have replicated this call in an external cURL tool and it works).

 

The variables are as follows:

 

 

$header2 = "Authorization: Bearer <token-val>" (the "" are intentional)

$header1 = Content-Type:application/json

$postParams = {"description":" \\\\n\\\\n\\\\n","end":{"dateTime":"2018-6-28T17:32:00","timeZone":"GMT-07:00"},"location":"111 1st St  city city, state 11111","start":{"dateTime":"2018-6-28T13:30:00","timeZone":"GMT-07:00"},"summary":"aaa @ zzz"}

 

When making the call, I get a "Connection Failed" error.

Internal Error = 1631

External Error = 400

Header Dump (important bit) = Bad Request

 

Does anyone have any intuition as to what the issue could be? I'm assuming that my payload is not formatted correctly but I can find little literature on what needs to be escaped/not in FMP. Thanks for any help!

Outcomes