Gists
This sample script is for parsing JSON object. In the object, the keys are number and changing every time.
Object: { "key1": { "key2": [ {"0": [{"key3": "value3a"}, {"key3": "value3b"}]}, {"1": [{"key3": "value3c"}, {"key3": "value3d"}]} ] } } Script: package main import ( "encoding/json" "fmt" "strconv" ) type key1 struct { Key1 key2 `json:"key1"` } type key2 struct { Key2 []interface{} `json:"key2"` } func main() { data := `{"key1": {"key2": [{"0": [{"key3": "value3a"}, {"key3": "value3b"}]},{"1": [{"key3": "value3c"}, {"key3": "value3d"}]}]}}` k1 := &key1{} json.
v2.1.0 (February 3, 2018)
From this version, it got to be able to use the projects of both standalone script type and container-bound script type. Add-on GitHub
Gists
These are sample scripts for adding a label to a message using message ID for Gmail.
Sample 1 This sample adds a label to a thread using message ID. In this case, all messages in the thread have the label. Even if it adds a label to a message in the thread using addLabel(), all messages in the thread have the label, becauce addLabel can only be used for the thread.
Gists
Description : This sample script is for retrieving emails which replied for received mails. Because there are no samples which confirm whether the owner (me) replied to the received mails, I created this. The point is as follows.
When there are more than 2 messages in a thread, there might be a possibility to have replied. For more than 2 messages in a thread The email address of “from” for the 1st message is the sender’s address.
ManifestsApp was updated to v1.0.2.
v1.0.2 (January 29, 2018)
ProjectApp2 is published, and got to be able to use both standalone script type and container-bound script type. By this, this library also got to be able to be used for the both projects. For this update, please enable Apps Script API. Please check “How to install”. You can check this at https://github.