Google sheets function using in Voiceflow

I’m using a function made in JavaScript in a platform called voiceflow. It has an input variable known as range which only fetches a specified sheet name data. I want to modify the function to fetch data from all sheets in the Google spreadsheet.

export default async function main(args) {
const { google_sheets_api_key, spreadsheet_link, range } = 
args.inputVars;

if (!google_sheets_api_key || !spreadsheet_link || !range) {
return {
  next: { path: 'error' },
  trace: [{ type: "debug", payload: { message: "Missing required input variables for Google Sheets API function" } }]
};
}

const spreadsheetIdRegex = //d/([a-zA-Z0-9-_]+)/;
const match = spreadsheetIdRegex.exec(spreadsheet_link);
if (!match) {
return {
  next: { path: 'error' },
  trace: [{ type: "debug", payload: { message: "Invalid Google Sheets URL" } }]
};
}
const spreadsheet_id = match[1];

const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheet_id}/values/${range}?key=${google_sheets_api_key}`;

try {
const response = await fetch(url, { method: 'GET', headers: { 'Content-Type': 'application/json' } });
const responseBody = response.json;

if (!responseBody || typeof responseBody !== 'object') {
  return {
    next: { path: 'error' },
    trace: [{ type: "debug", payload: { message: "Invalid or missing response body from Google Sheets API" } }]
  };
}

// Simplifying the return object for testing
return {
  outputVars: { sheetData: JSON.stringify(responseBody) }, // Temporarily return the response as a string
  next: { path: 'success' },
  trace: [{ type: "debug", payload: { message: "Response Body: " + JSON.stringify(responseBody) } }]
};
} catch (error) {
return {
  next: { path: 'error' },
  trace: [{ type: "debug", payload: { message: "Error fetching data from Google Sheets: " + error.message } }]
};
}
}

I have tried the app script, but it truncates the data due to large data output. I need help to modify the function to fetch data from all the sheets present in the spreadsheet.
I have tried a lot of different modified functions but all of them have the same error which response.json is not a function.