tag:blogger.com,1999:blog-13771839114451472272024-03-05T07:19:51.561-08:00G Suite Developers BlogInformation for G Suite DevelopersUnknownnoreply@blogger.comBlogger408125tag:blogger.com,1999:blog-1377183911445147227.post-54932882209329156502018-07-19T09:00:00.000-07:002018-07-19T09:01:28.445-07:0010 must-see G Suite developer sessions at Google Cloud Next ‘18<span class="post-author">Posted by Posted by <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="http://twitter.com/wescpy">@wescpy</a>), Developer Advocate, Google Cloud</span><br />
<br />
<a href="http://cloudnext.withgoogle.com/">Google Cloud Next '18</a> is less than a week away and this year, there are over 500 sessions, covering all aspects of cloud computing—IaaS, PaaS, and SaaS. This is your chance to hear from experts in artificial intelligence, as well as learn first-hand how to build custom solutions in G Suite alongside developers other Independent Software Vendors (ISVs), systems integrators (SIs) or industry enterprises.<br />
<br />
G Suite’s intelligent productivity apps are secure, smart and simple to use, so why not integrate your apps with them? If you’re planning to attend the event and are wondering which sessions you should check out to enhance your skill set, here are some sessions to consider:<br />
<br />
<ul>
<li>“<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/201086">Power Your Apps with Gmail, Google Drive, Calendar, Sheets, Slides, and More!</a>" on Tuesday, July 24th. Join me as I lead this session that provides a high-level technical overview of the various ways you can build with G Suite. This is a great place to start before attending deeper technical sessions. </li>
<li>“Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides and more” on Monday, July 23rd and Friday, July 27th. If you're already up-to-speed and want to leave NEXT with actual, working code you can use at school or on the job, join us for one of our bootcamps! Both are identical and bookend the conference—one on <a href="https://cloud.withgoogle.com/next18/sf/sessions/session/156873">Monday</a> and another on <a href="https://cloud.withgoogle.com/next18/sf/sessions/session/184771">Friday.</a> While named the same as the technical overview talk above, these dive a bit deeper, show more API usage examples and feature hands-on codelabs. <a href="https://cloud.withgoogle.com/next18/sf/attending">Register today</a> to ensure you get a seat.</li>
<li>“<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/156699">Automating G Suite: Apps Script & Sheets Macro Recorder</a>” or “<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/156837">Enhancing the Google Apps Script Developer Experience</a>” on Tuesday, July 24th. Interested in Google Apps Script, our customized serverless JavaScript runtime used to automate, integrate, and extend G Suite apps and data? The first session introduces developers and ITDMs to new features as well as real business use cases while the other session dives into recent features that make Apps Script more friendly for the professional developer. </li>
<li>“<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/156878">G Suite + GCP: Building Serverless Applications with All of Google Cloud</a>” on Wednesday, July 25th. This session is your chance to attend one of the few hybrid talks that look at how to you can build applications on both GCP and G Suite platforms. Learn about GCP and G Suite serverless products— a topic that’s become more and more popular over the past year—and see how it works firsthand with demos. I’m also leading this session and eager to show how you can leverage both platforms in the same application. </li>
<li>“<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/194818">Build apps your business needs, with App Maker</a>” or “<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/155668">How to Build Enterprise Workflows with App Maker</a>” on Tuesday, July 24th and Thursday, July 26th respectively. Google App Maker is a new low-code, development environment that makes it easy to build custom apps for work. It’s great for business analysts, technical managers or data scientists who may not have software engineering resources. With a drag & drop UI, built-in templates, and point-and-click data modeling, App Maker lets you go from idea to app in minutes! Learn all about it with our pair of App Maker talks featuring our Developer Advocate, Chris Schalk. </li>
<li>“<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/156311">The Google Docs, Sheets & Slides Ecosystem: Stronger than ever, and growing</a>” or “<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/156315">Building on the Docs Editors: APIs and Apps Script</a>” on Wednesday, July 25th and Thursday, July 26th respectively. Check out these pair of talks to learn more about how to write apps that integrate with Google Docs, Sheets, Slides and Forms. The first describes the G Suite productivity tools' growing interoperability in the enterprise with while the second focuses on the different options available to developers for integrating with the G Suite "editor" applications. </li>
<li>“<a href="https://cloud.withgoogle.com/next18/sf/sessions/session/154636">Get Productive with Gmail Add-ons</a>” on Tuesday, July 24th. We <a href="https://gsuite-developers.googleblog.com/2017/10/gmail-add-ons-framework-now-available.html">launched Gmail Add-ons</a> less than a year ago (You can check out <a href="https://www.youtube.com/watch?v=9cDvkVCcIWE">this video</a> to learn more.) to help developers integrate their apps alongside Gmail. Come to this session to learn the latest from the Gmail Add-ons and API team.</li>
</ul>
<div>
I look forward to meeting you in person at <a href="https://cloudnext.withgoogle.com/">Next '18</a>. In the meantime, you can check out the entire <a href="https://cloud.withgoogle.com/next18/sf/sessions">session schedule</a> to find out everything NEXT has to offer or <a href="https://twitter.com/gsuite/status/1017496185525846016">this video </a>where I talk about how I think technology will change the world. See you soon!</div>
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-82621922516632632622018-06-18T10:00:00.000-07:002018-06-18T10:22:11.695-07:00Getting started with App Maker: a detailed walkthrough<span class="post-author">Posted by Christian Schalk, Developer Advocate, App Maker</span><br />
<br />
We recently made App Maker <a href="https://www.blog.google/products/g-suite/build-apps-your-business-needs-app-maker/">generally available</a>. App Maker is a new, low-code development environment for G Suite that lets you build a wide range of apps for your business and customize processes to help you be more efficient.<br />
<br />
Building apps in App Maker is easy. You can declaratively define your app’s backend data, visually design a UI, add custom behaviors with Code (optional) and publish your app quickly.<br />
<br />
To get familiar, here’s a quick walkthrough of App Maker’s main app development features.<br />
<h3>
Building your data backend </h3>
With App Maker, backend <b>Data Models</b> are created in a declarative manner so you don’t have to worry about writing a lot of database code. Supported App Maker Data Models include:<br />
<ul>
<li><a href="https://cloud.google.com/sql/docs/">Cloud SQL</a> - connects to Google Cloud SQL (GCP account required). </li>
<li><a href="https://developers.google.com/appmaker/models/calculated">Calculated</a> - a computed virtual model via Scripting or SQL. It can also connect to external data (<a href="https://developers.google.com/appmaker/models/external-data-options">JDBC, REST</a>). </li>
<li><a href="https://developers.google.com/appmaker/models/directory">Directory</a> - fetches your organizational data.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj72c7ClUbMbNsgxIibkyNNclbaiHFopIK33umQiZnOetHovZV_SczQNwie4k4WIr3JhVcjeAS5CIwT0bNtPqn1WrRIvFh3jj-AsMd3rWLN-nQpEcmz-Kcy3olClly-6DxUcKw3HLGqcbM/s1600/G+Suite+Developers+Blog+-+App+Maker+Intro+-+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1292" data-original-width="1082" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj72c7ClUbMbNsgxIibkyNNclbaiHFopIK33umQiZnOetHovZV_SczQNwie4k4WIr3JhVcjeAS5CIwT0bNtPqn1WrRIvFh3jj-AsMd3rWLN-nQpEcmz-Kcy3olClly-6DxUcKw3HLGqcbM/s640/G+Suite+Developers+Blog+-+App+Maker+Intro+-+1.png" width="531" /></a></div>
<br />
To build <b>Data Model Fields </b>you can either build them from scratch, or use an existing <b>CSV</b> or via a <b>Google Sheet</b>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUvv36E5HTB-fEb-67KJi7IKL3xQsMQ7GCrJX5wSZXS0VL8tcSY7o0slbBkT7FOv0qCjlrnA4-TWcPJdYI1-W8zRcqBAFmXUirAvcoreAvxsOhXhpCI-Nw4rY9Ai4PGPiPDYcmDQxnY0/s1600/App+Maker+Intro+-+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="697" data-original-width="874" height="507" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUvv36E5HTB-fEb-67KJi7IKL3xQsMQ7GCrJX5wSZXS0VL8tcSY7o0slbBkT7FOv0qCjlrnA4-TWcPJdYI1-W8zRcqBAFmXUirAvcoreAvxsOhXhpCI-Nw4rY9Ai4PGPiPDYcmDQxnY0/s640/App+Maker+Intro+-+2.png" width="640" /></a></div>
After defining the structure of your Data Model you can insert <i>validation rules</i> to limit what data can be saved.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPz_YqVOPo7lFuhxBwxGOGZlSuCEtAm0s5501a8MwcSas0z8odfLGlYVJ-G4v1io2BddifOJyHpZ0Ixc19wSGeqPrqL1ph7KuQ-quqy4ke8iNB9ae_0Bj6pSusv6TL-KIzrd66dskb2eU/s1600/App+Maker+Intro+-+3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="653" height="560" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPz_YqVOPo7lFuhxBwxGOGZlSuCEtAm0s5501a8MwcSas0z8odfLGlYVJ-G4v1io2BddifOJyHpZ0Ixc19wSGeqPrqL1ph7KuQ-quqy4ke8iNB9ae_0Bj6pSusv6TL-KIzrd66dskb2eU/s640/App+Maker+Intro+-+3.png" width="640" /></a></div>
Building <a href="https://developers.google.com/appmaker/models/relations">relations</a> (one-to-many, many-to-many, etc.) between data models is easily doable in the App Maker <b>Relation Editor.
</b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq1xUtvtBUqkC2tYRMVgP5MlEKrijPs3z5dBU59EAK_EBxffLPuhphrKmJpu5Wm135tpg3uzkdKsMrx8Ik7GtLcXG-2Et6nhyphenhyphenG5M4aqMtNbSfmcTYyJCOTBLtJVSUf3igYcKynh5ocsaA/s1600/App+Maker+Intro+-+4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="529" data-original-width="800" height="419" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq1xUtvtBUqkC2tYRMVgP5MlEKrijPs3z5dBU59EAK_EBxffLPuhphrKmJpu5Wm135tpg3uzkdKsMrx8Ik7GtLcXG-2Et6nhyphenhyphenG5M4aqMtNbSfmcTYyJCOTBLtJVSUf3igYcKynh5ocsaA/s640/App+Maker+Intro+-+4.png" width="640" /></a></div>
The App Maker Model editor also provides a variety of other features that include setting up custom <b>queries</b> and <b>filters</b>, <b>securing data access</b> based on <b>Roles</b> as well as triggering <b>Data Events</b> based execution. See the <a href="https://developers.google.com/appmaker/models/overview">Data Models documentation</a> for more info.<br />
<h3>
Designing your UI </h3>
App Maker helps you streamline UI development by providing a visual design environment where you can drag and drop UI elements (<b>Widgets</b>) onto a canvas and then set the properties of the widgets using a <b>Property Editor</b>. Or if you want, there are also helpful UI generation wizards that can create ready-made UI structures, including Edit or Insert Forms, Tables and a variety of Charts to further speed UI development.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoHTWZNiellH9UB-e5X9oMjfSGkcLCHs_5A3pez_nA7RaSO-0UHYW_3sPpDHr6pHSm5K-kxegbRuMqJAgMmgYGt28SEK_Bfnk__PXjVB7dHQTpDPi7nys7tVbWXetdf5UjWtQRJx7S41U/s1600/App+Maker+Intro+-+5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="938" data-original-width="1448" height="411" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoHTWZNiellH9UB-e5X9oMjfSGkcLCHs_5A3pez_nA7RaSO-0UHYW_3sPpDHr6pHSm5K-kxegbRuMqJAgMmgYGt28SEK_Bfnk__PXjVB7dHQTpDPi7nys7tVbWXetdf5UjWtQRJx7S41U/s640/App+Maker+Intro+-+5.png" width="640" /></a></div>
The look and feel of the UI is governed by CSS, where the default is <a href="https://material.io/design/">Google's Material design</a> standard. A variety of style variants are available in the editor so that the author can easily toggle how a widget is rendered via a dropdown menu or direct CSS editing.<br />
<br />
The UI is connected to backend data via App Maker’s data-binding feature which allows an author to connect widget properties to data model fields.<br />
<br />
The combination of visual design, databinding, CSS UI Styling with, Google Material as a default, all contribute to a productive UI creation experience. For full coverage of App Maker UI concepts. see the <a href="https://developers.google.com/appmaker/ui/overview">UI documentation</a>.<br />
<h3>
Enrich your apps with code </h3>
Although App Maker does all the heavy lifting when it comes to database communications and UI design, sometimes you need to customize application behaviors. This is where App Maker’s scripting feature comes in.<br />
<br />
The scripting language used by App Maker is <a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>, which is used in both the Browser (Client) or Server. The Server’s runtime environment is <a href="https://developers.google.com/apps-script/overview">Apps Script</a> which provides access to a vast library of G Suite services for common operations with <a href="https://developers.google.com/apps-script/reference/gmail/">Gmail,</a> <a href="https://developers.google.com/apps-script/reference/document/">Docs</a>, <a href="https://developers.google.com/apps-script/reference/spreadsheet/">Sheets</a>, <a href="https://developers.google.com/apps-script/reference/calendar/">Calendar</a> and other services.<br />
<br />
App Maker streamlines the process of writing code by providing an intuitive Code Editor that’s equipped with helpful <b>Code Completion</b>.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzCaeBe419pH-7u0cQZABDg47K_s9iB6mboPXrqY3qLm8zvVfwwZWLH_TLztGvZM5GeydU_XyrIo0s3VX_AcCha3OvUOBxifr0vtmJe2ztOvWAMYg0N1rWPOECyOuKVJu58cvT9FxLlgg/s1600/App+Maker+Intro+-+6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1077" data-original-width="1600" height="427" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzCaeBe419pH-7u0cQZABDg47K_s9iB6mboPXrqY3qLm8zvVfwwZWLH_TLztGvZM5GeydU_XyrIo0s3VX_AcCha3OvUOBxifr0vtmJe2ztOvWAMYg0N1rWPOECyOuKVJu58cvT9FxLlgg/s640/App+Maker+Intro+-+6.png" width="640" /></a></div>
Plus, App Maker provides syntax error highlighting along with an interactive warning/error indication feature. For more information on App Maker coding topics, see <a href="https://developers.google.com/appmaker/scripting/overview">these Scripting Docs</a>.<br />
<h3>
Previewing and publishing your app </h3>
Finally, App Maker provides an easy-to-use <b>Preview</b> feature where you can quickly test your app on your own. When you’re ready to share your app with users, App Maker provides a comprehensive <b>Publish</b> (or Deployment) feature. To learn more about previewing and publishing apps, see the <a href="https://developers.google.com/appmaker/deployment">publishing guide</a>.<br />
<h3>
<b>Try App Maker today </b></h3>
Now that you have a general idea of App Maker’s features, have a go at the <a href="https://g.co/codelabs/appmaker">App Maker Codelab</a>. Note: You’ll need to have App Maker enabled on your domain via G Suite Business/Enterprise or G Suite for Education.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK5UsTmnazNRdf9f28S3_yjdtV8SwNsH1pbaGNhsBJp-Mg9NzE4rzrZbU0yFz5eLqrD08dtEW8P9eQH_cHCFm6JPU1oDQQ22K2QuDuQQbR1mKiO0QBmpNKClUjzWUv53hxIWJ7DJx9Avw/s1600/App+Maker+Intro+-+7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1139" data-original-width="1190" height="609" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK5UsTmnazNRdf9f28S3_yjdtV8SwNsH1pbaGNhsBJp-Mg9NzE4rzrZbU0yFz5eLqrD08dtEW8P9eQH_cHCFm6JPU1oDQQ22K2QuDuQQbR1mKiO0QBmpNKClUjzWUv53hxIWJ7DJx9Avw/s640/App+Maker+Intro+-+7.png" width="640" /></a></div>
To learn more about App Maker, visit <a href="http://developers.google.com/appmaker">developers.google.com/appmaker</a> or stay tuned for more information!Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-29816115014330931002018-06-13T10:00:00.000-07:002018-06-13T10:01:15.795-07:00Developing bots for Hangouts Chat<span class="post-author">Posted by <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="http://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<span class="post-author"><br /></span>
Do you feel like you live in a chat window, and wish it could do more? Google made Hangouts Chat <a href="https://blog.google/products/g-suite/move-projects-forward-one-placehangouts-chat-now-available/">generally available</a> earlier this year to help. This messaging platform helps users easily collaborate from one place, and features archive and search, tighter G Suite integrations and the ability to create separate, threaded chat rooms. More importantly for developers, Chat includes a bot framework and API. Whether you want to automate common tasks, query information or perform other heavy-lifting, bots can help transform the way you work.<br />
<h3>
Speed up workflows with bots in Hangouts Chat </h3>
In addition to plain text replies, Hangouts Chat can also display bot responses with richer user interfaces (UIs) called <a href="https://developers.google.com/hangouts/chat/how-tos/cards-onclick">cards</a> which can render header information, structured data, images, links, buttons and more. Users can also interact with these components, like updating displayed information. In the latest episode of the <a href="http://goo.gl/JpBQ40">G Suite Dev Show</a>, we talk about how to create a bot that features an updating interactive card.<br />
<br />
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/ESSB3GvE9e0" width="640"></iframe>
<br />
Pointers on building a Hangouts Chat bot
The most important thing when bots receive a message is to determine the event type and take the appropriate action. Here are the types and how each work:<br />
<ul>
<li>ADDED_TO_SPACE </li>
<li>REMOVED_FROM_SPACE - A bot will perform any desired "paperwork" when it is added to or removed from a room or direct message (DM), generically referred to as a "space.” When added to a space, a bot will generally send a welcome message like, "Thank you for adding me to this room." No notifications are sent when a bot is removed from a space (because the bot has been removed… duh!). Developers typically just log that the bot has been removed. </li>
<li>MESSAGE - Receiving an ordinary message sent by users is the most likely scenario. Most bots do "their thing" here in serving the request. </li>
<li>CARD_CLICKED - The last event type occurs when a user clicks on an interactive card. Similar to receiving a standard message, a bot performs its requisite work, including possibly updating the card itself.</li>
</ul>
Below is some pseudocode summarizing these four event types and represents what a bot would likely do depending on the event type:
<br />
<br />
<pre><code>function processEvent(req, rsp) {
var event = req.body; // event type received
var message; // JSON response message
if (event.type == 'REMOVED_FROM_SPACE') {
// no response as bot removed from room
return;
} else if (event.type == 'ADDED_TO_SPACE') {
// bot added to room; send welcome message
message = {text: 'Thanks for adding me!'};
} else if (event.type == 'MESSAGE') {
// message received during normal operation
message = responseForMsg(event.message.text);
} else if (event.type == 'CARD_CLICKED') {
// user-click on card UI
var action = event.action;
message = responseForClick(
action.actionMethodName, action.parameters);
}
rsp.send(message);
};
</code></pre>
<br />
The bot pseudocode as well as the bot featured in the video respond <a href="https://developers.google.com/hangouts/chat/how-tos/bots-develop#syncresponse">synchronously</a>. Bots performing more time-consuming operations, or those issuing out-of-band notifications, can send messages to <a href="https://developers.google.com/hangouts/chat/concepts/bots#bots_in_direct_messages_dm">spaces</a> in an <a href="https://developers.google.com/hangouts/chat/how-tos/bots-develop#asyncresponse">asynchronous</a> way. This includes messages like notifications when a job is completed, alerts if a server goes down or pings to the Sales team when a new lead is added to the CRM (Customer Relationship Management) system.<br />
<h3>
Build your bot, your way </h3>
While we demonstrate the bot implemented in JavaScript and Python in the video, one key takeaway is the flexibility of the platform: <b>developers can use any language, any stack or any cloud</b> to create and host their bot implementations. Bots only need to be able to accept HTTP POST requests coming from the Hangouts Chat service to function.<br />
<br />
We recently delivered an <a href="https://events.google.com/io/schedule/?section=may-9&sid=d0330c4e-a5bf-444e-a5a3-9eca8fad4def&speaker=b2154ac0-6dc4-4673-b69d-be4ba17a9164">overview of the bot framework</a> at <a href="http://google.com/io">Google I/O 2018.</a> This comprehensive tour of the framework includes live demos of sample bots in a variety of languages and platforms. Check it out:
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/qBdG6cwnWps" width="640"></iframe><br />
<br />
To get started, check out t<a href="https://developers.googleblog.com/2018/02/develop-bot-integrations-with-hangouts.html">his post</a> on the Google Developers blog or <a href="https://wescpy.blogspot.com/2018/05/creating-hangouts-chat-bots-with-python.html">this post</a> for a deeper dive into the Python App Engine version of the vote bot featured in the video.<br />
<br />
You can learn more about developing bots for Hangouts Chat by reviewing the <a href="http://developers.google.com/hangouts/chat/concepts/bots">concept guides</a> as well as <a href="https://developers.google.com/hangouts/chat/how-tos/bots-develop">this “how-to”</a> on creating bots. Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-29618723432821046382018-06-05T09:00:00.000-07:002018-06-05T09:07:14.117-07:00Building a Gmail Add-on with Trello<span class="post-author">Posted by Desmond Morris, Technical Staff, Trello and Wesley Chun (<a href="http://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
Last October, we <a href="https://gsuite-developers.googleblog.com/2017/10/gmail-add-ons-framework-now-available.html">launched</a> the Gmail Add-ons framework so that developers can build apps that appear inside Gmail. As a part of the launch, we invited a few partners to try out the new platform, including <a href="https://trello.com/">Trello</a>. Trello’s team built an <a href="https://gsuite.google.com/marketplace/app/trello_for_gmail/710372432947">add-on</a> that allows its users to create Trello cards right from their inbox. On Trello, “cards” represent individual tasks that are part of a larger workflow.<br />
<br />
To learn more, we sat down with Desmond Morris, Trello’s lead developer for the add-on, to get his thoughts on the experience.<br />
<h3>
<b>What is the Trello Add-on for Gmail? Why did you decide to build it? </b></h3>
The Gmail Add-on we built for Trello makes it easy for folks to take incoming email messages and immediately send them to a Trello <a href="https://trello.com/guide/board-basics.html">board</a>. Trello’s board and list format gives the user more context as to where a task is in the process.<br />
<br />
Basically, when you open up an email in Gmail, there is a Trello icon in the top right corner. When you first click the icon, the add-on will ask you to log in to your Trello account. Once authenticated, you are presented with the card creation form. The form is pre-populated with the subject and body of the email, and allows you to select both the board and list to which the card should be added.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMuIhJQ7dCim-BJ3MhqkYD9xCAacGjkDmisEdJtQKf6FEWFh0652uR9FrO00ll0r4ajuQ09ZDxwIXNOv12ZW5r7f2A2cQwM8jwvdGN0Qo7yjQ6AtBBosPASd_jaWvUeiVA2YovNowGlKs/s1600/Trello_Add-on_For_Gmail.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="1000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMuIhJQ7dCim-BJ3MhqkYD9xCAacGjkDmisEdJtQKf6FEWFh0652uR9FrO00ll0r4ajuQ09ZDxwIXNOv12ZW5r7f2A2cQwM8jwvdGN0Qo7yjQ6AtBBosPASd_jaWvUeiVA2YovNowGlKs/s640/Trello_Add-on_For_Gmail.gif" width="640" /></a></div>
<br />
<br />
Trello already integrates with other G Suite applications—Trello users can <a href="https://blog.trello.com/trello-and-google-drive-an-integration-made-in-office-heaven">attach Google Drive files and folders to Trello cards</a> and <a href="https://blog.trello.com/trello-for-google-hangouts-chat">send alerts to Hangouts Chat</a> right from Trello. Given the already tight integrations between our two products, building the Gmail Add-on felt like a natural fit.<br />
<h3>
<b>What was your experience like building the Gmail Add-on? </b></h3>
This was my first look ever at Apps Script. I had never used it before at all. I have experience writing Javascript, so picking up Apps Script was pretty easy.<br />
<br />
Before I started building, I took a look through the docs and the samples that Google provided. There was a sample add-on which incorporated nearly all of the features provided by the framework. It was great because it basically gave us a set scope for exactly what we wanted to do. So my immediate first step was to dig around and start matching up the ideas I had in mind for the add-on and how the example demonstrated those features.<br />
<h3>
<b>Did anything surprise you? </b></h3>
At first when I was developing the add-on, I didn’t even touch mobile. When I finally got to the mobile portion, I was surprised to see that the code I’d been working with for the web client also worked on mobile, with no extra code on my part. It was easy, really.<br />
<br />
I was initially surprised that the Add-ons framework didn't allow for "free rein" control—the ability to add a myriad of HTML/CSS/JS. But then I started using the tools and found that I had enough flexibility to be effective. Limiting what you can do actually helps make these add-ons device agnostic, which in turn relieves much of the burden from the developer.<br />
<h3>
<b>Do you have any tips for developers who are considering building on the platform?</b></h3>
The tip I would suggest to developers, especially if they are new to the platform, is to make good use of the <a href="http://developers.google.com/gmail/add-ons">guides</a> and <a href="http://developers.google.com/gmail/add-ons/samples">sample code</a> provided. It was helpful in allowing me to understand what was and was not possible within the platform.<br />
<br />
The composable nature of the provided widgets made it easy to build simple abstractions around UI patterns. In the add-on, I made use of the Selection Input field widget to provide selectors for users to pick the board and list they want to create cards on. Rendering a selection input widget requires only a few lines of code, but I figured it would be helpful to get down to a single function call:<br />
<br />
<pre><code>/**
* A helper function for building dropdown widgets
*/
function buildDropdownWidget(key, title, items, selected) {
var widget = CardService.newSelectionInput()
.setType(CardService.SelectionInputType.DROPDOWN)
.setTitle(title)
.setFieldName(key)
for(var i = 0; i < items.length; i++) {
var itemSelected = selected === items[i].value
widget.addItem(items[i].text, items[i].value, itemSelected)
}
return widget
}
</code></pre>
<br />
It's great that we were able to add further integrations with G Suite for our users using add-ons.<br />
<br />
<i>To get started, visit the <a href="http://developers.google.com/gmail/add-ons">Gmail Add-ons documentation</a> or check out <a href="http://developers.google.com/apps-script/guides/videos">this video library</a> for inspiration to learn how to use Apps Script to build add-ons.
</i>Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-1271394882232975712018-06-04T09:00:00.000-07:002018-06-04T09:00:13.500-07:00New OAuth protections to reduce risk from malicious apps<span class="post-author">Posted by Luke Camery, Associate Product Manager, OAuth Security</span><br />
<br />
As part of our constant efforts to improve Google’s OAuth application ecosystem, we are launching additional protections that can limit the spread of malicious applications. Applications requiring OAuth will be subject to a daily total new user cap and a new user acquisition rate limit. The first restricts the total number of new users that can authorize your application, while the second limits how rapidly your application can acquire new users.<br />
<br />
Every application will have its own quotas depending on its history, developer reputation, and risk profile; for more details, see <a href="https://support.google.com/cloud/answer/7454865?hl=en">User Limits for Applications using OAuth</a>.<br />
<br />
These quotas will be initially set to match your application’s status and current usage so the majority of developers will see no impact. However, if you have received a quota warning about your application, or if you anticipate your application may exceed its quota (due to, for example, a high profile launch), you can take action to improve your application's adoption:<br />
<br />
<ol>
<li>If your application has reached its total new user cap, submit the <a href="https://support.google.com/code/contact/oauth_app_verification">OAuth Developer Verification Form</a> to request OAuth verification. Once granted, verification removes the new user cap. </li>
<li>If your application is running into the new user authorization rate limit, you can <a href="https://support.google.com/code/contact/oauth_quota_increase">request a rate limit quota increase</a> for the application. </li>
</ol>
We will actively monitor every application’s quota usage and take proactive steps to contact any developer whose application is approaching its quota. This should help prevent interruption due to these quotas for non-malicious developers on our platform.<br />
<br />
These enhanced protections will help protect our users and create an OAuth ecosystem where developers can continue to grow and thrive in a safer environment.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-53967705002372466992018-05-31T10:30:00.000-07:002018-05-31T11:42:56.042-07:00Introducing the Data Studio Community Connector Codelab<i>Cross-posted from the <a href="https://developers.googleblog.com/2018/05/introducing-data-studio-community.html">Google Developer blog</a> </i><br />
<i>Posted by <a href="https://twitter.com/_mkazi_">Minhaz Kazi</a>, Developer Advocate, Google Data Studio</i><br />
<br />
<span class="post-author"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://codelabs.developers.google.com/codelabs/community-connectors/#0"><img border="0" data-original-height="930" data-original-width="1222" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKllYov5-fxlF-2OViqkun61UJRRRkq0awjSF9yFAPrWOlbBOdXFmlKCEK-kDGUJUi13jn6vKhD2yBCkq4UeMQLtYLAvqWW19jOK-Y-SI2SQanIvMlL3rBsunFCo-pY-jfyenj4x6rsqA/s640/Data+Studio+Post+-+Image+1.png" width="640" /></a></div>
<span class="post-author"><br /></span><a href="https://datastudio.google.com/">Data Studio</a> is Google’s free next gen business intelligence and data visualization platform. <a href="https://developers.google.com/datastudio/connector/">Community Connectors</a> for Data Studio let you build connectors to any internet-accessible data source using Google Apps Script. You can build Community Connectors for commercial, enterprise, and personal use. Learn how to build Community Connectors using the <a href="https://codelabs.developers.google.com/codelabs/community-connectors">Data Studio Community Connector Codelab</a>.<br />
<h3>
Use the Community Connector Codelab </h3>
The <a href="https://codelabs.developers.google.com/codelabs/community-connectors">Community Connector Codelab</a> explains how Community Connectors work and provides a step by step tutorial for creating your first Community Connector. You can get started if you have a basic understanding of Javascript and web APIs. You should be able to build your first connector in 30 mins using the Codelab.<br />
<br />
If you have previously imported data into Google Sheets using Apps Script, you can use this Codelab to get familiar with the Community Connectors and quickly port your code to fetch your data directly into Data Studio.<br />
<h3>
Why create your own Community Connector </h3>
Community Connectors can help you to quickly deliver an end-to-end visualization solution that is user-friendly and delivers high user value with low development efforts. Community Connectors can help you build a reporting solution for personal, public, enterprise, or commercial data, and also do explanatory visualizations.<br />
<br />
<ul>
<li>If you provide a web based service to customers, you can create template dashboards or even let your users create their own visualization based on the users’ data from your service. </li>
<li>Within an enterprise, you can create serverless and highly scalable reporting solutions where you have complete control over your data and sharing features. </li>
<li>You can create an aggregate view of all your metrics across different commercial platforms and service providers while providing drill down capabilities. </li>
<li>You can create connectors to public and open datasets. Sharing these connectors will enable other users to quickly gain access to these datasets and dive into analysis directly without writing any code. </li>
</ul>
<br />
By building a Community Connector, you can go from scratch to a push button customized dashboard solution for your service in a matter of hours.<br />
<br />
The following dashboard uses Community Connectors to fetch data from Stack Overflow, GitHub, and Twitter. Try using the date filter to view changes across all sources:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpmTrneBAUqZi9tKE7md9Rj0fIh2br_bmghTk94-zQI2UNMv1tYZOSNFM-nZEOK_Ae1PgTfpWnwahCPxx1HSUUgrfgyokrP9heyEbiKKy3UW7pLKar9qIswOZjR7lyyJf7LMniB6gNYVc/s1600/Data+Studio+Post+-+Image+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="934" data-original-width="612" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpmTrneBAUqZi9tKE7md9Rj0fIh2br_bmghTk94-zQI2UNMv1tYZOSNFM-nZEOK_Ae1PgTfpWnwahCPxx1HSUUgrfgyokrP9heyEbiKKy3UW7pLKar9qIswOZjR7lyyJf7LMniB6gNYVc/s640/Data+Studio+Post+-+Image+2.png" width="419" /></a></div>
<br />
This dashboard uses the following Community Connectors:<br />
<ul>
<li><a href="https://datastudio.google.com/datasources/create?connectorId=AKfycbwGMj-oe532y-NEbMHo-KLUCEz0EEGOZj-3lhEgw7q65-hs-T_F9B3Qjw">Stack Overflow </a></li>
<li><a href="https://datastudio.google.com/datasources/create?connectorId=AKfycbznXTg6GiEc1xFG2ZCFMtLi_fx20bZwExAnP2jVLfsFdmW1qPO9eOeq">GitHub </a></li>
<li><a href="https://datastudio.google.com/datasources/create?connectorId=AKfycbxf9CYi-tgn_agZKS54xuq2U4gP3Igzy2ram4hwRDGw-p1p5225NPqaTw">Twitter </a></li>
</ul>
You can build your own connector to any preferred service and publish it in the <a href="https://developers.google.com/datastudio/connector/gallery/">Community Connector gallery</a>. The Community Connector gallery now has over 90 <a href="https://developers.google.com/datastudio/connector/pscc-requirements">Partner Connectors</a> connecting to more than 450 data sources.<br />
<br />
Once you have completed the Codelab, view the <a href="https://developers.google.com/datastudio/connector/">Community Connector documentation</a> and <a href="https://github.com/googledatastudio/community-connectors">sample code on the Data Studio open source repository</a> to build your own connector.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-4530135674246884582018-03-05T10:30:00.000-08:002018-03-05T13:49:46.590-08:00Make progress (bars) in presentations with Slides Add-ons<span class="post-author">Posted by <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="http://twitter.com/wescpy">@wescpy</a>), Developer Advocate and Grant Timmerman, Developer Programs Engineer, G Suite</span><br />
<br />
We <a href="http://goo.gl/sYL5AM">recently introduced</a> Google Slides Add-ons so developers can add functionality from their apps to ours. <a href="http://blog.google/products/g-suite/new-updates-in-slides-designed-make-you-look-good">Here are examples</a> of Slides Add-ons that some of our partners have already built—remember, you can also <a href="https://developers.google.com/apps-script/add-ons/">add functionality</a> to other apps outside of Slides, like Docs, Sheets, <a href="http://goo.gl/Unwwtb">Gmail</a> and more.<br />
<br />
When it comes to Slides, if your users are delivering a presentation or watching one, sometimes it's good to know how far along you are in the deck. Wouldn't it be great if Slides featured progress bars? <br />
In the latest episode of the <a href="http://goo.gl/JpBQ40">G Suite Dev Show</a>, G Suite engineer Grant Timmerman and I show you how to do exactly that—implement simple progress bars using a Slides Add-on.<br />
<br />
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/mKuINIBrR1g" width="640"></iframe>
Using <a href="http://developers.google.com/apps-script">Google Apps Script</a>, we craft this add-on which lets users turn on or hide progress bars in their presentations. The progress bars are represented as appropriately-sized rectangles at the bottom of slide pages. Here's a snippet of code for <span id="docs-internal-guid-8a949cc4-f757-ac7d-e633-ddab24f2260e"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">createBars()</span></span>, which adds the rectangle for each slide.<br />
<br />
<pre><code>var BAR_ID = 'PROGRESS_BAR_ID';
var BAR_HEIGHT = 10; // px
var presentation = SlidesApp.getActivePresentation();
function createBars() {
var slides = presentation.getSlides();
deleteBars();
for (var i = 0; i < slides.length; ++i) {
var ratioComplete = (i / (slides.length - 1));
var x = 0;
var y = presentation.getPageHeight() - BAR_HEIGHT;
var barWidth = presentation.getPageWidth() * ratioComplete;
if (barWidth > 0) {
var bar = slides[i].insertShape(SlidesApp.ShapeType.RECTANGLE,
x, y, barWidth, BAR_HEIGHT);
bar.getBorder().setTransparent();
bar.setLinkUrl(BAR_ID);
}
}
}
</code></pre>
<br />
To learn more about this sample and see all of the code, check out <a href="https://developers.google.com/apps-script/guides/slides/samples/progress-bar">the Google Slides Add-on Quickstart</a>. This is just one example of what you can build using Apps Script and add-ons; <a href="http://goo.gl/sYL5AM">here’s another example</a> where you can create a slide presentation from a collection of images using a Slides Add-on.<br />
<br />
If you want to learn more about Apps Script, check out the <a href="http://developers.google.com/apps-script/guides/videos">video library</a> or view more examples of programmatically accessing Google Slides <a href="https://developers.google.com/slides/videos/">here</a>. To learn about using Apps Script to create other add-ons, check out <a href="http://developers.google.com/apps-script/add-ons">this page</a> in the docs.<br />
<br />Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-37289347548009673862018-02-28T09:00:00.000-08:002018-02-28T09:14:26.464-08:00Develop bot integrations with the Hangouts Chat platform and API<span class="post-author">Posted by Mike Sorvillo, Product Manager, Hangouts Chat and <a href="http://google.com/+WesleyChun" target="_blank">Wesley Chun</a> (<a href="http://twitter.com/wescpy" target="_blank">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
You might have seen that <a href="https://www.blog.google/products/g-suite/new-ways-help-teams-work-faster-and-smarter-g-suite/" target="_blank">we announced</a> new features in <a href="http://gsuite.google.com/" target="_blank">G Suite</a> to help teams transform how they work, including <a href="https://www.blog.google/products/g-suite/move-projects-forward-one-placehangouts-chat-now-available/" target="_blank">Hangouts Chat,</a> a new messaging platform for enterprise collaboration on web and mobile. Perhaps more interesting is that starting today you’ll be able to craft your own bot integrations using the <a href="https://developers.google.com/hangouts/chat" target="_blank">Hangouts Chat developer platform and API</a>.<br />
<br />
Now, you can create <a href="https://developers.google.com/hangouts/chat/concepts/bots" target="_blank">bots</a> to streamline work—automate manual tasks or give your users new ways to connect with your application, all with commands issued from chat rooms or direct messages (DMs). Here are some ideas you might consider:<br />
<ul>
<li>Create a bot that can complete simple tasks or query for information </li>
<li>Create a bot that can post asynchronous notifications in any room or DM </li>
<li>Use interactive UI cards to bring your message responses to life </li>
<li>Use Google Apps Script to <a href="https://developers.google.com/hangouts/chat/how-tos/bots-apps-script" target="_blank">create custom bots</a> for your colleagues or organization </li>
</ul>
For example, a bot can take a location from a user, <a href="https://developers.google.com/maps/documentation/static-maps/intro" target="_blank">look it up</a> using the <a href="https://developers.google.com/maps/documentation/" target="_blank">Google Maps API</a>, and display the resulting map right within the same message thread in Hangouts Chat. The bot output you see in the image below is generated from the Apps Script bot integration. It returns the JSON payload just below the same image shown on <a href="https://developers.google.com/hangouts/chat/reference/message-formats/cards#simple_example_whereis_bot" target="_blank">this page</a> in the documentation.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4o1ZvEQTDteqRSo7FZqq9fL8P5Cy4Hueq0w8E7pyXWlPGI_OuA_lRTVW-R2GbOAJ-GipgZxP3UkgfrEMM27Jf0g4U_alUdxuDpFMr6PIydwZMosUaq7h8Ej46GmcvpA_cWm-De3j0x6Q/s1600/whereisbot+%25281%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="908" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4o1ZvEQTDteqRSo7FZqq9fL8P5Cy4Hueq0w8E7pyXWlPGI_OuA_lRTVW-R2GbOAJ-GipgZxP3UkgfrEMM27Jf0g4U_alUdxuDpFMr6PIydwZMosUaq7h8Ej46GmcvpA_cWm-De3j0x6Q/s400/whereisbot+%25281%2529.png" width="400" /></a></div>
<br />
When messages are sent to an Apps Script bot, the <span id="docs-internal-guid-185eed8d-d9d8-4855-21e7-df0dbcc92c7e"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">onMessage() </span></span>function is called and passed an event object. The code below extracts the bot name as well as the location requested by the user. The location is then passed to Google Maps to create the static map as well as an <span id="docs-internal-guid-185eed8d-d9d8-a995-226c-ce5bbeb78eae"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">openLink</span></span> URL that takes the user directly to Google Maps if either the map or "Open in Google Maps" link is clicked.
<br />
<br />
<pre><code>function onMessage(e) {
var bot = e.message.annotations[0].userMention.user.displayName;
var loc = encodeURI(e.message.text.substring(bot.length+2));
var mapClick = {
"openLink": {
"url": "https://google.com/maps/search/?api=1&query=" + loc
}
};
return {
// see JSON payload in the documentation link above
};
}</code></pre>
<br />
Finally, this function returns everything Hangouts Chat needs to render a UI <a href="https://developers.google.com/hangouts/chat/concepts/cards" target="_blank">card</a> assuming the appropriate links, data and Google Maps API key were added to the response JSON payload. It may be surprising, but <b>this is the entire bot</b> and follows this common formula: get the user request, collate the results and respond back to the user.<br />
<br />
When results are returned immediately like this, it's known as a <i>synchronous</i> bot. Using the API isn't necessary because you're just responding to the HTTP request. If your bot requires additional processing time or must execute a workflow out-of-band, return immediately then post an <i>asynchronous</i> response when the background jobs have completed with data to return. <a href="https://developers.google.com/hangouts/chat/how-tos/bots-develop" target="_blank">Learn more</a> about bot implementation, its workflow, as well as synchronous vs. asynchronous responses.<br />
<br />
Developers are not constrained to using Apps Script, although it is perhaps one of the easiest ways to create and deploy bots. Overall, you can write and host bots on a variety of platforms:<br />
<ul>
<li><a href="http://developers.google.com/apps-script" target="_blank">Google Apps Script</a> (JavaScript) </li>
<li><a href="http://cloud.google.com/functions" target="_blank">Google Cloud Functions</a> (JavaScript) </li>
<li><a href="http://cloud.google.com/appengine" target="_blank">Google App Engine</a> (Python, Java, PHP, Go, and more) </li>
<li><a href="http://cloud.google.com/compute" target="_blank">Google Compute Engine</a> (your language, your stack, your instance) </li>
<li>Other public or private cloud</li>
</ul>
No longer are chat rooms just for conversations. With feature-rich, intelligent bots, users can automate tasks, get critical information or do other heavy-lifting with a simple message. We're excited at the possibilities that await both developers and G Suite users on the new <a href="http://developers.google.com/hangouts/chat" target="_blank">Hangouts Chat platform and API</a>.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-25548143016482378152018-02-13T08:42:00.002-08:002018-06-13T13:20:57.638-07:00Introducing the Gmail Developer Preview of AMP in Email <span class="post-author">Posted by Raymond Wainman, Software Engineer, Gmail</span><br />
<span class="post-author"><br /></span>
You may have heard of the open-source framework, <a href="https://www.ampproject.org/" target="_blank">Accelerated Mobile Pages</a> (AMP). It’s a framework for developers to create faster-loading mobile content on the web. Beyond simply loading pages faster, AMP now supports building a wide range of rich pages for the web. Today, we’re announcing AMP for Email so that emails can be formatted and sent as AMP documents. As a part of this, we’re also kicking off the Gmail Developer Preview of AMP for Email—so once you’ve built your emails, you’ll be able to test them in Gmail.<br />
<br />
AMP for Email opens up several new possibilities:<br />
<ul>
<li>Design interactive components for email using a large library of supported AMP components like <a href="https://ampbyexample.com/components/amp-carousel/" target="_blank">amp-carousel</a>, <a href="https://ampbyexample.com/components/amp-form/" target="_blank">amp-form</a>, <a href="https://ampbyexample.com/components/amp-bind/" target="_blank">amp-bind</a>, <a href="https://ampbyexample.com/components/amp-list/" target="_blank">amp-list</a> and more</li>
<li>Help your content stay up-to-date and interactive for your users.</li>
<li>Create more engaging and actionable email experiences</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVz3tz8Snu5wYlRoXRWZ53FEdG1CqKQNHKW0l4dkMNL7rKlq6PQYMaXphHrOXxGOk1rQTPnCiwXARwmKmUmmZP-QWextluXRBlJfp9XNjpGHFf2GGBZV7-6Q3mPQiVXjrjLpLFNDCFbQk/s1600/GmailAMP-Pinterest-Blog-01+%25281%2529.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVz3tz8Snu5wYlRoXRWZ53FEdG1CqKQNHKW0l4dkMNL7rKlq6PQYMaXphHrOXxGOk1rQTPnCiwXARwmKmUmmZP-QWextluXRBlJfp9XNjpGHFf2GGBZV7-6Q3mPQiVXjrjLpLFNDCFbQk/s640/GmailAMP-Pinterest-Blog-01+%25281%2529.gif" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Browse and save your favorite items on Pinterest</td></tr>
</tbody></table>
Here’s an example:<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<pre><code>
<!doctype html>
<html ⚡4email>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js">&lt'/script>
<!-- The AMP4email boilerplate. -->
<style amp4email-boilerplate>body{visibility:hidden}</style>
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<script async custom-element="amp-selector" src="https://cdn.ampproject.org/v0/amp-selector-0.1.js"></script>
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>
<style amp-custom> html{font-family: 'Roboto';}
...
</style>
</head>
<body>
<h2>Hello dear user,</h2>
<div class="photo-gallery">
<div class="text">Photos from your latest trips:
<span [text]="+selectedSlide + 1">1</span>/4</div>
<amp-selector layout="container" name="carousel-selector"...>
<amp-carousel controls width="430" height="80">
<amp-img ...></amp-img>
...
</amp-carousel>
</amp-selector>
<amp-carousel ...>
<amp-img ...></amp-img>
...
</amp-carousel>
<div class="trip-location">Please rate your trip location:</div>
<form id="rating" class="p2" method="post" ...>
<fieldset class="rating">
<input name="rating" type="radio" id="rating1" value="1" .../>
<label for="rating1" title="1 stars">★</label>
...
</fieldset>
<div submit-success>
<template type="amp-mustache">
<div class="text">Thanks for rating {{rating}} star(s)!</div>
</template>
</div>
</form>
</div>
</body>
</html>
[<a href="https://ampbyexample.com/playground/#url=https%3A%2F%2Fampbyexample.com%2Famp4mail%2Fgallery.html" target="_blank">Full example</a> in AmpByExample’s Playground]</code></pre>
<br />
The <a href="https://www.ampproject.org/docs/interaction_dynamic/amp-email-format" target="_blank">AMP for Email spec</a> is available today and will be supported in Gmail later this year. To get preview access to how Gmail will support AMP for Email, sign up <a href="https://gsuite.google.com/campaigns/index__amp-for-email.html" target="_blank">here</a>. Since it’s an open spec, we look forward to seeing other email clients adopt it, too.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-72302299797429714152018-01-25T12:00:00.000-08:002018-01-25T12:00:46.529-08:00Publish Gmail Add-ons to your domain<span class="post-author">Posted by Bikin Chiu, Software Engineer, Gmail</span><br />
<span class="post-author"><br /></span>
We <a href="https://gsuite-developers.googleblog.com/2017/10/gmail-add-ons-framework-now-available.html">extended the Gmail Add-on preview</a> toward the end of last year, so that developers can bring the functionality of <a href="https://gsuite.google.com/marketplace/category/works-with-gmail">business apps</a> they rely on directly into Gmail. Now, we’re also making it easier for you to develop and publish Gmail Add-ons <a href="https://gsuiteupdates.googleblog.com/2018/01/install-gmail-add-ons-for-your-domain.html">domain-wide</a>. Create add-ons for users to access tools directly in their inbox, like your company directory, HR tools or other CRM solutions.<br />
<br />
You can now:<br />
<ul>
<li><b><a href="https://developers.google.com/gmail/add-ons/how-tos/publish">Publish Gmail Add-ons</a> to users in your G Suite domain. </b>This lets you build and deploy custom add-ons for workflows or processes that are unique to your company.</li>
<li><b><a href="https://developers.google.com/gmail/add-ons/how-tos/install-unpublished">Install Gmail Add-ons for G Suite accounts</a></b> <b><i>before</i> they’re published.</b> This way, you can test your add-on before releasing widely in the workplace.</li>
<li><b>Plus, G Suite admins <a href="https://gsuiteupdates.googleblog.com/2018/01/install-gmail-add-ons-for-your-domain.html">can install add-ons for their domains</a>. </b>This helps G Suite users perform domain-wide installs for any add-on you build, so more people have the chance to try your add-on (or experiment with add-ons domain-wide).</li>
</ul>
Check out <a href="https://www.youtube.com/watch?v=9cDvkVCcIWE&feature=youtu.be&index=13&list=PLOU2XLYxmsIJJFx_MVCQJ7eWF3gDxklgJ">this video</a> to see what it’s like to build an add-on then start building it yourself with this hands-on <a href="https://codelabs.developers.google.com/codelabs/gmail-add-ons/#0">codelab</a>. You can also view <a href="https://gsuite.google.com/marketplace/category/works-with-gmail">already-built add-ons</a> in the <a href="https://gsuite.google.com/marketplace/">G Suite Marketplace</a>. Or, if you have another project in mind, <a href="https://docs.google.com/forms/d/e/1FAIpQLSdQD9F5TXZvlpQcY1I6fvaZqLvULG1THhou3y5IpRRwjgwZYg/viewform">submit your add-on idea</a> for consideration.<br />
<br />
We’re on a mission to make work easier and a big part of that means giving you the tools you need to speed up workflows. Build on!
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-7407975925220820622018-01-11T09:00:00.000-08:002018-01-11T10:17:41.082-08:003 new tools to help improve your Apps Script development and management experience<span class="post-author">Posted by Ted Bradley, Product Manager, G Suite Developer Platform, Paul McReynolds, Product Manager, G Suite Developer Platform and Grant Timmerman, Developer Programs Engineer, G Suite Developer Relations</span><br />
<br />
Apps Script has come a long way since we first launched scripting with Google Sheets. Now, Apps Script supports more than 5 million weekly active scripts that are integrated with a <a href="https://developers.google.com/apps-script/">host</a> of G Suite apps, and more than 1 billion daily executions.<br />
<br />
As developers increasingly rely on Apps Script for mission-critical enterprise applications, we've redoubled our efforts to improve its power, reliability and operational monitoring, like our recently announced <a href="https://gsuite-developers.googleblog.com/2017/08/stackdriver-logging-for-google-apps.html">integration with Stackdriver</a> for logging and error reporting. Today, we’re providing three new tools to help further improve your workflows and manage Apps Script projects:<br />
<ol>
<li><b>Apps Script dashboard</b>, to help you manage, debug and monitor all of your projects in one place. </li>
<li><b>Apps Script API</b>, so you can programmatically manage Apps Script source files, versions and deployments. </li>
<li><b>Apps Script Command Line Interface</b>, for easy access to Apps Script API functionality from your terminal and shell scripts. </li>
</ol>
<h3>
Apps Script dashboard </h3>
Over the next few weeks we’ll be making a new dashboard available to help you manage, debug and monitor all of your Apps Script projects from one place.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Bz011CM9aVAalQmEfgUaksl1JGWI7wum394FDj7yk_nej3cPkx95sUcVaX4TxEjoxinzmVUveqYBBBgslJkt_Njxigq_V-zFbqyk_lqOPZ9_mhy87VXV86IllunWjMoh9MPVDoIsP3M/s1600/Monitored+projects+%25281%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1352" data-original-width="1600" height="539" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Bz011CM9aVAalQmEfgUaksl1JGWI7wum394FDj7yk_nej3cPkx95sUcVaX4TxEjoxinzmVUveqYBBBgslJkt_Njxigq_V-zFbqyk_lqOPZ9_mhy87VXV86IllunWjMoh9MPVDoIsP3M/s640/Monitored+projects+%25281%2529.png" width="640" /></a></div>
In this new dashboard—available at <a href="http://script.google.com/">script.google.com</a>—you will be able to:<br />
<ul>
<li>View and search all of your projects. </li>
<li>Monitor the health and usage of projects you care about. </li>
<li>View details about individual projects. </li>
<li>View a log of project executions and terminate long-running executions. </li>
</ul>
Check out the <a href="https://developers.google.com/apps-script/guides/dashboard">documentation</a> for more detail on the dashboard. If you encounter any issues, please use the feedback link in the left column of the new dashboard or <a href="https://issuetracker.google.com/issues/new?component=329832&template=1028365">file a bug</a>.<br />
<h3>
Apps Script API </h3>
The new Apps Script dashboard is built on top of a powerful new Apps Script API which replaces and extends the <a href="https://developers.google.com/apps-script/api/how-tos/execute">Execution API</a>. This new <a href="https://developers.google.com/apps-script/api/">Apps Script API</a> provides a RESTful interface for developers to create, manage, deploy and execute their scripts from their preferred programming language. This gives you control to create development workflows and deployment strategies that fit your needs. With this new API, you can:<br />
<ul>
<li>Create, read, update and delete script projects, source files and versions. </li>
<li>Manage project deployments and entry points (<a href="https://developers.google.com/apps-script/guides/web">web app</a>, <a href="https://developers.google.com/apps-script/add-ons/">add-on</a>, <a href="https://developers.google.com/apps-script/api/how-tos/execute">execution</a>). </li>
<li>Obtain project execution metrics and process data. </li>
<li>Run script functions. </li>
</ul>
To learn more about the new Apps Script API, check out the <a href="https://developers.google.com/apps-script/api/concepts/">documentation</a>. If you encounter any issues please ask a question on <a href="https://stackoverflow.com/questions/tagged/google-apps-script">Stack Overflow</a> or <a href="https://issuetracker.google.com/issues/new?component=327918&template=1026870">file a bug</a>.<br />
<h3>
Apps Script Command Line Interface </h3>
Lastly, we’re pleased to introduce the first open-source client of the Apps Script API, a command-line interface tool called <span id="docs-internal-guid-bb7b79b9-e614-1850-8d1a-6535f1e7c5ec"><span style="background-color: white; font-family: "courier new"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">clasp</span></span> (<u>C</u>ommand <u>L</u>ine <u>A</u>pps <u>S</u>cript <u>P</u>rojects). <span id="docs-internal-guid-bb7b79b9-e614-1850-8d1a-6535f1e7c5ec"><span style="background-color: white; font-family: "courier new"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">clasp</span></span> allows you to access the management functionality of the Apps Script API with intuitive terminal commands and is available as an <a href="http://github.com/google/clasp">open-source project on GitHub</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBBO98RWIv6GtekauhsoJFMmYRJEgpb5KjN3hWyQTdbYwau_k4xfqcGBpRxbtN7z4ML34D2rssAZ6419yQHUQZxDwGKLLAig5zzI-zBpXchZ6qO-WOy9tNOBI8vmvQ2GNnIy1NM6-VkrM/s1600/claspblog8.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="323" data-original-width="660" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBBO98RWIv6GtekauhsoJFMmYRJEgpb5KjN3hWyQTdbYwau_k4xfqcGBpRxbtN7z4ML34D2rssAZ6419yQHUQZxDwGKLLAig5zzI-zBpXchZ6qO-WOy9tNOBI8vmvQ2GNnIy1NM6-VkrM/s640/claspblog8.gif" width="640" /></a></div>
<span style="background-color: white; font-family: "courier new"; font-size: 11pt; white-space: pre-wrap;">clasp </span>allows developers to create, pull and push Apps Script projects, plus manage deployments and versions with terminal commands and shell scripts. <span id="docs-internal-guid-bb7b79b9-e615-6307-7c09-85703190fc7d"><span style="background-color: white; font-family: "courier new"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">clasp</span></span> also allows you to write and maintain your Apps Script projects using the development tools of your choice including your native IDE, Git and GitHub.<br />
<br />
To get started, try the <a href="http://g.co/codelabs/clasp"><span id="docs-internal-guid-bb7b79b9-e615-6307-7c09-85703190fc7d"><span style="background-color: white; font-family: "courier new"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">clasp</span></span> codelab</a>. You can file issues or ask questions on the <a href="https://github.com/google/clasp"><span id="docs-internal-guid-bb7b79b9-e615-6307-7c09-85703190fc7d"><span style="background-color: white; font-family: "courier new"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">clasp</span></span> project GitHub page</a>.<br />
<br />
We’re doubling down on powerful platforms like Apps Script. We hope these new additions help ease your development process.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-88907476208037857802017-12-13T08:00:00.000-08:002017-12-13T08:06:46.444-08:00Hangouts Meet now available in the Google Calendar API <span class="post-author">Posted by Ernesta Orlovaitė, Product Manager, Google Calendar API and <a href="https://plus.google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
Thousands of developers use <a href="https://developers.google.com/google-apps/calendar/">Google Calendar API</a> to read, create and modify <a href="http://calendar.google.com/">Google Calendar</a> events, and quite often, these events represent meetings happening not just face-to-face but also remotely. <a href="https://www.blog.google/products/g-suite/meet-the-new-enterprise-focused-hangouts/">We introduced</a> Hangouts Meet earlier this year to give users richer conference experiences, adding video call links and phone numbers for <a href="https://support.google.com/a/answer/7284269">G Suite Enterprise</a>. Starting today, we are making it possible to access all that conference information through the <a href="https://developers.google.com/google-apps/calendar/">Google Calendar API</a>. With this update, developers can now:<br />
<ul>
<li>Read conference data associated with events </li>
<li>Copy conference data from one event to another </li>
<li>Request new conference generation for an event </li>
</ul>
The API supports all Hangouts versions.<br />
<h3>
Reading conference data </h3>
Conference information is stored in a new <a href="https://developers.google.com/google-apps/calendar/v3/reference/events">event</a> attribute called <span id="docs-internal-guid-d6315e80-476b-0d9a-aff0-da1cd834380a"><span style="font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">conferenceData</span></span>. conferenceData provides information about the solution that was used to create the conference (such as Hangouts Meet) and a set of entry points (like a video call link and phone number). Everything the user needs to know to join a conference call is there.<br />
<br />
To help you build even better user experiences, we also give you access to icons and user-readable labels that you can use in your products. In JSON format, <span id="docs-internal-guid-d6315e80-476b-46a8-c97f-b0e20051a871"><span style="font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">conferenceData</span></span> looks something like this (of course, your actual meeting IDs and phone numbers will vary):
<br />
<pre><code>"conferenceData": {
"entryPoints": [
{
"entryPointType": "video",
"uri": "https://meet.google.com/wix-pvpt-njj",
"label": "meet.google.com/wix-pvpt-njj"
},
{
"entryPointType": "more",
"uri": "https://tel.meet/wix-pvpt-njj?pin=1701789652855",
"pin": "1701789652855"
},
{
"entryPointType": "phone",
"uri": "tel:+44-20-3873-7654",
"label": "+44 20 3873 7654",
"pin": "6054226"
}
],
"conferenceSolution": {
"key": {
"type": "hangoutsMeet"
},
"name": "Hangouts Meet",
"iconUri": "https://blogger.googleusercontent.com/img/proxy/AVvXsEiaSY9_YfMdiWryFlVhzIs3jdKPPiVuvOTO4I2Roz_qnNGdmlz30rPKsRQpH_zL9sBemoQxmsA-Djl4q_jhz1-as83Gq-49NjORxptsEGxLEp4stip8yhdVitDBWRjGoECBYqs7fbAaINxFem2mwR8pCQXsn1dvNRegYieao0vH5kxDUWsI20mcOka_r5ha_zusG4YlXHa2mzRjZOc="
},
"conferenceId": "wix-pvpt-njj",
"signature": "ADwwud9tLfjGQPpT7bdP8f3bq3DS"
}
</code></pre>
<br />
And this, for example, is how you would retrieve and display conference solution name and icon:<br />
<pre><code>var solution = event.conferenceData.conferenceSolution;
var content = document.getElementById("content");
var text = document.createTextNode("Join " + solution.name);
var icon = document.createElement("img");
icon.src = solution.iconUri;
content.appendChild(icon);
content.appendChild(text);</code></pre>
The result of the code above will look like this in the user interface:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiioOV_EvqotkmvTo12R14LLFdTZX1ZPWf4kdr7WdAMktmcfyiE4GwaeW8EbrlLrAg2Q7eY2Urp6pzO2WsYJw2wwyBab2YhuEDqNrFuGGEmiXsRLBIERfl_xcU2AT-92uIP6khOXxs-LCk/s1600/Screen+Shot+2017-12-11+at+4.05.16+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="53" data-original-width="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiioOV_EvqotkmvTo12R14LLFdTZX1ZPWf4kdr7WdAMktmcfyiE4GwaeW8EbrlLrAg2Q7eY2Urp6pzO2WsYJw2wwyBab2YhuEDqNrFuGGEmiXsRLBIERfl_xcU2AT-92uIP6khOXxs-LCk/s1600/Screen+Shot+2017-12-11+at+4.05.16+PM.png" /></a></div>
<h3>
Copying conferences across events </h3>
Sometimes displaying information is not enough—you might want to update it as well. This is especially true when scheduling multiple Calendar events with the same conference details. Say you’re developing a recruiting application that sets up separate events for the candidate and the interviewer; you want to protect the interviewer’s identity, but you also want to make sure all participants join the same conference call. To do this, you can now copy conference information from one event to another by simply writing to conferenceData.<br />
<br />
To ensure that only existing Hangouts conferences are copied, and to help safeguard your users against malicious actors, copied conference data will always be verified by the Google Calendar API using the signature field, so don’t forget to copy it too.<br />
<h3>
Creating a new conference for an event </h3>
Finally, the API allows developers to request conference creation. Simply provide a conferenceData.createRequest and set the conferenceDataVersion request parameter to 1 when creating or updating events. Conferences are created asynchronously, but you can always check the status of your request to let your users know what’s happening.
For example, to request conference generation for an existing event (again, your request and event IDs will be different):
<br />
<pre><code>var eventPatch = {
conferenceData: {
createRequest: {requestId: "7qxalsvy0e"}
}
};
gapi.client.calendar.events.patch({
calendarId: "primary",
eventId: "7cbh8rpc10lrc0ckih9tafss99",
resource: eventPatch,
sendNotifications: true,
conferenceDataVersion: 1
}).execute(function(event) {
console.log("Conference created for event: %s", event.htmlLink);
});</code></pre>
The immediate response to this call might not yet contain the fully-populated conferenceData which is indicated by status pending:<br />
<pre><code>"conferenceData": {
"createRequest": {
"requestId": "7qxalsvy0e",
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"status": {
"statusCode": "pending"
}
}
}</code></pre>
Once the <span id="docs-internal-guid-d6315e80-4774-7bee-c732-d3966b6eec17"><span style="font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">statusCode</span></span> changes to success, the conference information is populated.
Finally, if you are developing a Google Calendar client, you might also want to know beforehand which of the three Hangouts solutions (consumer Hangouts, classic Hangouts and Hangouts Meet) will be used to create the conference. You can get that information by checking <span id="docs-internal-guid-d6315e80-4774-ad7c-3151-ee7a214a66a9"><span style="font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">allowedConferenceSolutionTypes</span></span> in a <a href="https://developers.google.com/google-apps/calendar/v3/reference/calendars">calendar</a>’s <span id="docs-internal-guid-d6315e80-4775-1981-d4bd-e91b67b308fa"><span style="font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">conferenceProperties</span></span>.<br />
<br />
To get started, check out the <a href="https://developers.google.com/google-apps/calendar/create-events#conferencing">documentation page</a> for managing conference data. We can’t wait to see what you build with these new features in the Google Calendar API.Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-61041323885445471412017-11-28T09:00:00.000-08:002017-11-28T10:26:29.964-08:00Committed to storage APIs, retiring Realtime API<span class="post-author">Posted by Paul McReynolds, Product Manager, G Suite Developer Platform</span><br />
<span class="post-author"><br /></span>
We <a href="https://gsuite-developers.googleblog.com/2013/03/build-collaborative-apps-with-google.html">launched</a> Google Realtime API in 2013 to help developers build collaborative apps using familiar JSON-based data models, while leaving the complexities of real-time synchronization to the API. Since then, we've developed other fast, flexible cloud-based storage solutions like <a href="https://cloud.google.com/sql">Google Cloud SQL</a> and <a href="https://firebase.google.com/docs/firestore/">Google Cloud Firestore</a>. As a result, we’ve decided to deprecate <a href="https://developers.google.com/google-apps/realtime/overview">Realtime API</a> in favor of these new, powerful solutions.<br />
<br />
We’re investing heavily in Google Cloud Platform, as well as <a href="https://firebase.google.com/">Firebase</a>—our mobile development platform—to help developers build scalable, performant applications. While these solutions aren't a direct analog to the Drive Realtime API, we're confident they can meet most of your needs:<br />
<ul>
<li><a href="https://cloud.google.com/sql/">Google Cloud SQL</a>: Fully-managed database service that makes it easy to set up, maintain, manage, and administer your relational PostgreSQL and MySQL databases in the cloud. </li>
<li><a href="https://firebase.google.com/products/realtime-database/">Firebase Realtime Database</a>: Cloud-hosted NoSQL database that lets you store and sync data between your users in real-time. </li>
<li><a href="https://firebase.google.com/docs/firestore/">Google Cloud Firestore</a>: We recently <a href="https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html">announced</a> Cloud Firestore to help developers build responsive apps that work regardless of network latency or Internet connectivity. If you're curious about Firebase Realtime Database vs. Cloud Firestore, we've got you <a href="https://firebase.googleblog.com/2017/10/cloud-firestore-for-rtdb-developers.html">covered</a>.</li>
</ul>
Existing Realtime API client applications will continue to work normally until <b>December 11, 2018</b>, but we are no longer accepting new clients of the API. After the API is decommissioned, to facilitate migration, we will continue to provide a mechanism for applications to access document contents as JSON.<br />
<h3>
More specific deprecation timelines </h3>
We know developers and partners have come to rely on Realtime API and that migration may be a significant effort. We hope that the deprecation timelines summarized below allow for a smooth transition.<br />
<span id="docs-internal-guid-b8874361-ffe9-7438-218e-7d143d11e8fb"><br /></span>
<br />
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="166"></col><col width="458"></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">November 28, 2017</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Realtime API is no longer available for new projects.</span><span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 6.6pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: super; white-space: pre;">1</span></div>
</td></tr>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">December 11, 2018</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Realtime API documents become read-only, and attempts to modify document contents using the API fail.</span></div>
</td></tr>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">January 15, 2019</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "roboto"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Realtime API is shut down, but a JSON export API remains available.</span></div>
</td></tr>
</tbody></table>
</div>
<span id="docs-internal-guid-b8874361-ffe9-e111-fa38-fe5a8744f0c2" style="font-weight: normal;"><i><span style="font-family: "roboto"; font-size: 6pt; vertical-align: super; white-space: pre-wrap;">1</span><span style="font-family: "roboto"; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"> Projects which accessed the Realtime API prior to November 28, 2017 will continue to function as before. All other projects, including new projects, will be blocked from accessing the Realtime API.</span></i></span><br />
<h3>
Migration tips </h3>
Applications using the Realtime API will need to migrate to another data store. Our <a href="https://developers.google.com/google-apps/realtime/migration">migration guide</a> provides instructions on how to export Realtime document data and also how that data can be imported into Google Cloud Firestore.
After Realtime API is shut down, we will continue to provide a means for exporting Realtime document contents as JSON.<br />
<h3>
Additional information and support </h3>
You can read more about the deprecation in our <a href="https://developers.google.com/google-apps/realtime/deprecation">documentation</a>. If you have questions that aren’t answered there, see the <a href="https://developers.google.com/google-apps/realtime/support">support page</a> for how to get help.Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-62136974812192313032017-10-24T10:00:00.000-07:002017-10-24T10:18:42.884-07:00Gmail add-ons framework now available to all developers<span class="post-author">Posted by <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
Email remains at the heart of how companies operate. That’s why earlier this year, <a href="https://gsuite-developers.googleblog.com/2017/03/bring-power-of-your-apps-into-gmail_9.html">we previewed Gmail Add-ons</a>—a way to help businesses speed up workflows. Since then, we’ve seen partners build awesome applications, and beginning today, we’re extending the Gmail add-on preview to include all developers. Now anyone can start building a Gmail add-on.<br />
<br />
Gmail Add-ons let you integrate your app into Gmail and extend Gmail to handle quick actions.
They are built using native UI <a href="http://developers.google.com/gmail/add-ons/concepts/cards">context cards</a> that can include simple text dialogs, images, links, buttons and forms. The add-on appears when relevant, and the user is just a click away from your app's rich and integrated functionality.<br />
<br />
Gmail Add-ons are easy to create. You only have to write code once for your add-on to work on both web and mobile, and you can choose from a rich palette of widgets to craft a custom UI. Create an add-on that contextually surfaces cards based on the content of a message. Check out this video to see how we created an add-on to collate email receipts and expedite expense reporting.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/9cDvkVCcIWE" width="640"></iframe>
Per the video, you can see that there are three components to the app’s core functionality. The first component is <span id="docs-internal-guid-bd0378fa-4ef8-022e-81c8-def62aacf63b"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">getContextualAddOn()</span></span>—this is the entry point for all Gmail Add-ons where data is compiled to build the card and render it within the Gmail UI. Since the add-on is processing expense reports from email receipts in your inbox, the <span id="docs-internal-guid-bd0378fa-4ef8-351e-2ad7-bff619e915ea"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">createExpensesCard()</span></span>parses the relevant data from the message and presents them in a form so your users can confirm or update values before submitting. Finally, <span id="docs-internal-guid-bd0378fa-4ef8-9173-7133-3e83ee57d8b1"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">submitForm()</span></span> takes the data and writes a new row in an “expenses” spreadsheet in Google Sheets, which you can edit and tweak, and submit for approval to your boss.<br />
<br />
Check out the <a href="http://developers.google.com/gmail/add-ons">documentation</a> to get started with Gmail Add-ons, or if you want to see what it's like to build an add-on, go to the <a href="http://g.co/codelabs/gmail-add-ons">codelab</a> to build <a href="https://github.com/googlecodelabs/gmail-add-ons">ExpenseIt</a> step-by-step. While you can't publish your add-on just yet, you can <a href="https://goo.gl/forms/gAOLHBTnSq8yKaQ53">fill out this form</a> to get notified when publishing is opened. We can’t wait to see what Gmail Add-ons you build!
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-5898757615233881602017-10-12T10:00:00.000-07:002017-10-12T10:23:55.229-07:00[Q&A] Behind the scenes with Lucidchart: building new diagramming add-on in Google Slides<span class="post-author">Posted by Robert Kapanen, Sector Lead, Partner Integrations at Google Cloud and Tim Winchester, Engineering Lead at Lucidchart</span><br />
<span class="post-author"><br /></span>
You might have seen that we <a href="https://gsuite-developers.googleblog.com/2017/09/generating-google-slides-from-images.html">recently announced</a> new Google Slides add-ons. We worked closely with several technology partners to build these new add-on solutions to help speed up workflows.
<br />
<br />
One partner, <a href="https://www.lucidchart.com/">Lucidchart</a>, worked closely with Google to create a new integration that brings added diagramming functionality to Slides. We sat down with Tim Winchester, engineering lead at Lucidchart, to learn more about how his team built the <a href="https://www.lucidchart.com/blog/announcing-lucidchart-diagrams-for-google-slides">new Lucidchart add-on for Slides</a>.<br />
<h3>
Tell us about the Google Slides add-on you built for Lucidchart. </h3>
We built it as a sidebar add-on that allows users to insert diagrams directly into Google Slides from within Slides (instead of having to export diagrams from Lucidchart). You can also create a new Lucidchart diagram from within Slides, and simply select “Back to Slides” once you’re finished creating your diagram in the Lucidchart editor. You can modify an existing diagram by clicking “Edit” within Slides. This option will direct you to the Lucidchart editor so you can revise as needed. Once you’ve finished revising, or any time you know a diagram has been updated in Lucidchart, select the refresh button from the Lucidchart Diagrams sidebar.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOnuqKo1jpXBXX4IuGhNTA_Pr3bM68jleiPSkceFFRPK_aeLLnHA9pJwmQWh7db2WNGt9QbqzbVjvPQVkBb7z1O0CPce2OfI7Cr9FiM6Lkzbt4glhN-8N_0sriLNOtepT4UOzJHm3GWrM/s1600/Lucidchart+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1564" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOnuqKo1jpXBXX4IuGhNTA_Pr3bM68jleiPSkceFFRPK_aeLLnHA9pJwmQWh7db2WNGt9QbqzbVjvPQVkBb7z1O0CPce2OfI7Cr9FiM6Lkzbt4glhN-8N_0sriLNOtepT4UOzJHm3GWrM/s640/Lucidchart+1.png" width="640" /></a></div>
<br />
<h3>
What prompted you to create your add-on? </h3>
Specifically, how did you envision your add-on would improve user experience?
Lucidchart is a visual communication platform, but we know our users sometimes need to have their diagrams available in other places. One of the most popular uses for Lucidchart is in presentations, so an add-on for Slides was a natural fit.<br />
<h3>
Tell us about how you built your solution. </h3>
Since we already had existing add-ons for <a href="https://chrome.google.com/webstore/detail/lucidchart-diagrams/klhpiejgjijjcglpcaanggahphcgckpm">Docs</a> and <a href="https://chrome.google.com/webstore/detail/lucidchart-diagrams-for-s/ilphpcjkaeejldodghgfkdedmfpkhlni">Sheets</a>, this project was less about building from scratch and more about adapting what we already had, then doing rewrites as needed. We started by abstracting app-specific functionality of our existing add-ons into a pluggable <span id="docs-internal-guid-88618e7a-116b-98af-aec4-85a0d09cf9e6"><span style="color: #222222; font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">IntegratedApp</span></span> interface. We then implemented the interface for Slides using the new <span id="docs-internal-guid-88618e7a-116b-e4f8-f7c3-66d4c69e3c70"><a href="https://developers.google.com/apps-script/reference/slides/slides-app" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">SlidesApp</span></a></span> API. Once we had reached feature parity, we created a few new additions, such as a “Refresh All Inserted Diagrams” button, which users could find more easily than a top bar menu entry.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKLHexYOrwCGc418hg0MGxgOv3MAYvbMcIp2AH2vrpewQIbtKwCTlU8kMcVs1TgcK9o-0cVtq9niWyISBSEG1A6ctiBhGUwuR08mzAmd_4JtzHanSItDWEeS0IDSpPQvCKstm3jhfQnus/s1600/Lucidchart+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1054" data-original-width="1202" height="560" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKLHexYOrwCGc418hg0MGxgOv3MAYvbMcIp2AH2vrpewQIbtKwCTlU8kMcVs1TgcK9o-0cVtq9niWyISBSEG1A6ctiBhGUwuR08mzAmd_4JtzHanSItDWEeS0IDSpPQvCKstm3jhfQnus/s640/Lucidchart+2.png" width="640" /></a></div>
<br />
<br />
At the same time, the Lucidchart add-on was undergoing a major UI overhaul, which was the most challenging and time-intensive part of the project. Because we liked the results of the UI update in Slides, we refactored the add-on code to make it more generalizable, then ported it back to our Docs and Sheets add-ons.<br />
<h3>
Did anything surprise you during the build? </h3>
As a security measure, the sidebar iframe can only render elements within its borders, so we couldn’t simply throw a <div> into the center of the screen in client code. Instead, we had to fire an event that the Apps Script backend would handle to create a modal dialog, using printing scriptlets to add whatever data we needed into the dialog’s <span id="docs-internal-guid-88618e7a-1182-899b-3e85-f87a1f890945"><span style="color: #222222; font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">HTML</span></span>. Thus, any <span id="docs-internal-guid-88618e7a-1182-b3cb-e807-b6e8d168684b"><span style="color: #222222; font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">JS</span></span> object sent from the sidebar to a modal has to be serialized and deserialized in the process, which means that the sidebar cannot directly detect any events emitted by the modal.<br />
<h3>
Do you have any code snippets that you can share? </h3>
Because we have multiple Google Apps Script add-ons that share lots of functionality, it was very useful to concentrate app-specific code and strings into a wrapper object (called <span id="docs-internal-guid-88618e7a-1183-2317-8f60-0f457c9bd142"><span style="color: #222222; font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">IntegratedApp</span></span>), which we then referenced elsewhere in the codebase instead of calling <span id="docs-internal-guid-88618e7a-1183-6b81-1ed9-56bc678e7043"><span style="color: #222222; font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">SlidesApp</span></span> directly. So, in the click handler for the insert button, instead of writing this...<br />
<pre><code>SlidesApp.getActivePresentation()
.getSelection()
.getCurrentPage()
.insertImage(image);
</code></pre>
<br />
...we write this.
<br />
<pre><code>IntegratedApp.insertImage(image);
</code></pre>
<br />
And then we keep the app-specific implementation in our IntegratedApp object (abridged for clarity):<br />
<pre><code>var IntegratedApp = {
// direct mapping to function
createAddonMenu: SlidesApp.getUi().createAddonMenu.bind(SlidesApp.getUi()),
// wrapper to create consistent behavior across apps
insertImage: function(image) {
return SlidesApp.getActivePresentation()
.getSelection()
.getCurrentPage()
.insertImage(image);
},
// app-specific strings
phrases: {
docType: 'Slide',
name: 'Google Slides',
nameWithDocType: 'Google Slides Presentation'
}
};
</code></pre>
<br />
This technique allows us to keep the same UI code and business logic across apps; we only need to change the implementation of the <span id="docs-internal-guid-88618e7a-1186-db44-512e-11fcd3502655"><span style="color: #222222; font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">IntegratedApp</span></span> object. So in Sheets (for example), our <span id="docs-internal-guid-88618e7a-1187-179c-65d7-1eefe1655b2e"><span style="color: #222222; font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">IntegratedApp.insertImage()</span></span> function becomes:<br />
<pre><code>insertImage: function(image) {
var sheet = SpreadsheetApp.getActiveSheet();
var cell = sheet.getActiveCell();
sheet.insertImage(image, cell.getColumn(), cell.getRow());
}</code></pre>
<h3>
What advice would you give other developers looking to build similar add-ons? </h3>
If you are planning to develop multiple similar add-ons that mainly differ in the G Suite app with which they integrate, you should find this technique of reducing the overall code amount by isolating duplicative code immensely useful.<br />
<br />
After completing the first add-on, creating another add-on for a new G Suite app is just a matter of updating a new copy of <span id="docs-internal-guid-88618e7a-1189-0aac-c60a-a1f3ac8de2ec"><span style="color: #222222; font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">IntegratedApp</span></span> to work with the new app; the rest of the codebase can be commonly shared. In our case, it means that the updated UI was easily added to our Docs and Sheets add-on after we completed the Slides add-on.<br />
<br />
Learn more about how you can <a href="https://developers.google.com/apps-script/guides/slides/">create your own Slides add-ons</a> or choose from a number of <a href="https://developers.google.com/products/">publicly available APIs</a> to customize your G Suite applications. If you’re interested in becoming a Google Cloud technology partner, you can also <a href="https://cloud.google.com/partners/join/#apply">join our partnership program</a>.Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-7609035206210086472017-09-27T10:00:00.000-07:002017-09-27T11:48:52.532-07:00Generating Google Slides from images using Apps Script<span class="post-author">Posted by <a href="https://plus.google.com/+WesleyChun" target="_blank">Wesley Chun</a> (<a href="https://twitter.com/wescpy" target="_blank">@wescp</a>y), Developer Advocate, G Suite</span><br />
<br />
Today, we <a href="https://www.blog.google/products/g-suite/new-updates-in-slides-designed-make-you-look-good/" target="_blank">announced</a> a collection of exciting new features in Google Slides—among these is support for Google Apps Script. Now you can use <a href="https://developers.google.com/apps-script/guides/slides/" target="_blank">Apps Script for Slides</a> to programmatically create and modify Slides, plus customize menus, dialog boxes and sidebars in the user interface.<br />
<h3>
Programming presentations with Apps Script</h3>
Presentations have come a long way—from casting hand shadows over fires in caves to advances in lighting technology (<a href="https://en.wikipedia.org/wiki/Magic_lantern" target="_blank">magic lanterns</a>) to, eventually, (in)famous 35mm slide shows of your Uncle Bob's endless summer vacation. More recently, we have presentation software—like Slides—and developers have been able to write applications to create or update them. This is made even easier with the new Apps Script support for Google Slides. In the latest G Suite Dev Show episode, we demo this new service, walking you through a short example that automatically creates a slideshow from a collection of images.<br />
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/rTDz-Zcn7yk?list=PLOU2XLYxmsIJJFx_MVCQJ7eWF3gDxklgJ" width="640"></iframe> </div>
To keep things simple, the chosen images are already available online, accessible by URL. For each image, a new (blank) slide is added then the image is inserted. The key to this script are two lines of JavaScript (given an existing <span id="docs-internal-guid-11d04903-c06e-b888-1887-89a202334278"><span style="font-family: "roboto mono"; font-size: 11pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">presentation</span><span style="font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> </span></span>and a <span id="docs-internal-guid-11d04903-c06e-fdf4-27dd-d041e4813dd0"><span style="font-family: "roboto mono"; font-size: 11pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">link</span></span> to each image):
<br />
<br />
<pre><code>var slide = presentation.appendSlide(SlidesApp.PredefinedLayout.BLANK);
var image = slide.insertImage(link);
</code></pre>
<br />
The first line of code adds a new slide while the other inserts an image on the new slide. Both lines are repeated for each image in the collection. While this initial, rudimentary solution works, the slide presentation created doesn't exactly fit the bill. It turns out that adding a few more lines make the application <i>much</i> more useful. See the video for all the details.<br />
<h3>
Getting started </h3>
To get started, <a href="https://developers.google.com/apps-script/guides/slides/" target="_blank">check the documentation</a> to learn more about Apps Scripts for Slides, or check out the <a href="https://developers.google.com/apps-script/guides/slides/samples/translate" target="_blank">Translate</a> and <a href="https://developers.google.com/apps-script/guides/slides/samples/progress-bar" target="_blank">Progress Bar</a> sample Add-ons. If you want to dig deeper into the code sample from our video, take a look at the <a href="https://developers.google.com/apps-script/articles/image-slides" target="_blank">corresponding tutorial</a>. And, if you love watching videos, check out our <a href="https://developers.google.com/apps-script/guides/videos" target="_blank">Apps Script video library</a> or other <a href="https://www.youtube.com/playlist?list=PLOU2XLYxmsIJJFx_MVCQJ7eWF3gDxklgJ" target="_blank">G Suite Dev Show episodes</a>. If you wish to build applications with Slides outside of the Apps Script environment and want to use your own development tools, you can do so with the Slides (REST) API—check out its <a href="https://developers.google.com/slides/" target="_blank">documentation</a> and <a href="http://developers.google.com/slides/videos" target="_blank">video library</a>.<br />
<br />
With all these options, we look forward to seeing the applications you build with Google Slides!Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-73042888910580041442017-09-26T09:00:00.000-07:002017-09-26T09:00:04.934-07:00Back to school with enhancements to the Classroom API<span class="post-author">Posted by Andrew Garrett, Software Engineer, Google Classroom</span><br />
<br />
<a href="http://classroom.google.com/" target="_blank">Google Classroom</a> makes it easy for teachers and students to use the edtech tools they love, and that’s not just limited to Google tools. With the <a href="https://developers.google.com/classroom/" target="_blank">Classroom API</a>, hundreds of developers have built integrations with Classroom that make it easier for admins and teachers to manage classes, share content and more.<br />
<br />
One popular way that applications integrate with Classroom is by re-using Classroom rosters—teachers can import their classes with a click and students don’t have to have a new login. Today, we’re making it easier for developers to keep rosters in-sync between their apps and Classroom by launching <a href="https://developers.google.com/classroom/guides/push-notifications" target="_blank">real-time notifications</a> of changes.<br />
<br />
Now, an application can now receive roster changes for a domain, or for an individual course. Powered by <a href="https://cloud.google.com/pubsub/" target="_blank">Google Cloud Pub/Sub</a>, a state-of-the-art messaging service for passing information between applications, developers no longer have to poll various Classroom API endpoints for changes, which gives teachers and students a more seamless experience. If a new student joins or leaves a Classroom class, that roster change can be automatically applied across applications.<br />
<h3>
How Flat Education syncs rosters in real-time </h3>
<a href="https://flat.io/edu" target="_blank">Flat Education</a>, a collaborative music notation app, uses the new updates to instantly update class rosters. Before, when teachers and students accessed the Flat Education application, it would poll the Classroom API for changes and then make updates, delaying data. Now, roster data can be refreshed instantly.
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7UwSf9uiNASxb8GZCD742eserUPN5QqOBlmbXwmV6J-DYifXh6HgVLYtzAD0IrGT7MydBxL-eACrgYz7VpByRAWLIu5kSH38e-bVqJYQJbJ4NKQZM7KLm6V8OfhwuvfAOMuY0nmLT_uA/s1600/classroom-push.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="660" data-original-width="1600" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7UwSf9uiNASxb8GZCD742eserUPN5QqOBlmbXwmV6J-DYifXh6HgVLYtzAD0IrGT7MydBxL-eACrgYz7VpByRAWLIu5kSH38e-bVqJYQJbJ4NKQZM7KLm6V8OfhwuvfAOMuY0nmLT_uA/s640/classroom-push.gif" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">With today's Classroom API update, applications can sync roster data instantly. When a new student joins Google Classroom (bottom left), the student is instantly added to the corresponding music class in Flat Education (top right).</td></tr>
</tbody></table>
<br />We’re also making the Classroom API more comprehensive with additional enhancements so you can:<br />
<ul>
<li><b>Create and update <a href="https://developers.google.com/classroom/reference/rest/v1/courses.announcements" target="_blank">announcements</a>.</b> Last year, <a href="https://www.blog.google/topics/education/build-deeper-integrations-with-google/" target="_blank">we launched</a> the ability for external applications to access and create assignments and questions. This update gives applications access to all the posts in Classroom. </li>
<li><b>Create and update <a href="https://developers.google.com/classroom/reference/rest/v1/courses.courseWork" target="_blank">individualized posts</a>.</b> Earlier this year, <a href="https://www.blog.google/topics/education/new-google-classroom-features-make-it-easier-learn-teach-manage-and-build/" target="_blank">we made it possible</a> for teachers to post to individual students in Classroom and now, applications can do the same programmatically. This is especially helpful for applications that help teachers differentiate and individualize learning.</li>
</ul>
For more details on what you can build with the Classroom API, <a href="https://developers.google.com/classroom/" target="_blank">check out the documentation</a>. You can also <a href="https://stackoverflow.com/users/login?ssrc=anon_ask&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2fask%3ftags%3dgoogle-classroom" target="_blank">ask questions</a> (or answer them!) on StackOverflow using the <a href="https://stackoverflow.com/questions/tagged/google-classroom" target="_blank">google-classroom</a> tag, and report bugs or feature requests via the <a href="https://b.corp.google.com/savedsearches/566255" target="_blank">issue tracker</a>.<br />
<br />
Lastly, let us know what you're building using the #withClassroom hashtag on Twitter or Google+.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-60037889731852725682017-09-20T10:00:00.000-07:002017-09-20T10:01:41.996-07:00Monitoring the Apps Script issue tracker…with Apps Script<span class="post-author">Posted by Paul McReynolds, Product Manager (<a href="https://twitter.com/pauljmcr" target="_blank">@pauljmcr</a>), Apps Script and <a href="http://google.com/+WesleyChun" target="_blank">Wesley Chun</a> (<a href="https://twitter.com/wescpy" target="_blank">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
Apps Script is just as popular inside Google as it is among external users and developers. In fact, there are more than 70,000 weekly active scripts written by thousands of Googlers. One of our many uses for Apps Script at Google is to automate and monitor our internal issue tracker.<br />
<h3>
Your business depends on Apps Script...so does ours </h3>
In spring of this year, we migrated our G Suite issue trackers to a new system based on our internal tracker. This carries a lot of benefits, including improving our ability to track how issues reported from outside of Google relate to bugs and features we’re working on internally. We also have an internal Apps Script API that talks to our issue tracker, which we can now use to work with issues reported from outside of Google.<br />
<br />
As soon as the migration was finished, we put Apps Script to work monitoring…itself. Now we have a script in place that monitors Apps Script issues as they are reported and upvoted on the public tracker. When we see an issue that’s having widespread or sudden impact, the script generates an alert that we can then investigate. With the help of our large, active community of developers, and leveraging Apps Script, we’re now able to identify and respond to issues more quickly.<br />
<br />
There’s no substitute for independent monitoring, and our Apps Script-based approach isn’t the first or the last line of defense. Instead, this new script helps us catch anything that our monitoring systems miss by listening to what developers are saying on the tracker.<br />
<h3>
If you see something, say something </h3>
Please help us keep Apps Script humming! When you notice a problem, search the issue tracker for it and file an issue if it's new. Click the star to let us know you’re affected and leave a comment with instructions to reproduce, along with any other relevant details. Those instructions and other details help us respond to the issues more effectively, so please be sure to include them.<br />
<br />
Happy scripting!Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-49180413779340460202017-08-24T12:11:00.000-07:002017-08-24T12:11:12.636-07:00Stackdriver Logging for Google Apps Script is now available<span class="post-author">Posted by Paul McReynolds, Product Manager, Google Apps Script and <a href="https://plus.google.com/+RomainVialard-public" target="_blank">Romain Vialard</a>, Product Manager, Revevol</span><br />
<span class="post-author"><br /></span>
Google Apps Script has always provided a simple logging tool—the <span id="docs-internal-guid-cbe9236e-159b-358d-a9d0-d16e0e876294"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Logger</span></span> service—to help developers better test their scripts. This works for many simple use cases, but developers need other ways to log messages and errors, particularly when:<br />
<ul>
<li>Troubleshooting or analyzing scripts across multiple executions</li>
<li>Working on a script or add-on with multiple users </li>
<li>Looking for trends or insights about their scripts and users</li>
</ul>
To make Apps Script a friendlier environment for developers, we are announcing general availability of a new integration with <a href="https://cloud.google.com/stackdriver" target="_blank">Google Stackdriver</a>. This is in addition to the pre-existing <span id="docs-internal-guid-cbe9236e-159b-358d-a9d0-d16e0e876294"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Logger</span></span> service, which is still available.<br />
<h3>
Using Stackdriver Logging in Google Apps Script</h3>
Log messages can now be sent to <a href="http://cloud.google.com/logging" target="_blank">Stackdriver Logging</a> using the familiar <span id="docs-internal-guid-cbe9236e-159c-a5fe-8d28-c2f6dd33f1fa"><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">console.log()</span><span style="font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">, </span><span style="font-family: "roboto mono"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">console.info()</span><span style="font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">,</span></span> etc. functions. You can also instruct Apps Script to log messages and stack traces for all exceptions, which also become available for analysis in Stackdriver Error Reporting by simply checking a box. No need to add a single extra line of code.<br />
<br />
In Stackdriver, logs are kept for 7 days for free, and the <a href="https://cloud.google.com/stackdriver/pricing" target="_blank">premium tier</a> offers 30-day retention. Powerful search and filtering are available to quickly find log entries by text content or metadata, and developers can also choose to <a href="https://cloud.google.com/logging/docs/export/configure_export_v2" target="_blank">export logs</a> to BigQuery, Cloud Storage, and Cloud Pub/Sub for further analysis, long term conservation, and custom workflows.<br />
<br />
Log messages and errors are reported for all users of a script, with a unique but obfuscated identifier assigned to each user. This means log entries can be aggregated anonymously per user, for example allowing developers to count unique users impacted by an issue or analyze user behavior, but without logging users’ personally identifying information.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkYnAFq3iSSSnsxKpqi5lbkFZl8PB2uXtJJzQ8Qd2asSEQ-bw9UEkE72tJPrnB8K9bqVeHGbYieqPzm4Bh9ibgYQi80Q5vfZurH3hJnr2f488f5n6dmWss6ufVf5uoGEfNkEqQ-HjZIQk/s1600/Stackdriver+image+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="889" data-original-width="1600" height="353" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkYnAFq3iSSSnsxKpqi5lbkFZl8PB2uXtJJzQ8Qd2asSEQ-bw9UEkE72tJPrnB8K9bqVeHGbYieqPzm4Bh9ibgYQi80Q5vfZurH3hJnr2f488f5n6dmWss6ufVf5uoGEfNkEqQ-HjZIQk/s640/Stackdriver+image+1.png" width="640" /></a></div>
<br />
Developers get some of these aggregated analyses for free. In the Stackdriver Error Reporting tab of the developer console, you can see recurring errors and the numbers of users impacted. You can even subscribe to receive an email alert when a new type of error is detected.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcPBvYp2BDh5hVGE2Kl3JJvMoLRwGmN4Bp2FwXAxmBCXOMcsnAS-Zuy8-dhiAm8SQcVB22NqKzkN7nnjOK0KZBTan-YmjkKibaQwz_8Xqk_Fpmsg9Y5tjuFUgw2qsaISsOy3Dkv3LgIg/s1600/Stackdriver+image+-+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="746" data-original-width="1600" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcPBvYp2BDh5hVGE2Kl3JJvMoLRwGmN4Bp2FwXAxmBCXOMcsnAS-Zuy8-dhiAm8SQcVB22NqKzkN7nnjOK0KZBTan-YmjkKibaQwz_8Xqk_Fpmsg9Y5tjuFUgw2qsaISsOy3Dkv3LgIg/s640/Stackdriver+image+-+2.png" width="640" /></a></div>
<br />
<h3>
How developers are using Stackdriver Logging
</h3>
Developers of scripts and add-ons have started to rely more on more on this new logging capability. Romain Vialard, creator of <a href="https://chrome.google.com/webstore/detail/yet-another-mail-merge/mgmgmhkohaenhokbdnlpcljckbhpbmef" target="_blank">Yet Another Mail Merge</a>, a popular Google Sheets add-on, is using Stackdriver Logging to time the execution of his add-on, exporting data to BigQuery to perform aggregations and analyze trends. <a href="https://sites.google.com/site/scriptsexamples/learn-by-example/export-logs-to-bigquery" target="_blank">Read this tutorial</a> to learn how to export logs to BigQuery and run queries to analyze how users are interacting with your script.<br />
<br />
Stackdriver Logging is one of the ways we’re making Apps Script a more manageable platform for developers. We hope that it and other features coming soon make Apps Script developers more productive and their scripts, add-ons and integrations more robust.<br />
<br />
You can read more about how to enable and use the Stackdriver integration by reading Apps Script’s <a href="https://developers.google.com/apps-script/guides/logging#stackdriver_logging" target="_blank">logging documentation</a>.<br />
<h3>
About the authors </h3>
<a href="https://developers.google.com/experts/people/romain-vialard" target="_blank">Romain Vialard</a> is a <a href="https://developers.google.com/experts/about" target="_blank">Google Developer Expert</a>. After some years spent as a consultant, he is now focused on products for G Suite (formerly Google Apps) users, including add-ons such as <a href="https://chrome.google.com/webstore/detail/yet-another-mail-merge/mgmgmhkohaenhokbdnlpcljckbhpbmef" target="_blank">Yet Another Mail Merge</a> and <a href="https://chrome.google.com/webstore/detail/form-publisher/hgmhbdjdjoahflgfmfpjlgpplihlechm" target="_blank">Form Publisher</a>.<br />
<br />
<a href="https://cloudnext.withgoogle.com/speakers#target=paul-mcreynolds-f8499c13-7fa4-4557-891c-458740c5ade4" target="_blank">Paul McReynolds</a> is a Product Manager at Google focused on Apps Script and G Suite Marketplace. Previously a startup founder and CTO, Paul believes that the easy things need to be easy or the hard things don’t get done. At Google, he's excited to be a part of the company that makes solving problems for business fun again.<br />
<br />
<i>Editor's note: Yet Another Mail Merge and Form Publisher are not created, sponsored, or supported by Google.
</i>Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-33961456261620572822017-08-09T10:37:00.000-07:002017-08-09T10:48:27.066-07:00Introducing the Slides API Codelab<span class="post-author">Posted by <a href="https://plus.google.com/+GrantTimmerman">Grant Timmerman</a>, (<a href="https://twitter.com/granttimmerman">@granttimmerman</a>), Developer Platform Engineer, G Suite</span><br />
<br />
Last fall, we <a href="https://developers.googleblog.com/2016/11/introducing-google-slides-api.html">launched the Google Slides API</a>. Since then, partners, developers and others have been building apps and tools to programmatically create slides that work across desktop and mobile, like the ever popular <a href="https://github.com/googlesamples/md2googleslides">md2googleslides</a>.<br />
<br />
We recently released the <a href="https://codelabs.developers.google.com/codelabs/slides-api/#0">Slides API Codelab</a>, which walks you through an example of using Google’s BigQuery and Slide APIs to analyze 3.5 million repositories and create a “Top 10 OSS licenses” presentation. The codelab is a great exercise for learning the Slides API, especially if you have an interest in <b>big data, automating the creation of presentations or open source</b>.
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWX7noedbCevbW7bgxTNwKeb4eNg8x8ux2nirrGo7Hd0q64F0nLcnFhpIxM6RhDhyphenhyphenRez3bCc4j2o1QdxgfzZOXYCBUCYed1y3zVmCnCO6Jjn2CdzYd8N9E6ifI5ksk3WBpVVIOxLEHlPs/s1600/slides_api_codelab_code.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="554" data-original-width="1102" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWX7noedbCevbW7bgxTNwKeb4eNg8x8ux2nirrGo7Hd0q64F0nLcnFhpIxM6RhDhyphenhyphenRez3bCc4j2o1QdxgfzZOXYCBUCYed1y3zVmCnCO6Jjn2CdzYd8N9E6ifI5ksk3WBpVVIOxLEHlPs/s640/slides_api_codelab_code.png" width="640" /></a></td></tr></tbody></table>
<div class="tr-caption" style="text-align: center;">
<span style="font-family: inherit;">Preview of our Slides Codelab</span></div>
<br />
<h3>
Getting started with the Slides API Codelab </h3>
To get started, clone the repo. After running the starter script, you’ll find that creating a presentation is divided up into contained steps. These “TODOs” are shown when running the sample app in the <code>start</code> directory.
<br />
<pre><code>-- Start generating slides. --
TODO: Get Client Secrets
TODO: Authorize
TODO: Get Data from BigQuery
TODO: Create Slides
TODO: Open Slides
-- Finished generating slides. --
</code></pre>
<br />
To query GitHub, <a href="https://cloud.google.com/bigquery">BigQuery</a> has a <a href="https://cloud.google.com/bigquery/public-data/github">public dataset</a> all ready just for you! BigQuery allows you to query massive datasets on Google’s infrastructure in seconds. On <a href="https://bigquery.cloud.google.com/welcome" target="_blank">bigquery.cloud.google.com</a>, you can explore BigQuery’s public datasets or upload your own. In this codelab, we’re interested in open source licenses, so we'll query public repos on GitHub and grab their licenses.
<br />
<pre><code>WITH AllLicenses AS (
SELECT * FROM `bigquery-public-data.github_repos.licenses`
)
SELECT
license,
COUNT(*) AS count,
ROUND((COUNT(*) / (SELECT COUNT(*) FROM AllLicenses)) * 100, 2) AS percent
FROM `bigquery-public-data.github_repos.licenses`
GROUP BY license
ORDER BY count DESC
LIMIT 10
</code></pre>
<div class="tr-caption" style="text-align: center;">
<span style="font-family: inherit;">Our GitHub Open Source Licenses Query</span></div>
With an infinite number of public and private datasets out there, imagine all the data you can analyze with BigQuery and all the slide decks you can auto-generate with the Google Slides API! The goal of the Slides API Codelab is to get you up-to-speed quickly using both. For issues or questions regarding the Slides API or this codelab, ask us a question on <a href="https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgooglecodelabs%2Fslides-api%2Fissues%2Fnew" target="_blank">GitHub</a> or <a href="https://stackoverflow.com/questions/tagged/google-slides-api" target="_blank">Stack Overflow</a>.<br />
<br />
We can't wait to see what you build.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-1170932673352859912017-07-18T10:00:00.000-07:002017-07-18T14:05:59.801-07:00New security protections to reduce risk from unverified apps<span class="post-author">Posted by Naveen Agarwal, Identity team and <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
We’re constantly working to secure our users and their data. Earlier this year, we detailed some of our <a href="https://security.googleblog.com/2017/02/better-and-more-usable-protection-from.html">latest anti-phishing tools</a> and rolled-out <a href="https://developers.googleblog.com/2017/05/updating-developer-identity-guidelines.html">developer-focused updates</a> to our app publishing processes, risk assessment systems, and user-facing consent pages. Most recently, we introduced <a href="https://www.blog.google/products/g-suite/manage-access-third-party-apps-new-g-suite-security-controls/">OAuth apps whitelisting in G Suite</a> to enable admins to choose exactly which third-party apps can access user data.<br />
<br />
Over the past few months, we’ve required that some <i>new</i> web applications go through a verification process prior to launch based upon a dynamic risk assessment.<br />
<br />
Today, we’re expanding upon that foundation, and introducing additional protections: bolder warnings to inform users about newly created web apps and Apps Scripts that are pending verification. Additionally, the changes we're making will improve the developer experience. In the coming months, we will begin expanding the verification process and the new warnings to existing apps as well.<br />
<h3>
Protecting against unverified apps </h3>
Beginning today, we’re rolling out an “unverified app” screen for newly created web applications and Apps Scripts that require verification. This new screen replaces the “error” page that developers and users of unverified web apps receive today.<br />
<br />
The “unverified app” screen precedes the permissions consent screen for the app and lets potential users know that the app has yet to be verified. This will help reduce the risk of user data being phished by bad actors.
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiD9K3f_WcmrAbQLNRmvkABgsRGqJzhPbbDjo0alUK8uwResiMKvtIjjI8GTPFzT7ge4GeCYKJ2cKVGcP5yloLltijEY4kJh42cbU1uNwEww1uo3jp-XzGiX45BA6wbzKDzWToGhcFqIk/s1600/unverified-app-ui.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="772" data-original-width="556" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiD9K3f_WcmrAbQLNRmvkABgsRGqJzhPbbDjo0alUK8uwResiMKvtIjjI8GTPFzT7ge4GeCYKJ2cKVGcP5yloLltijEY4kJh42cbU1uNwEww1uo3jp-XzGiX45BA6wbzKDzWToGhcFqIk/s640/unverified-app-ui.gif" width="457" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The "unverified app" consent flow</td></tr>
</tbody></table>
<br />
This new notice will also help developers test their apps more easily. Since users can choose to acknowledge the ‘unverified app’ alert, developers can now test their applications without having to go through the OAuth client verification process first (see our <a href="https://developers.googleblog.com/2017/05/updating-developer-identity-guidelines.html">earlier post</a> for details).<br />
<br />
Developers can follow the steps laid out in <a href="https://support.google.com/cloud/answer/7454865">this help center article</a> to begin the verification process to remove the interstitial and prepare your app for launch.<br />
<h3>
Extending security protections to Google Apps Script </h3>
We’re also extending these same protections to <a href="https://developers.google.com/apps-script/">Apps Script</a>. Beginning this week, new Apps Scripts requesting OAuth access to data from consumers or from users in other domains may also see the "unverified app" screen. For more information about how these changes affect Apps Script developers and users, see the <a href="https://developers.google.com/apps-script/guides/client-verification">verification documentation page</a>.<br />
<br />
Apps Script is proactively protecting users from abusive apps in other ways as well. Users will see new cautionary language reminding them to “consider whether you trust” an application before granting OAuth access, as well as a banner identifying web pages and forms created by other users.
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUVvZ93Ahtpt9nJFubi5d2nilGbHwnqi9HOuF-q9nfRDMKOrwhUUqV4HeV9p9CQ-F0TxQrEkki0yKmYoOIRuEpdG_hItA7YKtWzvQY80TnzfxFNuIGSqPSwgOj5U7p_GLdx8RWoGC_Gk/s1600/final+for+blog.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1012" data-original-width="1103" height="585" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvUVvZ93Ahtpt9nJFubi5d2nilGbHwnqi9HOuF-q9nfRDMKOrwhUUqV4HeV9p9CQ-F0TxQrEkki0yKmYoOIRuEpdG_hItA7YKtWzvQY80TnzfxFNuIGSqPSwgOj5U7p_GLdx8RWoGC_Gk/s640/final+for+blog.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Updated Apps Script pre-OAuth alert with cautionary language</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC_Q-QUZIb8n6Mi14eVLljOCVfuGNbX5kPP9bleYtwAe8ddb218r2y3ftXhDvGRynRQitr6i9wIi1W4xc-eliiQRYabCjSjt-QMDxNRwYd1WZH2ixKPP5q0sVs1ZXu9ffv09xLTYA3THE/s1600/ugc_banner.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="439" data-original-width="898" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC_Q-QUZIb8n6Mi14eVLljOCVfuGNbX5kPP9bleYtwAe8ddb218r2y3ftXhDvGRynRQitr6i9wIi1W4xc-eliiQRYabCjSjt-QMDxNRwYd1WZH2ixKPP5q0sVs1ZXu9ffv09xLTYA3THE/s640/ugc_banner.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Apps Script user-generated content banner</td></tr>
</tbody></table>
<br />
<h3>
Extending protections to existing apps </h3>
In the coming months, we will continue to enhance user protections by extending the verification process beyond newly created apps, to existing apps as well. As a part of this expansion, developers of some current apps may be required to go through the verification flow.<br />
<br />
To help ensure a smooth transition, we recommend developers verify that their contact information is up-to-date. In the <a href="https://console.developers.google.com/">Google Cloud Console</a>, developers should ensure that the appropriate and monitored accounts are granted either the project owner or billing account admin IAM role. For help with granting IAM roles, see <a href="https://cloud.google.com/iam/docs/granting-changing-revoking-access">this help center article</a>.<br />
<br />
In the API manager, developers should ensure that their OAuth consent screen configuration is accurate and up-to-date. For help with configuring the consent screen, see <a href="https://support.google.com/cloud/answer/6158849?hl=en#userconsent">this help center article</a>.
<br />
<br />
We’re committed to fostering a healthy ecosystem for both users and developers. These new notices will inform users automatically if they may be at risk, enabling them to make informed decisions to keep their information safe, and will make it easier to test and develop apps for developers.
Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-63573514843429809412017-07-12T10:00:00.000-07:002017-07-12T10:01:43.863-07:00Identifying app usage in your Google Drive audit logs<span class="post-author">Posted by Rio Akasaka, Product Manager, Google Drive and <a href="https://plus.google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
If you’re a G Suite admin (or a developer creating apps for admins), it’s important to understand the various applications your company’s employees are using and how they’re accessing them. Today, we’re making that easier by introducing app identification (i.e. <span style="font-family: "consolas"; font-size: 11pt; white-space: pre-wrap;">originating_app_id</span>) in the Google Drive audit logs within the Admin SDK <a href="https://developers.google.com/admin-sdk/reports/v1/reference/activity-ref-appendix-a/drive-event-names">Reports API</a>.<br />
<br />
Now, your apps will be able to determine whether an activity logged was performed by a user in the Drive Android app, Drive iOS app, Google Chrome, or through a variety of other third-party apps that leverage, modify or create files within Google Drive, like Smartsheet or Asana. This will give you a better sense of the apps being used in your organization, as well as the extent and context of that usage.<br />
<br />
Note that App IDs that show up in the logs will be numeric. Should you want to retrieve app names, a separate request using the <a href="https://developers.google.com/drive/v2/reference/apps/get">Google Drive REST API</a> is needed. If you already retrieve information through the <a href="https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-drive">Drive activity request</a>, you should start seeing the <span id="docs-internal-guid-3b2cd8b4-33bc-82ba-a53f-16159f71d8a0"><span style="font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">originating_app_id</span></span>s show up in your logs. Here are a pair of HTTP requests you can use to query this information:<br />
<br />
<pre><code>GET
https://www.googleapis.com/admin/reports/v1/activity/users/userKey</code></pre>
<br />
Or<br />
<pre><code>GET
https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive</code></pre>
<br />
To learn more about this new feature, take a look at the <a href="https://developers.google.com/admin-sdk/reports/v1/reference/activity-ref-appendix-a/drive-event-names">documentation</a>, then integrate into your code so you and other G Suite admins can gain a better understanding of app usage in your domain(s). We look forward to seeing what you build!Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-66705066016830606922017-07-05T14:00:00.000-07:002017-07-05T14:00:13.539-07:00Google People API now supports updates to Contacts and Contact Groups<span class="post-author">Posted by Amos Yuen, Software Engineer, and <a href="https://plus.google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<span class="post-author"><br /></span>
Starting today, the <a href="https://developers.google.com/people/">Google People API</a> will get new endpoints for contacts and contact groups. Last year, we <a href="https://developers.googleblog.com/2016/02/announcing-people-api.html">launched</a> the Google People API with read-only endpoints with plans to eventually replace the old <a href="https://developers.google.com/google-apps/contacts/v3/">Contacts API</a>. We’re one step closer to that goal by adding write endpoints that allow developers to create, delete and update a single contact. In addition, there are new contact group endpoints that allow developers to read and write contact groups.<br />
<br />
Applications need to be authorized to access the API so to get started, you will need to create a project on the <a href="https://console.developers.google.com/">Google Developers Console</a> with the People API enabled to get access to the service. All of the steps to do so are <a href="https://developers.google.com/people/v1/getting-started">here</a>. If you’re new to the Google APIs and/or the Developers Console, <a href="https://www.youtube.com/watch?v=DYAwYxVs2TI&feature=youtu.be&list=PLOU2XLYxmsILOIxBRPPhgYbuSslr50KVq&index=2">check out this video</a>, the first in a series of videos to help you get up-to-speed.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7euz4Uvq-60FGxgOUTwkKuOYsLKAE7M4y3AGcHUntSB_BOtJT-foQe_JSrLR6oH8YLXOKT3VJwRgUucVyOnbW8jjUjX4SDYAC7rDmNeAwDEiPsL0_fjo0_K6pvzICgJRUALHmnHHhf64/s1600/image1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1493" data-original-width="1600" height="595" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7euz4Uvq-60FGxgOUTwkKuOYsLKAE7M4y3AGcHUntSB_BOtJT-foQe_JSrLR6oH8YLXOKT3VJwRgUucVyOnbW8jjUjX4SDYAC7rDmNeAwDEiPsL0_fjo0_K6pvzICgJRUALHmnHHhf64/s640/image1.png" width="640" /></a></div>
<br />
Once you’re authorized, you can simply create new contacts like this (<a href="https://developers.google.com/api-client-library/java/">using the Google APIs Client Library for Java</a>):<br />
<pre><code>Person contactToCreate = new Person();
List<name> names = new ArrayList<>();
names.add(new Name().setGivenName("John").setFamilyName("Doe"));
contactToCreate.setNames(names);
Person createdContact =
peopleService.people().createContact(contactToCreate).execute();</name></code></pre>
<br />
The scope your app needs to authorize with is <a href="https://www.googleapis.com/auth/contacts">https://www.googleapis.com/auth/contacts</a>. Full documentation on the <span id="docs-internal-guid-22eca898-1408-52be-654e-2f3b44e4148e"><span style="color: #006600; font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">people.create</span></span> method is available <a href="https://developers.google.com/people/api/rest/v1/people/createContact">here</a>.
You can update an existing contact like this:<br />
<br />
<pre><code>String resourceName = "people/c12345"; // existing contact resource name
Person contactToUpdate = peopleService.people().get(resourceName)
.setPersonFields("names,emailAddresses")
.execute();
List<emailaddress> emailAddresses = new ArrayList<>();
emailAddresses.add(new EmailAddress().setValue("john.doe@gmail.com"));
contactToUpdate.setEmailAddresses(emailAddresses);
Person updatedContact = peopleService.people().updateContact(contactToUpdate)
.setUpdatePersonFields("emailAddresses")
.execute();</emailaddress></code></pre>
<br />
Full documentation on the <span id="docs-internal-guid-22eca898-1409-f25f-fde3-69f2605a4932"><span style="background-color: #fafafa; color: #006600; font-family: "consolas"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">people.update</span><span style="font-family: "roboto"; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"> </span></span> method is available <a href="https://developers.google.com/people/api/rest/v1/people/createContact">here</a>.
We look forward to seeing what you can do with these new features allowing you to modify contacts. To learn more about the People API, check out the official documentation <a href="https://developers.google.com/people/">here</a>.Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-91941526923840961582017-06-29T10:00:00.000-07:002017-06-29T10:26:31.698-07:00Modifying events with the Google Calendar API<span class="post-author">Posted by <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<span class="post-author"><br /></span>
You might be using the <a href="https://developers.google.com/google-apps/calendar/">Google Calendar API</a>, or alternatively <a href="https://www.youtube.com/watch?v=7uQ87m9RB74&index=6&list=PLOU2XLYxmsILOIxBRPPhgYbuSslr50KVq">email markup</a>, to insert events into your users’ calendars. Thankfully, these tools allow your apps to do this seamlessly and automatically, which saves your users a lot of time. But what happens if plans change? You need your apps to also be able to modify an event.<br />
<br />
While email markup does support this update, it’s limited in what it can do, so in today’s video, we’ll show you how to modify events with the Calendar API. We’ll also show you how to create repeating events. Check it out:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/Qd64idiKZWw?list=PLOU2XLYxmsIJJFx_MVCQJ7eWF3gDxklgJ" width="640"></iframe>
Imagine a potential customer being interested in your product, so you set up one or two meetings with them. As their interest grows, they request regularly-scheduled syncs as your product makes their short list—your CRM should be able to make these adjustments in your calendar without much work on your part. Similarly, a “dinner with friends” event can go from a “rain check” to a bi-monthly dining experience with friends you’ve grown closer to. Both of these events can be updated with a JSON request payload like what you see below to adjust the date and make it repeating:<br />
<pre><code>var TIMEZONE = "America/Los_Angeles";
var EVENT = {
"start": {"dateTime": "2017-07-01T19:00:00", "timeZone": TIMEZONE},
"end": {"dateTime": "2017-07-01T22:00:00", "timeZone": TIMEZONE},
"recurrence": ["RRULE:FREQ=MONTHLY;INTERVAL=2;UNTIL=20171231"]
};
</code></pre>
<br />
This event can then be updated with a single call to the Calendar API’s events().patch() method, which in Python would look like the following given the request data above, GCAL as the API service endpoint, and a valid EVENT_ID to update:<br />
<pre><code>GCAL.events().patch(calendarId='primary', eventId=EVENT_ID,
sendNotifications=True, body=EVENT).execute()
</code></pre>
<br />
If you missed it, <a href="https://www.youtube.com/watch?v=tNo9IoZMelI">check out this video</a> that shows how you can insert events into Google Calendar as well as the <a href="https://developers.google.com/google-apps/calendar/">official API documentation</a>. Also, if you have a Google Apps Script app, you can programmatically access Google Calendar with its <a href="http://developers.google.com/apps-script/reference/calendar">Calendar service</a>.<br />
<br />
We hope you can use this information to enhance your apps to give your users an even better and timely experience.Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.comtag:blogger.com,1999:blog-1377183911445147227.post-77573942598789330232017-06-07T12:00:00.000-07:002017-06-07T12:08:11.905-07:00VIDEO: Part 1—Introducing Team Drives for developers<span class="post-author">Posted by Hodie Meyers, Product Manager, Google Drive, and <a href="http://google.com/+WesleyChun">Wesley Chun</a> (<a href="https://twitter.com/wescpy">@wescpy</a>), Developer Advocate, G Suite</span><br />
<br />
Enterprises are always looking for ways to operate more efficiently, and equipping developers with the right tools can make a difference. <a href="https://blog.google/products/g-suite/introducing-new-enterprise-ready-tools-google-drive/">We launched Team Drives</a> this year to bring the best of what users love about Drive to enterprise teams. We also updated the Google Drive API, so that developers can leverage Team Drives in the apps they build.<br />
<br />
In this latest G Suite Dev Show video, we cover how you can leverage the functionality of Team Drives in your apps. The good news is you don’t have to learn a completely new API—Team Drives features are built into the Drive API so you can build on what you already know. Check it out:<br />
<br />
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/5bifEBJRlaQ?list=PLOU2XLYxmsIJJFx_MVCQJ7eWF3gDxklgJ" width="640"></iframe>
</div>
By the end of this video, you‘ll be familiar with four basic operations to help you build Team Drives functionality right in your apps:<br />
<ol>
<li>How to create Team Drives </li>
<li>How to add members/users to your Team Drives </li>
<li>How to create folders in Team Drives (just like creating a regular Drive folder) </li>
<li>How to upload/import files to Team Drives folders (just like uploading files to regular folders) </li>
</ol>
The Drive API can help a variety of developers create solutions that work with both Google Drive and Team Drives. Whether you’re an Independent Software Vendor (ISV), System Integrator (SI) or work in IT, there are many ways to use the Drive API to enhance productivity, help your company migrate to G Suite, or build tools to automate workflows.<br />
<br />
Team Drives features are available in both Drive API v2 and v3, and more details can be found in the <a href="http://developers.google.com/drive">Drive API documentation</a>. We look forward to seeing what you build with Team Drives!Google Apps Developer Blog Editorhttp://www.blogger.com/profile/07808045840831274565noreply@blogger.com