This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sample social media campaigns and their expiry dates | |
const campaigns = | |
[ | |
{ | |
"type": "campaign", | |
"target": "Facebook", | |
"expiry": "2020-03-07T16:32:12.011Z", | |
"id": "campaign:05:target:facebook:campaignNo:4AB12" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const readline = require('readline'); | |
const {google} = require('googleapis'); | |
// If modifying these scopes, delete token.json. | |
// SCOPE gives additional rules to the sheet, you can restrict rule to readonly or give full access | |
const SCOPES = ['https://www.googleapis.com/auth/spreadsheets']; | |
// The file token.json stores the user's access and refresh tokens, and is | |
// created automatically when the authorization flow completes for the first | |
// time. |