googleworkspace / gws-genai-addon-sample Goto Github PK
View Code? Open in Web Editor NEWA sample Google Workspace add-on for Gmail and Google Drive using Node.js and demonstrating how to use various Generative AI APIs
License: Apache License 2.0
A sample Google Workspace add-on for Gmail and Google Drive using Node.js and demonstrating how to use various Generative AI APIs
License: Apache License 2.0
I just noticed you mention renderActions
in the common card ui generator, and then render_actions
in the card ui generators, what's the difference?
What I want to achieve is to create a dynamic dropdown (fetch from a database and based on the selection display a list of items).
The problem is I can't get the onChangeAction
to work this is on my home card so I configured the action to trigger the function of my home card.
{
widgets: [
{
selectionInput: {
type: 'DROPDOWN',
name: 'projects',
label: 'Select project',
items: projects.map((project) => ({
text: project.name,
value: project.id,
selected: project.id === selectedProjectId,
})),
onChangeAction: {
function:
'https://xxxxxxxx/onCalendarHomePageOpen',
parameters: [],
},
},
},
],
}
I see this error:
Cannot find field: action in message google.apps.card.v1.SubmitFormResponse
Then I add render_actions and the onChange works, but the rest state breaks.
This same thing happens when I try to navigate back to the home card from another one.
Tried with updateCard
instead of pushCard
but no luck.
Thank you very much
Hi @Mansari and @vinay-google
Thanks for this great example! , was very useful.
I have everything working but now I'm not sure how my team and I can work locally on the project.
What I did was to tunnel server.js
with ngrok and put the public url on deployment.json
and default.json
, then rebuilding . It works, I can see my local changes but now if anyone wants to work it will have to re-deploy with their own ngrok url blocking the rest of the team.
Is there another way to work locally? I could only find this which shows there is live reload: https://developers.googleblog.com/2021/03/evolving-google-workspace-add-ons-with.html but it doesnt explain how
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.