Sign inSign up

jkizo/store

By jkizo

•Updated over 5 years ago

Image
0

865

jkizo/store repository overview

⁠Store

Add a row to a 'Google Sheets' spreadsheet.

⁠Direktiv

An example workflow of using the container in a workflow on Direktiv.

id: store-excel
functions: 
- id: store
  image: vorteil/store
description: "Stores who accessed into excel"
states:
- id: storeExcel
  type: action
  action:
    function: store
    input: '{ 
    "authentication" : {
        "type": "service_account",
        "private_key": "PRIVATE KEY",
        "client_email": "CLIENT_EMAIL",
        "token_uri": "https://oauth2.googleapis.com/token",
    },
    "spreadSheetID": "SPREADSHEET_ID",
    "range": "A1",
    "values": ["These", "are", "individual", "columns", "!"]
}'

⁠Input

  • On a Google Cloud project, create a Service Account.
  • Download a JSON-format Service Account key file.
  • Enable the 'Google Sheets API' on the Google Cloud project.
  • Populate the following input object, using the client_email and private_key fields for their respective matching fields.
{
    "authentication" : {
        "type": "service_account",
        "private_key": "PRIVATE KEY",
        "client_email": "CLIENT_EMAIL",
        "token_uri": "https://oauth2.googleapis.com/token",
    },
    "spreadSheetID": "SPREADSHEET_ID",
    "range": "A1",
    "values": ["These", "are", "individual", "columns", "!"]
}

Note: Replace SPREADSHEET_ID with the ID of whichever Google Sheets document should be targeted. *Note: Providing 'debug' with the json struct will print everything about what the application is doing.

⁠Output

No output will be provided if successful

⁠Error

If an error was to happen during the container running the output is written back to direktiv as the following

{
    "errorCode": "com.store.error",
    "errorMsg": "Something went wrong"
}

Tag summary

Content type

Image

Digest

Size

3.7 MB

Last updated

over 5 years ago

docker pull jkizo/store