A Spreadsheet-bounded script to sync images of pins on a board with a specified folder in Google Drive
- Create a spreadsheet to record pins.
- Insert a sheet named
main
, and write data to some specific cells:B1
: Id of a directory in Google Drive to save folders( Images in each board are saved to the corresponding folder under that directory)B2
: Your access token for Pinterest API
- Write names of boards to sync to
4th row and later
in the following manner:- column
A
: Username of the owner of the board to watch - column
B
: Name of the board
- column
- Open script editor and check
scriptId
.- What is scriptId ? https://github.com/google/clasp#scriptid-required
The main
sheet should be like this:
A | B | ... | |
---|---|---|---|
1 | token: | <your_access_token> |
|
2 | dir_id: | <Id_of_parent_directory> |
|
3 | username | boardname | |
4 | user_hoge |
fuga_board |
|
5 | ... | ... |
notice: Don't decrease columns to less than 3. (3th column is used in this script)
Create PinterestSync/.clasp.json
, and write:
{
"scriptId": "<your_script_id>",
"rootDir": "dist"
}
Install dependencies
yarn install # or 'npm install'
build:
yarn build # or 'npm run build'
and push:
clasp push
This project is started with the help of gas-clasp-starter