Tag Archives: G Suite

Adding text and shapes with the Google Slides API

Originally shared on the G Suite Developers Blog

Posted by Wesley Chun (@wescpy), Developer Advocate, G Suite
When the Google Slidesteam launched their very first API last November, it immediately opened up a whole new class of applications. These applications have the ability to interact with the Slides service, so you can perform operations on presentations programmatically. Since its launch, we've published several videos to help you realize some of those possibilities, showing you how to:
Today, we're releasing the latest Slides API tutorial in our video series. This one goes back to basics a bit: adding text to presentations. But we also discuss shapes—not only adding shapes to slides, but also adding text within shapes. Most importantly, we cover one best practice when using the API: create your own object IDs. By doing this, developers can execute more requests while minimizing API calls.



Developers use insertText requests to tell the API to add text to slides. This is true whether you're adding text to a textbox, a shape or table cell. Similar to the Google Sheets API, all requests are made as JSON payloads sent to the API's batchUpdate() method. Here's the JavaScript for inserting text in some object (objectID) on a slide:
{
"insertText": {
"objectId": objectID,
"text": "Hello World!\n"
}
Adding shapes is a bit more challenging, as you can see from itssample JSON structure:

{
"createShape": {
"shapeType": "SMILEY_FACE",
"elementProperties": {
"pageObjectId": slideID,
"size": {
"height": {
"magnitude": 3000000,
"unit": "EMU"
},
"width": {
"magnitude": 3000000,
"unit": "EMU"
}
},
"transform": {
"unit": "EMU",
"scaleX": 1.3449,
"scaleY": 1.3031,
"translateX": 4671925,
"translateY": 450150
}
}
}
}
Placing or manipulating shapes or images on slides requires more information so the cloud service can properly render these objects. Be aware that it does involve some math, as you can see from the Page Elements page in the docs as well as the Transforms concept guide. In the video, I drop a few hints and good practices so you don't have to start from scratch.

Regardless of how complex your requests are, if you have at least one, say in an array named requests, you'd make an API call with the aforementioned batchUpdate() method, which in Python looks like this (assuming SLIDES is the service endpoint and a presentation ID of deckID):

SLIDES.presentations().batchUpdate(presentationId=deckID,
body=requests).execute()
For a detailed look at the complete code sample featured in the DevByte, check out the deep dive post. As you can see, adding text is fairly straightforward. If you want to learn how to format and style that text, check out the Formatting Text post and video as well as the text concepts guide.
To learn how to perform text search-and-replace, say to replace placeholders in a template deck, check out the Replacing Text & Images post and video as well as the merging data into slides guide. We hope these developer resources help you create that next great app that automates the task of producing presentations for your users!

Adding text and shapes with the Google Slides API

Posted by Wesley Chun (@wescpy), Developer Advocate, G Suite
When the Google Slidesteam launched their very first API last November, it immediately opened up a whole new class of applications. These applications have the ability to interact with the Slides service, so you can perform operations on presentations programmatically. Since its launch, we've published several videos to help you realize some of those possibilities, showing you how to:
Today, we're releasing the latest Slides API tutorial in our video series. This one goes back to basics a bit: adding text to presentations. But we also discuss shapes—not only adding shapes to slides, but also adding text within shapes. Most importantly, we cover one best practice when using the API: create your own object IDs. By doing this, developers can execute more requests while minimizing API calls.



Developers use insertText requests to tell the API to add text to slides. This is true whether you're adding text to a textbox, a shape or table cell. Similar to the Google Sheets API, all requests are made as JSON payloads sent to the API's batchUpdate() method. Here's the JavaScript for inserting text in some object (objectID) on a slide:
{
"insertText": {
"objectId": objectID,
"text": "Hello World!\n"
}
Adding shapes is a bit more challenging, as you can see from itssample JSON structure:

{
"createShape": {
"shapeType": "SMILEY_FACE",
"elementProperties": {
"pageObjectId": slideID,
"size": {
"height": {
"magnitude": 3000000,
"unit": "EMU"
},
"width": {
"magnitude": 3000000,
"unit": "EMU"
}
},
"transform": {
"unit": "EMU",
"scaleX": 1.3449,
"scaleY": 1.3031,
"translateX": 4671925,
"translateY": 450150
}
}
}
}
Placing or manipulating shapes or images on slides requires more information so the cloud service can properly render these objects. Be aware that it does involve some math, as you can see from the Page Elements page in the docs as well as the Transforms concept guide. In the video, I drop a few hints and good practices so you don't have to start from scratch.

Regardless of how complex your requests are, if you have at least one, say in an array named requests, you'd make an API call with the aforementioned batchUpdate() method, which in Python looks like this (assuming SLIDES is the service endpoint and a presentation ID of deckID):

SLIDES.presentations().batchUpdate(presentationId=deckID,
body=requests).execute()
For a detailed look at the complete code sample featured in the DevByte, check out the deep dive post. As you can see, adding text is fairly straightforward. If you want to learn how to format and style that text, check out the Formatting Text post and video as well as the text concepts guide.
To learn how to perform text search-and-replace, say to replace placeholders in a template deck, check out the Replacing Text & Images post and video as well as the merging data into slides guide. We hope these developer resources help you create that next great app that automates the task of producing presentations for your users!

What do productivity, machine learning and next generation teams have in common? Google Cloud Next ‘17.

On March 8-10, Google will host one its largest events ever — Google Cloud Next 2017. In the last year, the Google Cloud team has introduced some new products and solutions to help businesses face some of their biggest productivity problems. Next is our way of bringing together customers and partners under one roof to see the results of all these updates. That includes the latest cloud innovations and more than more than 200 sessions, where you can check out new products and features firsthand.

While I applaud anyone who figures out a way to attend all 200, there are a few sessions that you should definitely see if you want ideas to help boost your team’s productivity.

One that comes to mind is the Machine learning powering the workforce: Explore in Google Docs to see how machine learning in G Suite can instantly help you tackle everyday tasks and complex business challenges with the click of a button. Then, follow that up with Google Cloud Platform (GCP).

Whether it's using the Sheets API to give project managers using Asana a way to do deeper comparison of their projects, or using the Slides API to create a deck in Slides from a Trello board in just one click, the ways in which our customers and partners are automating their processes using G Suite APIs are impressive (and growing). The APIs we’re building across G Suite, as part of the larger Cloud platform, are being tailored to solve the most common business flows and the the full Next '17 agenda. And if you’re wondering, you can still register. Grab your spot and I’ll see you there!


Source: Google Cloud


What do productivity, machine learning and next generation teams have in common? Google Cloud Next ‘17.

On March 8-10, Google will host one its largest events ever — Google Cloud Next 2017. In the last year, the Google Cloud team has introduced some new products and solutions to help businesses face some of their biggest productivity problems. Next is our way of bringing together customers and partners under one roof to see the results of all these updates. That includes the latest cloud innovations and more than 200 sessions, where you can check out new products and features firsthand.

While I applaud anyone who figures out a way to attend all 200, there are a few sessions that you should definitely see if you want ideas to help boost your team’s productivity.

One that comes to mind is the Machine learning powering the workforce: Explore in Google Docs to see how machine learning in G Suite can instantly help you tackle everyday tasks and complex business challenges with the click of a button. Then, follow that up with Google Cloud Platform (GCP).

Whether it's using the Sheets API to give project managers using Asana a way to do deeper comparison of their projects, or using the Slides API to create a deck in Slides from a Trello board in just one click, the ways in which our customers and partners are automating their processes using G Suite APIs are impressive (and growing). The APIs we’re building across G Suite, as part of the larger Cloud platform, are being tailored to solve the most common business flows and the the full Next '17 agenda. And if you’re wondering, you can still register. Grab your spot and I’ll see you there!


Work hacks from G Suite: Make it automatic

More than a year ago, the Google Cloud Customer team, which focuses on providing helpful information to G Suite users, set out to create the Transformation Gallery — a resource for businesses to search and find tips on how to transform everyday processes in the workplace using Google Cloud tools. As a part of a monthly series, we’ll highlight some of the best Transformation Gallery tips to help your teams achieve more, quicker. Today, we take a look at how managers can save time by automating simple manual processes in industries like retail and financial services.

Speed up approval workflows

Managing the flow of information between employees can be overwhelming. It can get in the way of the actual work you need to do. Whether you’re entering paper-form data into a spreadsheet or emailing back and forth for approvals, at some point, these manual workflows require a lot of upkeep, or worse, they break. Here are a few steps you can take to automate your day:

1. Think of a process to improve

Look around your desk or inbox for a time-consuming request process. It might be for employee performance evaluations, requesting equipment for a new hire, or collecting daily production reports. Now, think through the steps of the process and map it out. What information do you need to collect or pass on? Who needs to review it or approve it? Who needs to be notified of the status?  

2. Use Forms to collect data

With that process in mind, build a survey using Google Forms. Make sure it has all the fields included in it for the information you need. You can also collect file uploads directly from participants at the same time you collect data, which makes it easy for employees to submit information without going back-and-forth.

3. Set up your response spreadsheet

Any data you collect in Forms automatically populates in a single spreadsheet in Sheets. Be sure to share the sheet with those who need to take action once a response is submitted, and have your team set up spreadsheet notifications. That way, everyone knows when responses are in or data changes on the sheet. Add extra columns to the sheet for editors to update the status of an entry, indicate an approval, or add additional details. Now, you’ve got a single electronic record that your team can use to check on status and requests.

4. Automate further with Apps Script

If you want to make it even more automatic, use Apps Script. Set up one or more approval workflows, and send notifications and reminders to approvers and requestors through email. You can also program the script to update spreadsheets or other G Suite tools with data on the approval status as it happens. Here’s a simple example from The G Suite Show:

And if you’re interested in a deeper dive on Apps Script, there’s a session at Google Cloud Next ‘17 called "Automating internal processes using Apps Script and APIs for Docs editors," that can help you get familiar with the tool. Register for Next ‘17 here.

These are just a few ways you can automate workflows, and here are some often overlooked benefits:

  • The approval process is standardized and streamlined
  • Sheets digitally tracks all requests, which is great for historical data and audits (and the sheet can be shared.)
  • Notifications are sent automatically for approvals and status
  • Forms creates a simple and consistent way for employees to make requests
  • Employees can use a mobile device to initiate and complete a request

Best of all, by transforming your workflows with these tips, you and your coworkers will save time. Something we can all appreciate.

Work hacks from G Suite: Make it automatic

More than a year ago, the Google Cloud Customer team, which focuses on providing helpful information to G Suite users, set out to create the Transformation Gallery — a resource for businesses to search and find tips on how to transform everyday processes in the workplace using Google Cloud tools. As a part of a monthly series, we’ll highlight some of the best Transformation Gallery tips to help your teams achieve more, quicker. Today, we take a look at how managers can save time by automating simple manual processes in industries like retail and financial services.

Speed up approval workflows

Managing the flow of information between employees can be overwhelming. It can get in the way of the actual work you need to do. Whether you’re entering paper-form data into a spreadsheet or emailing back and forth for approvals, at some point, these manual workflows require a lot of upkeep, or worse, they break. Here are a few steps you can take to automate your day:

1. Think of a process to improve

Look around your desk or inbox for a time-consuming request process. It might be for employee performance evaluations, requesting equipment for a new hire, or collecting daily production reports. Now, think through the steps of the process and map it out. What information do you need to collect or pass on? Who needs to review it or approve it? Who needs to be notified of the status?  

2. Use Forms to collect data

With that process in mind, build a survey using Google Forms. Make sure it has all the fields included in it for the information you need. You can also collect file uploads directly from participants at the same time you collect data, which makes it easy for employees to submit information without going back-and-forth.

3. Set up your response spreadsheet

Any data you collect in Forms automatically populates in a single spreadsheet in Sheets. Be sure to share the sheet with those who need to take action once a response is submitted, and have your team set up spreadsheet notifications. That way, everyone knows when responses are in or data changes on the sheet. Add extra columns to the sheet for editors to update the status of an entry, indicate an approval, or add additional details. Now, you’ve got a single electronic record that your team can use to check on status and requests.

4. Automate further with Apps Script

If you want to make it even more automatic, use Apps Script. Set up one or more approval workflows, and send notifications and reminders to approvers and requestors through email. You can also program the script to update spreadsheets or other G Suite tools with data on the approval status as it happens. Here’s a simple example from The G Suite Show:

And if you’re interested in a deeper dive on Apps Script, there’s a session at Google Cloud Next ‘17 called "Automating internal processes using Apps Script and APIs for Docs editors," that can help you get familiar with the tool. Register for Next ‘17 here.

These are just a few ways you can automate workflows, and here are some often overlooked benefits:

  • The approval process is standardized and streamlined
  • Sheets digitally tracks all requests, which is great for historical data and audits (and the sheet can be shared.)
  • Notifications are sent automatically for approvals and status
  • Forms creates a simple and consistent way for employees to make requests
  • Employees can use a mobile device to initiate and complete a request

Best of all, by transforming your workflows with these tips, you and your coworkers will save time. Something we can all appreciate.

Source: Google Cloud


Work hacks from G Suite: Make it automatic

More than a year ago, the Google Cloud Customer team, which focuses on providing helpful information to G Suite users, set out to create the Transformation Gallery — a resource for businesses to search and find tips on how to transform everyday processes in the workplace using Google Cloud tools. As a part of a monthly series, we’ll highlight some of the best Transformation Gallery tips to help your teams achieve more, quicker. Today, we take a look at how managers can save time by automating simple manual processes in industries like retail and financial services.

Speed up approval workflows

Managing the flow of information between employees can be overwhelming. It can get in the way of the actual work you need to do. Whether you’re entering paper-form data into a spreadsheet or emailing back and forth for approvals, at some point, these manual workflows require a lot of upkeep, or worse, they break. Here are a few steps you can take to automate your day:

1. Think of a process to improve

Look around your desk or inbox for a time-consuming request process. It might be for employee performance evaluations, requesting equipment for a new hire, or collecting daily production reports. Now, think through the steps of the process and map it out. What information do you need to collect or pass on? Who needs to review it or approve it? Who needs to be notified of the status?  

2. Use Forms to collect data

With that process in mind, build a survey using Google Forms. Make sure it has all the fields included in it for the information you need. You can also collect file uploads directly from participants at the same time you collect data, which makes it easy for employees to submit information without going back-and-forth.

3. Set up your response spreadsheet

Any data you collect in Forms automatically populates in a single spreadsheet in Sheets. Be sure to share the sheet with those who need to take action once a response is submitted, and have your team set up spreadsheet notifications. That way, everyone knows when responses are in or data changes on the sheet. Add extra columns to the sheet for editors to update the status of an entry, indicate an approval, or add additional details. Now, you’ve got a single electronic record that your team can use to check on status and requests.

4. Automate further with Apps Script

If you want to make it even more automatic, use Apps Script. Set up one or more approval workflows, and send notifications and reminders to approvers and requestors through email. You can also program the script to update spreadsheets or other G Suite tools with data on the approval status as it happens. Here’s a simple example from The G Suite Show:

And if you’re interested in a deeper dive on Apps Script, there’s a session at Google Cloud Next ‘17 called "Automating internal processes using Apps Script and APIs for Docs editors," that can help you get familiar with the tool. Register for Next ‘17 here.

These are just a few ways you can automate workflows, and here are some often overlooked benefits:

  • The approval process is standardized and streamlined
  • Sheets digitally tracks all requests, which is great for historical data and audits (and the sheet can be shared.)
  • Notifications are sent automatically for approvals and status
  • Forms creates a simple and consistent way for employees to make requests
  • Employees can use a mobile device to initiate and complete a request

Best of all, by transforming your workflows with these tips, you and your coworkers will save time. Something we can all appreciate.

Source: Google Cloud


How online courses can help teach computational thinking and CS

Editor’s note: We’re highlighting education leaders across the world to share how they’re creating more collaborative, engaging classrooms. Today’s guest author is Rebecca Vivian, one of the keynote speakers from Education on Air, Google’s free online conference which took place in December 2016. Rebecca, a Research Fellow at the computer science education research group (CSER) at the University of Adelaide in Australia, shares professional development ideas for preparing teachers for a classroom focused on computational thinking and computer science.

These days, we need to prepare the next generation of students to be creators—not just consumers—of digital technology. As the demand for computer science and computational thinking skills increases, countries are integrating these skills into their K-12 curriculum. This year, Australia implemented a digital technologies curriculum, incorporating the teaching of computational thinking and CS into curricula from foundation level, and many other countries are rapidly following suit. But teachers need help to implement this type of digital focussed curriculum.

One of the ways we can support teachers in this area is via "massive open online courses," or MOOCs. In Australia, the computer science education research group (CSER) at the University of Adelaide, is partnering with Google to develop online communities and free MOOCs, where K-12 teachers can share their creative ideas and suggest professional development lessons. With these resources, teachers are learning to integrate computational thinking and computer science into their curriculum.

Since launching the digital technologies MOOC in 2014, we’ve been able to scale professional learning across Australia and introduce new learning styles such as algorithmic thinking, which teaches students to develop step-by-step solutions for problems they encounter. More than 7,200 teachers are engaged in this professional learning program and have shared more than 4,500 resources as a result of these MOOCs. The program isn’t just working for experienced CS teachers: Ellie, a 56-year-old grandmother and primary school teacher with virtually no technology background, created a lesson on binary and data resources after taking our first course. In late 2016, the Australian government decided to invest nearly 7 million dollars over four years to scale our efforts further and support remote and low-income communities.

Connecting teachers to share creativity and insight

The success of Australia’s MOOCs and online teacher community has proven the value of peer-to-peer professional learning. Teachers have embraced our “professional learning in a box” kits—slide decks of instructor notes, videos, and in-person activity ideas that they can customize to deliver professional learning sessions in their school or community. Teachers also love user-generated content in our online communities because they can interact with teachers who created them, and apply concepts they’ve learned online to their classroom.

Education on Air, which I participated in last year, works much like a MOOC by providing a space for people with a shared interest to come together and learn from one another, no matter where they’re located. In my breakout session, “Making Computational Thinking Visible: Classroom Activities and Google Tools,” I explained algorithmic thinking, demonstrated the way it applies to other learning areas, and shared tips on how Google tools can assist in introducing this framework to students. Teachers left the session with ideas they could implement the next day, including tips for engaging lessons that integrate algorithmic thinking, and ideas for applying this framework to other learning areas, such as experiment design.

Students need more than coding skills—they need to understand how technology changes the way we live, work and solve problems. The success to date of the digital technologies MOOCs in Australia shows that online courses can be a scalable way to empower teachers to incorporate computational thinking and CS concepts into the classroom. And by introducing computational thinking as a method of problem-solving to students, teachers can shape the next generation of STEM leaders.

Source: Education


How online courses can help teach computational thinking and CS

Editor’s note: We’re highlighting education leaders across the world to share how they’re creating more collaborative, engaging classrooms. Today’s guest author is Rebecca Vivian, one of the keynote speakers from Education on Air, Google’s free online conference which took place in December 2016. Rebecca, a Research Fellow at the computer science education research group (CSER) at the University of Adelaide in Australia, shares professional development ideas for preparing teachers for a classroom focused on computational thinking and computer science.

These days, we need to prepare the next generation of students to be creators—not just consumers—of digital technology. As the demand for computer science and computational thinking skills increases, countries are integrating these skills into their K-12 curriculum. This year, Australia implemented a digital technologies curriculum, incorporating the teaching of computational thinking and CS into curricula from foundation level, and many other countries are rapidly following suit. But teachers need help to implement this type of digital focussed curriculum.

One of the ways we can support teachers in this area is via "massive open online courses," or MOOCs. In Australia, the computer science education research group (CSER) at the University of Adelaide, is partnering with Google to develop online communities and free MOOCs, where K-12 teachers can share their creative ideas and suggest professional development lessons. With these resources, teachers are learning to integrate computational thinking and computer science into their curriculum.

Since launching the digital technologies MOOC in 2014, we’ve been able to scale professional learning across Australia and introduce new learning styles such as algorithmic thinking, which teaches students to develop step-by-step solutions for problems they encounter. More than 7,200 teachers are engaged in this professional learning program and have shared more than 4,500 resources as a result of these MOOCs. The program isn’t just working for experienced CS teachers: Ellie, a 56-year-old grandmother and primary school teacher with virtually no technology background, created a lesson on binary and data resources after taking our first course. In late 2016, the Australian government decided to invest nearly 7 million dollars over four years to scale our efforts further and support remote and low-income communities.

Connecting teachers to share creativity and insight

The success of Australia’s MOOCs and online teacher community has proven the value of peer-to-peer professional learning. Teachers have embraced our “professional learning in a box” kits—slide decks of instructor notes, videos, and in-person activity ideas that they can customize to deliver professional learning sessions in their school or community. Teachers also love user-generated content in our online communities because they can interact with teachers who created them, and apply concepts they’ve learned online to their classroom.

Education on Air, which I participated in last year, works much like a MOOC by providing a space for people with a shared interest to come together and learn from one another, no matter where they’re located. In my breakout session, “Making Computational Thinking Visible: Classroom Activities and Google Tools,” I explained algorithmic thinking, demonstrated the way it applies to other learning areas, and shared tips on how Google tools can assist in introducing this framework to students. Teachers left the session with ideas they could implement the next day, including tips for engaging lessons that integrate algorithmic thinking, and ideas for applying this framework to other learning areas, such as experiment design.

Students need more than coding skills—they need to understand how technology changes the way we live, work and solve problems. The success to date of the digital technologies MOOCs in Australia shows that online courses can be a scalable way to empower teachers to incorporate computational thinking and CS concepts into the classroom. And by introducing computational thinking as a method of problem-solving to students, teachers can shape the next generation of STEM leaders.

Source: Education


How online courses can help teach computational thinking and CS

Editor’s note: We’re highlighting education leaders across the world to share how they’re creating more collaborative, engaging classrooms. Today’s guest author is Rebecca Vivian, one of the keynote speakers from Education on Air, Google’s free online conference which took place in December 2016. Rebecca, a Research Fellow at the computer science education research group (CSER) at the University of Adelaide in Australia, shares professional development ideas for preparing teachers for a classroom focused on computational thinking and computer science.

These days, we need to prepare the next generation of students to be creators—not just consumers—of digital technology. As the demand for computer science and computational thinking skills increases, countries are integrating these skills into their K-12 curriculum. This year, Australia implemented a digital technologies curriculum, incorporating the teaching of computational thinking and CS into curricula from foundation level, and many other countries are rapidly following suit. But teachers need help to implement this type of digital focussed curriculum.

One of the ways we can support teachers in this area is via "massive open online courses," or MOOCs. In Australia, the computer science education research group (CSER) at the University of Adelaide, is partnering with Google to develop online communities and free MOOCs, where K-12 teachers can share their creative ideas and suggest professional development lessons. With these resources, teachers are learning to integrate computational thinking and computer science into their curriculum.

Since launching the digital technologies MOOC in 2014, we’ve been able to scale professional learning across Australia and introduce new learning styles such as algorithmic thinking, which teaches students to develop step-by-step solutions for problems they encounter. More than 7,200 teachers are engaged in this professional learning program and have shared more than 4,500 resources as a result of these MOOCs. The program isn’t just working for experienced CS teachers: Ellie, a 56-year-old grandmother and primary school teacher with virtually no technology background, created a lesson on binary and data resources after taking our first course. In late 2016, the Australian government decided to invest nearly 7 million dollars over four years to scale our efforts further and support remote and low-income communities.

Connecting teachers to share creativity and insight

The success of Australia’s MOOCs and online teacher community has proven the value of peer-to-peer professional learning. Teachers have embraced our “professional learning in a box” kits—slide decks of instructor notes, videos, and in-person activity ideas that they can customize to deliver professional learning sessions in their school or community. Teachers also love user-generated content in our online communities because they can interact with teachers who created them, and apply concepts they’ve learned online to their classroom.

Education on Air, which I participated in last year, works much like a MOOC by providing a space for people with a shared interest to come together and learn from one another, no matter where they’re located. In my breakout session, “Making Computational Thinking Visible: Classroom Activities and Google Tools,” I explained algorithmic thinking, demonstrated the way it applies to other learning areas, and shared tips on how Google tools can assist in introducing this framework to students. Teachers left the session with ideas they could implement the next day, including tips for engaging lessons that integrate algorithmic thinking, and ideas for applying this framework to other learning areas, such as experiment design.

Students need more than coding skills—they need to understand how technology changes the way we live, work and solve problems. The success to date of the digital technologies MOOCs in Australia shows that online courses can be a scalable way to empower teachers to incorporate computational thinking and CS concepts into the classroom. And by introducing computational thinking as a method of problem-solving to students, teachers can shape the next generation of STEM leaders.