Biofuel Refinery Workflow

June 22nd, 2012

This workflow demonstrates how to copy and share a spreadsheet to another user by using “SpreadsheetCopy actor” and “SpreadsheetShare actor”.

If a spreadsheet is private, only the owner can view and edit it. One way to make copy and share it to other users is through GUI of “Google Documents”, which requires users manually do a series of “cilcking” on the menu. The other way is through these actors that were implemented with Google spreadsheet API, after the easy configuration. The spreadsheet can be copied and shared automatically during the run time of the workflow, when this spreadsheet also performs other tasks in the workflow, like importing data, querying data, exporting data.

How to run this workflow:

This workflow shows how to copy and share a private spreadsheet by using spreadsheet actors, and the ability of using the user-defined functions of the spreadsheet to carry out some computing tasks. A private spreadsheet means only the owner can view and edit this spreadsheet.

Preparations:
1. Copy the template from biofuel-koogle. The access level of this spreadsheet is “Anyone who has the link may view”.
2. Copy this spreadsheet to your own “Google Documents”: “File” –> “make a copy”; go to your own “Google Documents”.
3. Find the URL to your own spreadsheet: – “Copy of evapo-koogle”. There are two ways to get the URLs: method A and method B. A couldn’t guarantee to get the correct URL all the time, so method B is recommended.

  • A: If no other browser window is opening this spreadsheet, and no other users is viewing this spreadsheet, the URL should be like “https://spreadsheets.google.com/ccc?key=********”.
    If the URL looks like “https://spreadsheets0.google.com/ccc?key=” or has other numbers following “https://spreadsheets”, try B to get the correct URL
  • B:  click “Share” –> “Sharing settings”, “Permissions” “change”, choose “Anyone with the link”, “save”. A URL will appear in the box of “Paste this link in email or IM:”.                                                                         Remove the sub-string starting with “&hl=” to the end of the URL, then it is the URL you need to copy to your workflow.
    e.g. for the URL you coped from the box: https://spreadsheets.google.com/ccc?key=0AAAAAAAAAAA&hl=en&authkey=CI_1macO
    the valid URL part you need for the workflow is: https://spreadsheets.google.com/ccc?key=0AAAAAAAAAAA

4. After the URL is acquired, please change this spreadsheet back to private to demonstrate how this workflow copys and shares the spreadsheet securely.

5. copy the URL to “ImportSpreadsheetURL” parameter of the workflow, set other parameters as well, like “newTitle” – to name the new spreadsheet, “newUser” – a valid Gmail account you want share your spreadsheet with, “roleOfNewUser”- it could be “reader” or “writer”.How to use the spreadsheet:1. After you share the spreadsheet with another user, for example”kepler.ucd@gmail.com”. “kepler.ucd@gmail.com” will receive an email with the link to the new spreadsheet:

2. Follow the link, open the spreadsheet. Now this spreadsheet is shared from you to “kepler.ucd@gmail.com” as a writer. “kepler.ucd@gmail.com” can start view and edit this spreadsheet.

From now on, we assume “kepler.ucd@gmail.com” is the user to operate on this spreadsheet.

3. Understand the spreads and edit it for your own use.
The usage of the different worksheets and the parameters are explained in the “readme” worksheet.

4. If it is the first time to run the script(click the user made menu), this message will show up as a notice. Click “OK” to enable the script.

5. After click “update”, it notices the script will update data from this data source.

6. It notices the script is running.

7. After a while, the updating is finished.

8. take a look at the spreadsheet, somethings changed.