I'm creating a Discord Bot that will grab a specified chart from a Google Sheet and send the chart to the server. The sheet on hand will only ever have one chart at a time, so I've been able to find the correct chartId as follows:
sheets.spreadsheets.get({
spreadsheetId: 'MYSPREADSHEETID'
}, (err, res) => {
if (err) return console.log('The API returned an error: ' + err);
var id = res.data.sheets[0].charts[0].chartId;
});
However, I cannot find out how to export the corresponding chart as an image, or find a unique URL to the chart, or even recreate the chart using the existing data. I'm using discord.js and Google Sheets API v4.