Airbyte API call in Google Apps Script


The user is facing an issue when trying to invoke the Airbyte API inside a Google Apps Script. The error indicates that a required body ‘jobCreate’ is not specified, even though the user is attempting to invoke a ‘sync’ instead of creating a job.


I am attempting to invoke the Airbyte API inside a google Apps Script. The API call works fabulously from the API website. when copied into the Gsheet App script code, it fails with the error ‘Error making API call: { [Exception: Request failed for returned code 400. Truncated server response: {“type”:“about:blank”,“parameters”:{“path”:“/jobCreate”},“status”:400,“detail”:“Required Body [jobCreate] not specified”} (use muteHttpExceptions option to examine full response)] name: ‘Exception’ }’

however, I am not attempting to create a job, I am simply attempting to invoke a sync.
The call looks like this:

  const options = {
    method: 'POST',
    headers: {
      accept: 'application/json',
      'content-type': 'application/json',
      authorization: 'Bearer ****API TOKEN*****'
    body: JSON.stringify({jobType: 'sync', connectionId: '07de0931-be90-48fb-b08a-68e67080fd87'})

  try {
    const response = UrlFetchApp.fetch('<>', options);
    const jsonResponse = response.getContentText();
    console.log(jsonResponse); // Log the response for debugging

    // Optionally, process the response data as needed
    // ...
  } catch (error) {
    console.error('Error making API call:', error);
Is there a known issue with being able to do this within Google App scripts?



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here]( if you want to access the original thread.

[Join the conversation on Slack](

["airbyte-api", "google-apps-script", "api-call", "sync", "error"]