\n \n \n \n
\n
\n \n\n","And presto chango, you have a web app that harnesses the tremendous power of Google’s infrastructure … to produce names that could only ever exist in a parallel universe. It’s like Adriano Celentano’s \"Prisencolinensinainciusol\" — a convincing rendition of an American pop song, unless you actually speak English, in which case it’s total gibberish.","Dan Lazin","twitter","Dan is a technical writer on the Developer Relations team for Google Apps Script. Before joining Google, he worked as video-game designer and newspaper reporter. He has bicycled through 17 countries.","\nManaging Projects with Gantt Charts using Google Apps Script\n","\nDecember 21, 2012\n","Editor’s Note: Guest author Ronald Dahrs runs Forscale, an IT and project management company based in the Netherlands. -- Arun Nagarajan","Google Apps is well-suited for project management because it’s a cloud-based productivity suite that helps you and your team connect and get work done from anywhere on any device. Using Google Apps Script, we can push the capabilities even further to create advanced scheduling and management tools. A common tool in project management circles is the Gantt chart: a schedule of the tasks in the project and how they relate to each other over time.","The spreadsheet that generated that Gantt chart is available in the template gallery today. In this post, we’ll explore the basics of how the template works and explain a few of the Apps Script techniques that transform Google Sheets into such a powerful project management tool.","When you open the template, you’ll see stubs for each type of task, but the screenshot above shows an example of a slightly larger project plan — in fact, the same data used to generate the Gantt chart below.","The template’s sophisticated formulas rely on the structure of the table to enable schedule awareness and task dependencies. However, we still ensure that the user can rename, rearrange, or add columns by using a hidden header to identify each column. This diagram demonstrates the spreadsheet’s structure:","In Apps Script, we use the spreadsheet’s ","onEdit()"," event to monitor user interaction with the schedule portion of the spreadsheet and update the Gantt chart accordingly. The powerful JavaScript language does all the required summary calculations based on the provided dates and completion percentages.","We have also used Apps Script’s ","addMenu()"," method to build a custom menu that calls row-oriented functions like indenting tasks to get a so-called Work Breakdown Structure with summary tasks. If you just want to see an overview, the custom menu allows you to collapse tasks, which we accomplished through the ","hideRows()"," method.","For changes that do not trigger an "," event (for example, clearing a row), the user can use the menu’s Refresh command to recalculate the schedule.","The template stores user preferences as Script Properties and offers an interactive user interface built in UiApp to change those settings:","Finally, to render the Gantt chart, we use cell background colors to visually group and highlight the appropriate cells. This creates the effect of a continuous calendar with clearly visible start and finish dates for each task.","var ganttColors = ganttRange.getBackgroundColors();\nvar ganttValues = ganttRange.getValues();\n\n// update Gantt colors and values \nganttRange.setBackgroundColors(ganttColors).setValues(ganttValues);\n","Ronald Dahrs","
Ronald combines his knowledge of project management and software solutions at his company, Forscale. He believes Google Apps is an excellent platform for online project management. He uses Google Apps Script to integrate the services to manage a wide range of projects.\n","\n\nLabels:\n\n\n\nApps Script\n\n\n ,\n \n\nGuest Post\n\n\n","\nThe Hottest Script in Hollywood\n","\nDecember 19, 2012\n","In just a few hours at the recent Apps Script hackathon in Los Angeles, we saw attendees build everything from website monitoring to room booking to financial tracking apps. For those of you who couldn’t make it, attendees were given a brief introduction to Apps Script and a few hours to let their imaginations run wild. Apps Script’s ease of use enabled them to quickly create fully functioning, useful apps. Here are a few interesting things we saw from local developers:","Website Monitor by Eduardo Arino de la Rubina","These days, small businesses are quickly increasing their online presence; a website outage during a critical period can be devastating to a mom-and-pop shop. Eduardo realized that existing network-monitoring solutions require a significant investment in technology and infrastructure that is beyond the reach of many small-business users. Using Apps Script’s UrlFetch and Spreadsheet services, he was able to quickly create a website monitor packaged in an easy-to-use spreadsheet that, given a list of URLs, tries to fetch each one and records the latency and content length.","The code is available here.","Get A Room by Danny Favela","Get A Room allows users to book meeting rooms by taking advantage of Apps Script’s tight integration with Google Calendar and events. The app, built entirely on a Chromebook utilizing Apps Script's cloud friendliness, displays building floorplans with buttons that users can click to book a room. In response to a booking request, the app fetches the room’s calendar and creates a new event. It also updates the UI by replacing the floor plan with a modified image to show the newly booked room. Here is a snippet of the booking code:","\n// Click handler for the interaction to book a room\nfunction bookBoardroomHandler(e) {\n var app = UiApp.getActiveApplication();\n\n // Perform the calendar-booking operations\n bookBoardroom();\n \n // Swap the images as visual confirmation\n app.remove(app.getElementById('imageDefaultLayout'));\n app.add(app.getElementById('imageBoardroom'));\n\n app.close();\n return app;\n}\n\nfunction bookBoardroom(e) {\n var calendarBoardroom = CalendarApp.getCalendarsByName(\"Boardroom\");\n calendarBoardroom[0].createEventFromDescription(\"Boardroom Meeting\"); \n}\n","Stock Info by Matt Kaufman","Matt decided to build a web service that provides information about publicly traded stocks. The app’s backend consists of a spreadsheet with stock symbols of interest. Using Apps Script’s FinanceService, Matt loops through the spreadsheet on a timed trigger and appends the latest stock information for each symbol. He then uses HtmlService to create a web app that outputs an XML page of the stock info based on a symbol parameter in the URL. Here’s a picture of his script in action:","These are just some examples of how quickly useful apps can be created with Apps Script. Thanks to all the attendees for coming out! If you couldn’t make it to the hackathon, check out these tutorials to see how you can get started making great apps.","Kalyan Reddy","Stack Overflow","\nKalyan is a Developer Programs Engineer on the Google Apps Script team based in NYC. He is committed to increasing developer productivity by helping them fully utilize the power of Apps Script. In his free time, he enjoys participating in the Maker community and hacking together robots.\n","\nAdWords Analysis in Google Apps Script\n","\nDecember 13, 2012\n","Editor’s Note: Guest author David Fothergill works at QueryClick, a search-engine marketing company based in the UK. — Eric Koleda","Working in Paid Search account management, I've often found tremendous wins from making reports more useful and efficient. Refining your analytics allows you to streamline your workflow, allowing more time for strategic and proactive thinking — and that's what we're paid for, not endless number-crunching.","The integration between Google Analytics and Apps Script has opened up lots of opportunities for me to make life easier through automation. In a recent blog post on my agency's website, I outlined how an automated report can quickly “heatmap” conversion rate by time and day. The aim of the report is to provide actionable analysis to inform decisions on day-part bidding and budget strategies.","In that post, I introduce the concepts and provide the scripts, sheet, and instructions to allow anyone to generate the reports by hooking the scripts up to their own account. Once the initial sheet has been created, the script only requires the user to provide a Google Analytics profile number and a goal for which they want to generate heatmaps. In this post, we’ll break down the code a bit.","Querying the API","This is a slight amendment to the code that queries the Core Reporting API. Apart from customising the optArgs dimensions to use day and hour stats, I have modified it to use goal data from the active spreadsheet, because not all users will want to measure the same goals:","\nfunction getReportDataForProfile(ProfileId, goalNumber) {\n //take goal chosen on spreadsheet and select correct metric\n var tableId = 'ga:' + ProfileId;\n if (goalNumber === 'eCommerce Trans.') {\n var goalId = 'ga:Transactions' ;\n } else {\n var goalId = 'ga:goal' + goalNumber + 'Completions';\n }\n // Continue as per example in google documentation ...\n}\n","Pivoting the Data","Once we’ve brought the Google Analytics data into the spreadsheet in raw form, we use a pivot table to plot the hour of the day against the day of the week.","For this type of report, I'd like to use conditional formatting to heatmap the data — but conditional formatting in Google Sheets is based on fixed values, whereas we want the thresholds to change based on cell values. However, thanks to the flexibility of scripts, I was able to achieve dynamic conditional formatting.","Conditional Formatting Using Scripts","The script needs to know the boundaries of our data, so I’ve set up several cells that display the maximums, minimums, and so forth. Once these were in place, the next step was to create a function that loops through the data and calculates the desired background color for each cell:","\nfunction formatting() {\n var sheet = SpreadsheetApp.getActiveSpreadsheet().\n getSheetByName('Heatmap');\n \n var range = sheet.getRange('B2:H25');\n range.setBackgroundColor('white');\n var values = range.getValues()\n \n //get boundaries values for conditional formatting\n var boundaries = sheet.getRange('B30:B35').getValues();\n\n //get range to 'heatmap'\n var backgroundColours = range.getBackgroundColors();\n\n for (var i = 0; i < values.length; i++) {\n for (var j = 0; j < values[i].length; j++) {\n // Over 90%\n if (values[i][j] > boundaries[1][0]) {\n backgroundColours[i][j] = '#f8696b';\n }\n // Between 80% and 90%\n if (values[i][j] < boundaries[1][0] \n && values[i][j] >= boundaries[2][0]) {\n backgroundColours[i][j] = '#fa9a9c';\n }\n // Between 60% and 80%\n if (values[i][j] < boundaries[2][0] \n && values[i][j] >= boundaries[3][0]) {\n backgroundColours[i][j] = '#fbbec1';\n }\n // Between 40% and 60%\n if (values[i][j] < boundaries[3][0] \n && values[i][j] >= boundaries[4][0]) {\n backgroundColours[i][j] = '#fcdde0';\n }\n // Between 20% and 40%\n if (values[i][j] < boundaries[4][0] \n && values[i][j] >= boundaries[5][0]) {\n backgroundColours[i][j] = '#ebf0f9';\n }\n // Less than 20%\n if (values[i][j] < boundaries[5][0]) {\n backgroundColours[i][j] = '#dce5f3';\n }\n }\n }\n // set background colors as arranged above\n range.setBackgroundColors(backgroundColours);\n}\n","Calling the functions based on the profile ID and goal number specified in the main sheet gives us a quick, actionable report that can easily be adapted for use across multiple accounts.","\nfunction generateHeatmap() {\n try {\n var profileId = SpreadsheetApp.getActiveSpreadsheet()\n .getSheetByName('Heatmap').getRange(4,10).getValue();\n var goalNumber = SpreadsheetApp.getActiveSpreadsheet()\n .getSheetByName('Heatmap').getRange(7,10).getValue();\n if (profileId === '') {\n Browser.msgBox('Please enter a valid Profile ID');\n } else { \n var results = getReportDataForProfile(profileId, goalNumber);\n outputToSpreadsheet(results);\n formatting();\n }\n } catch(error) {\n Browser.msgBox(error.message);\n }\n}\n","This was my first foray into the slick integration between the Core Reporting API and spreadsheets, but has proven a valuable test case for how effective it will be to roll this method of reporting into our daily process of managing accounts.","We have now started the next steps, which involves building out “client dashboards” that will allow account managers access to useful reports at the press of a button. This moves us toward the goal of minimizing the time gathering and collating data, freeing it up to add further value to client projects.","Editor's Note: If you're interested in further scripting your AdWords accounts, take a look at AdWords Scripts, a version of Apps Script that's embedded right into the AdWords interface.","David Fothergill","LinkedIn","
Guest author David Fothergill is a Project Director at the search marketing agency QueryClick, focusing on Paid Search and Conversion Optimisation. He has been working in the field for around 8 years and currently handles a range of clients for the company, in verticals ranging from fashion and retail through to industrial services.","\nBuilding Google Drive Apps on Android\n","\nDecember 4, 2012\n","When we launched version 1.0 of Google Play services to all Android 2.2+ devices worldwide in September, one of our main goals was to provide developers with better tools for working with OAuth 2.0 tokens in their Android apps.","Thanks to the new components, Android apps can get access to Google APIs with an easy-to-use authentication flow and can provide a consistent experience to both their users and developers. We recently decided to test that statement by writing a small camera app that automatically uploads photos you take to your Google Drive account.","We documented all the steps required to go from zero to hero in a quickstart guide. By following the step-by-step instructions in the guide, you’ll have a working Android app that uses Google Play services to perform authorization and the Google Drive API to upload files to Drive.","Do you want to learn how to build this app but prefer to watch a video tutorial instead of reading the documentation? We’ve got you covered! Check out the recording of the Google Developers Live session that covers the setup and running of the quickstart app.","If you’re building an Android app that integrates with Drive and have questions for us, please don’t hesitate to let us know on Stack Overflow.","Claudio Cherubino","blog","Claudio is an engineer in the Google Drive Developer Relations team. Prior to Google, he worked as software developer, technology evangelist, community manager, consultant, technical translator and has contributed to many open-source projects. His current interests include Google APIs, new technologies and coffee.","\n\nLabels:\n\n\n\nAndroid\n\n\n ,\n \n\nDrive SDK\n\n\n","\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n\n \n \n\n\n","\nLabels\n","\n \n ","\n\n.NET\n\n\n3\n\n","\n\n#io15\n\n\n1\n\n","\n\n#io16\n\n\n1\n\n","\n\nAdmin SDK\n\n\n10\n\n","\n\nAdministrative APIs\n\n\n31\n\n","\n\nAdSense\n\n\n1\n\n","\n\nanalytics\n\n\n5\n\n","\n\nAndroid\n\n\n8\n\n","\n\nAPI\n\n\n3\n\n","\n\nAPIs\n\n\n3\n\n","\n\nApp Engine\n\n\n5\n\n","\n\nApps\n\n\n1\n\n","\n\nApps Script\n\n\n118\n\n","\n\nAudit\n\n\n2\n\n","\n\nAuth\n\n\n5\n\n","\n\nbilling\n\n\n4\n\n","\n\nCharts\n\n\n2\n\n","\n\nChrome OS\n\n\n1\n\n","\n\nclassroom\n\n\n3\n\n","\n\nCloud Storage API\n\n\n1\n\n","\n\nCommunity\n\n\n1\n\n","\n\ndecks\n\n\n1\n\n","\n\nDesign\n\n\n1\n\n","\n\nDevelopers\n\n\n12\n\n","\n\nDirectory API\n\n\n3\n\n","\n\nDrive\n\n\n4\n\n","\n\nDrive SDK\n\n\n41\n\n","\n\nexecution API\n\n\n2\n\n","\n\nFirebase\n\n\n1\n\n","\n\nForms\n\n\n1\n\n","\n\nFreemium\n\n\n1\n\n","\n\nFusion Tables\n\n\n2\n\n","\n\nG Suite\n\n\n24\n\n","\n\nGadgets\n\n\n5\n\n","\n\nGmail\n\n\n7\n\n","\n\nGmail APIs\n\n\n23\n\n","\n\nGoogle\n\n\n3\n\n","\n\nGoogle APIs\n\n\n36\n\n","\n\nGoogle Apps\n\n\n33\n\n","\n\nGoogle Apps Marketplace\n\n\n7\n\n","\n\nGoogle Calendar API\n\n\n25\n\n","\n\nGoogle Classroom\n\n\n4\n\n","\n\nGoogle Cloud Directory\n\n\n1\n\n","\n\nGoogle Contacts API\n\n\n4\n\n","\n\nGoogle Data Protocol\n\n\n8\n\n","\n\ngoogle docs\n\n\n5\n\n","\n\nGoogle Docs API\n\n\n22\n\n","\n\nGoogle Drive\n\n\n8\n\n","\n\nGoogle Drive SDK\n\n\n7\n\n","\n\nGoogle Forms\n\n\n8\n\n","\n\nGoogle I/O\n\n\n3\n\n","\n\nGoogle Prediction API\n\n\n3\n\n","\n\nGoogle Profiles API\n\n\n2\n\n","\n\nGoogle sheets\n\n\n11\n\n","\n\nGoogle Sheets API\n\n\n7\n\n","\n\nGoogle Sites API\n\n\n5\n\n","\n\nGoogle Slides API\n\n\n10\n\n","\n\nGoogle Spreadsheets API\n\n\n5\n\n","\n\nGoogle Talk\n\n\n1\n\n","\n\nGoogle Tasks API\n\n\n8\n\n","\n\nGoogle+\n\n\n3\n\n","\n\ngooglenew\n\n\n1\n\n","\n\nGroups\n\n\n2\n\n","\n\nGSuite\n\n\n3\n\n","\n\nGuest Post\n\n\n43\n\n","\n\nHangouts Chat API\n\n\n1\n\n","\n\nI\n\n\n1\n\n","\n\nInbox\n\n\n1\n\n","\n\niOS\n\n\n2\n\n","\n\nissue tracker\n\n\n1\n\n","\n\nISVs\n\n\n2\n\n","\n\njava\n\n\n1\n\n","\n\nJavaScript\n\n\n6\n\n","\n\nmarketing\n\n\n3\n\n","\n\nMarketplace\n\n\n47\n\n","\n\nMarketplace ISV Guest\n\n\n21\n\n","\n\nMigration\n\n\n2\n\n","\n\nMobile\n\n\n5\n\n","\n\nmpstaffpick\n\n\n1\n\n","\n\noauth\n\n\n16\n\n","\n\nOpenID\n\n\n8\n\n","\n\nPHP\n\n\n1\n\n","\n\npresentations\n\n\n1\n\n","\n\npython\n\n\n7\n\n","\n\nrealtime API\n\n\n2\n\n","\n\nResellers\n\n\n2\n\n","\n\nRuby\n\n\n1\n\n","\n\nSaaS\n\n\n1\n\n","\n\nsecurity\n\n\n5\n\n","\n\nSheets API\n\n\n3\n\n","\n\nspreadsheets\n\n\n3\n\n","\n\nStaff Picks\n\n\n2\n\n","\n\ntool\n\n\n1\n\n","\n\ntools\n\n\n2\n\n","\n\ntutorials\n\n\n2\n\n","\n\nvideo\n\n\n4\n\n","\n\nvideos\n\n\n1\n\n","\n\nwebinar\n\n\n2\n\n","\n \n ","\nArchive\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2018\n\n","\nJul\n","\nJun\n","\nMay\n","\nMar\n","\nFeb\n","\nJan\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2017\n\n","\nDec\n","\nNov\n","\nOct\n","\nSep\n","\nAug\n","\nApr\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2016\n\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2015\n\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2014\n\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2013\n\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2012\n\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2011\n\n","\n\n\n \n \n\n\n\n\n \n \n  \n \n\n\n\n2010\n\n","Feed","Google","on","Follow @gsuitedevs","\nCompany-wide\n","Official Google Blog","Public Policy Blog","Student Blog","\nProducts\n","Android Blog","Chrome Blog","Lat Long Blog","\nDevelopers\n","Developers Blog","Ads Developer Blog","Android Developers Blog","\n Google\n ","\n Privacy\n ","\n Terms\n "]}