AshishHansdah
Here is a short startup code :
function fetchSpendeskTransactions() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Transactions");
var url = "https://api.spendesk.com/v1/transactions";
var headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
};
var options = {
"method": "get",
"headers": headers,
"muteHttpExceptions": true
};
var response = UrlFetchApp.fetch(url, options);
var json = JSON.parse(response.getContentText());
var transactions = json.transactions;
transactions.forEach(function(transaction, index) {
sheet.appendRow([transaction.date, transaction.amount, transaction.currency, transaction.description]);
});
}