Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ Building G Suite Add-ons with your favorite tech stack

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Building G Suite Add-ons with your favorite tech stack


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: feedproxy.google.com

Posted by Jon Harmer, Product Manager and Steven Bazyl, Developer Advocate for G Suite

Letโ€™s talk about the basics of G Suite Add-ons. G Suite Add-ons simplify how users get things done in G Suite by bringing in functionality from other applications where you need them. They provide a persistent sidebar for quick access, and they are context-aware -- meaning they can react to what youโ€™re doing in context. For example, a CRM add-on can automatically surface details about a sales opportunity in response to an email based on the recipients or even the contents of the message itself.

Up until recently, G Suite Add-ons leaned on Apps Script to build Add-ons, but choice is always a good thing, and in some cases you may want to use another scripting language.. So letโ€™s talk about how to build Add-ons using additional runtimes:

First, additional runtimes don't add any new capabilities to what you can build. What it does give you is more choice and flexibility in how you build Add-ons. Weโ€™ve heard feedback from developers that they would also like the option to use the tools and ecosystems theyโ€™ve already learned and invested in. And while there have always been ways to bridge Apps Script and other backends that expose APIs over HTTP/S, it isn't the cleanest of workarounds. .

So letโ€™s look at a side by side comparison of what it looks like to build an Add-on with alternate runtimes:

function homePage() {
let card = CardService.newCardBuilder()
.addSection(CardService.newCardSection()
.addWidget(CardService.newTextParagraph()
.setText("Hello world"))
).build();
return [card];
}

Hereโ€™s the hello world equivalent of an Add-on in Apps Script. Since Apps Script is more akin to a serverless framework like GCF, the code is straightforward -- a function that takes an event and returns the UI to render.

// Hello world Node.js
const express = require('express');
const app = express();
app.use(express.json());

app.post('/home', (req, res) => {
let card = {
sections: [{
widgets: [{
textParagraph: {
text: 'Hello world'
}
}]
}]
};
res.json({
action: {
navigations: [{
pushCard: card
}]
}
});
}

This is the equivalent in NodeJS using express, a popular web server framework. It shows a little bit more of the underlying mechanics -- working with the HTTP request/response directly, starting the server, and so on.

The biggest difference is the card markup -- instead of using CardService, which under the covers builds a protobuf, we're using the JSON representation of the same thing.

function getCurrentMessage(event) {
var accessToken = event.messageMetadata.accessToken;
var messageId = event.messageMetadata.messageId;
GmailApp.setCurrentMessageAccessToken(accessToken);
return GmailApp.getMessageById(messageId);
}

Another area where things differ is accessing Google APis. In Apps Script, the clients are available in the global context -- the APIs mostly 'just work'. Moving to Node requires a little more effort, but not much.

Apps Script is super easy here. In fact, normally we wouldn't bother with setting the token when using more permissive scopes as it's done for us by Apps Script. We're doing it here to take advantage of the per-message scope that the add-on framework provides.

const { google } = require('googleapis');
const { OAuth2Client } = require('google-auth-library');
const gmail = google.gmail({ version: 'v1' });

async function fetchMessage(event) {
const accessToken = event.gmail.accessToken;
const auth = new OAuth2Client();
auth.setCredentials({access_token: accessToken});

const messageId = event.gmail.messageId;
const res = await gmail.users.messages.get({
id: messageId,
userId: 'me',
headers: { 'X-Goog-Gmail-Access-Token': event.gmail.accessToken },
auth
});
return res.data;
}

The NodeJS version is very similar -- a little extra code to import the libraries, but otherwise the same -- extract the message ID and token from the request, set the credentials, then call the API to get the message contents.

Your Add-on, Your way

One of the biggest wins for alternate runtimes is the testability that comes with using your favorite IDE, language, and framework--all of which helps you make developing add-ons more approachable.

Both Apps Script and alternate runtimes for G Suite Add-ons have important places in building Add-ons. If youโ€™re getting into building Add-ons or if you want to prototype more complex ones, Apps Script is a good choice.. If you write and maintain systems as your full time job, though, alternate runtimes allow you to use those tools to build your Add-on, letting you leverage work, code and processes that youโ€™re already using. With alternate runtimes for G Suite Add-ons, we want to make it possible for you to extend G Suite in a way that fits your needs using whatever tools you're most comfortable with.

And don't just take our word for it, hear from one of our early access partners. Shailesh Matariya, CTO at Gfacility has this to say about alternate runtimes: "We're really happy to use alternate runtimes in G Suite Add-ons. The results have been great and it's much easier to maintain the code. Historically, it would take 4-5 seconds to load data in our Add-on, whereas with alternate runtimes it's closer to 1 second, and that time and efficiency really adds up. Not to mention performance, we're seeing about a 50% performance increase and thanks to this our users are able to manage their workflows with just a few clicks, without having to jump to another system and deal with the hassle of constant updates."

Next Steps

Read the developer documentation for Alternate Runtimes and sign up for the early access program.

...



๐Ÿ“Œ What's Your Favorite Tech Stack and Why?


๐Ÿ“ˆ 28.04 Punkte

๐Ÿ“Œ 'World's favorite airline' favorite among hackers: British Airways site, app hacked for two weeks


๐Ÿ“ˆ 23.56 Punkte

๐Ÿ“Œ How to add shortcuts from your favorite websites to the taskbar in Windows 10


๐Ÿ“ˆ 22.69 Punkte

๐Ÿ“Œ What is your favorite React stack?


๐Ÿ“ˆ 22.09 Punkte

๐Ÿ“Œ Oracle E-Business Suite 11.5.7 Applications Technology Stack Stack-Based unknown vulnerability


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ Oracle E-business Suite 11i 11.5.10.2 Applications Technology Stack Stack-Based unknown vulnerability


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ Oracle E-Business Suite 12.0.4 Applications Technology Stack Stack-Based information disclosure


๐Ÿ“ˆ 21.69 Punkte

๐Ÿ“Œ What are your favorite tech related podcasts


๐Ÿ“ˆ 21.22 Punkte

๐Ÿ“Œ Embracing the Fun: Share Your Favorite Tech April Fools'!


๐Ÿ“ˆ 21.22 Punkte

๐Ÿ“Œ The Art and Science of Building a Cyber Security Tech Stack


๐Ÿ“ˆ 20.74 Punkte

๐Ÿ“Œ Diary - Building my own social midia - Picking the tech stack - 3/X


๐Ÿ“ˆ 20.74 Punkte

๐Ÿ“Œ How to add your Outlook calendar to your Google calendar! #viral #tech #shorts


๐Ÿ“ˆ 20.35 Punkte

๐Ÿ“Œ Microsoft 365 vs Google Workspace (formerly G Suite): Which productivity suite is best for your business?


๐Ÿ“ˆ 19.6 Punkte

๐Ÿ“Œ Building Your Own PC: A Step-by-Step Guide to Custom PC Building


๐Ÿ“ˆ 19.45 Punkte

๐Ÿ“Œ Introducing an easier way to design your G Suite Add-on


๐Ÿ“ˆ 18.96 Punkte

๐Ÿ“Œ Building Trust & Security: How to Add E-Signatures to Your Documents


๐Ÿ“ˆ 18.88 Punkte

๐Ÿ“Œ Who else has a USB stick that is always in your pocket and has your favorite distro on it.


๐Ÿ“ˆ 18.77 Punkte

๐Ÿ“Œ That Tablet On The Table At Your Favorite Restaurant Is Hurting Your Waiter


๐Ÿ“ˆ 18.77 Punkte

๐Ÿ“Œ Roll20 brings pen-and-paper gameplay to your browser with features that save time and enhance your favorite parts of tabletop games.


๐Ÿ“ˆ 18.77 Punkte

๐Ÿ“Œ Download your favorite Disney+ movies and shows right on your iOS device


๐Ÿ“ˆ 18.77 Punkte

๐Ÿ“Œ What was your 1st Linux distro & which is your favorite flavor today?


๐Ÿ“ˆ 18.77 Punkte

๐Ÿ“Œ Casetify 'The Office' cases review: Your favorite TV characters to rep your fandom


๐Ÿ“ˆ 18.77 Punkte

๐Ÿ“Œ Tech-Recruitment: Von Tech-Stack, Geschรคftslogik und Mindset


๐Ÿ“ˆ 18.71 Punkte

๐Ÿ“Œ How Does Chinese Tech Stack Up Against American Tech?


๐Ÿ“ˆ 18.71 Punkte

๐Ÿ“Œ Favorite Developer Tools: CodePen, Stack Overflow, GitHub?


๐Ÿ“ˆ 18.6 Punkte

๐Ÿ“Œ The Best MSP Software: Building Your MSP Tool Stack [2024]


๐Ÿ“ˆ 18.29 Punkte

๐Ÿ“Œ Tech Strides, Tech Worries and Tech Visions: ECT News Roundtable, Episode 1


๐Ÿ“ˆ 17.84 Punkte

๐Ÿ“Œ Tech/Non-tech books which Tech people should read


๐Ÿ“ˆ 17.84 Punkte

๐Ÿ“Œ Navigation in Flutter โ€“ How to Add Stack, Tab, and Drawer Navigators to Your Apps


๐Ÿ“ˆ 17.73 Punkte

๐Ÿ“Œ How to Add Authorization and Protect Your Application With OpenAM and OpenIG Stack


๐Ÿ“ˆ 17.73 Punkte

๐Ÿ“Œ Techโ€™s Favorite School Faces Its Biggest Test: the Real World


๐Ÿ“ˆ 17.73 Punkte

๐Ÿ“Œ Techโ€™s Favorite School Faces Its Biggest Test: the Real World


๐Ÿ“ˆ 17.73 Punkte

๐Ÿ“Œ My favorite tech repair tool just got smaller, and better


๐Ÿ“ˆ 17.73 Punkte











matomo