Please help i have no ideal what this is

can someone please tell me what this is … what it does… and how to use it?

{"files":[{"id":"3a909eac-473d-420d-aeeb-7ba00d0d70fe","name":"appsscript","type":"json","source":"{\n  \"timeZone\": \"America/New_York\",\n  \"dependencies\": {\n  },\n  \"exceptionLogging\": \"STACKDRIVER\",\n  \"oauthScopes\": [\"https://www.googleapis.com/auth/gmail.addons.current.message.metadata\", \"https://www.googleapis.com/auth/gmail.addons.execute\", \"https://www.googleapis.com/auth/userinfo.email\"],\n  \"runtimeVersion\": \"V8\",\n  \"gmail\": {\n    \"name\": \"Demo Gmail Addon\",\n    \"logoUrl\": \"https://www.gstatic.com/images/branding/googleg/1x/googleg_standard_color_64dp.png\",\n    \"contextualTriggers\": [{\n      \"unconditional\": {\n      },\n      \"onTriggerFunction\": \"loadAddOn\"\n    }],\n    \"primaryColor\": \"#146b2e\",\n    \"openLinkUrlPrefixes\": [\"https://developers.google.com/gmail\"],\n    \"version\": \"TRUSTED_TESTER_V2\"\n  }\n}"},{"id":"e1a49faf-fcce-4ae4-9d7b-8b499e43b356","name":"Code","type":"server_js","source":"function loadAddOn(event) {\n  var accessToken \u003d event.gmail.accessToken;\n  var messageId \u003d event.gmail.messageId;\n  GmailApp.setCurrentMessageAccessToken(accessToken);\n  var mailMessage \u003d GmailApp.getMessageById(messageId);\n  var from \u003d mailMessage.getFrom();\n\n  var openDocButton \u003d CardService.newTextButton()\n      .setText(\"open docs\")\n      .setOpenLink(\n          CardService.newOpenLink().setUrl(\"https://developers.google.com/gmail/add-ons/\"));\n\n  var card \u003d CardService.newCardBuilder()\n      .setHeader(CardService.newCardHeader().setTitle(\"My First Gmail Addon\"))\n      .addSection(CardService.newCardSection()\n          .addWidget(CardService.newTextParagraph().setText(\"The email is from: \" + from))\n          .addWidget(openDocButton))\n      .build();\n\n  return [card];\n}\n"}]}

there was also this…

https://www.googleapis.com/tasks/v1/users/@me/lists/MTUwNjY0MzQ2Mjg5MzYxNjU5NTg6MDow

Hi Hunter, welcome!

Where did you find these code snippets, and what did you want to do?

The first looks like code/data pulled from a Google service or API, and the second looks like a Google API URL.

It looks like a JSON response from the Google Task API. Could you give us some more context like @SteGriff said?

2 Likes