Skip to content

Commit 9224467

Browse files
committed
Add GoogleSlides tools
1 parent 9e54d18 commit 9224467

19 files changed

Lines changed: 590 additions & 4 deletions

pages/toolkits/productivity/_meta.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default {
77
google_contacts: "Google Contacts",
88
google_docs: "Google Docs",
99
google_drive: "Google Drive",
10+
google_slides: "Google Slides",
1011
google_sheets: "Google Sheets",
1112
jira: "Jira",
1213
linear: "Linear",

pages/toolkits/productivity/google_docs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ Searches for documents in the user's Google Drive and returns a list of document
224224
label: "Call the Tool with User Authorization",
225225
content: {
226226
Python: [
227-
"/examples/integrations/toolkits/google/docs/list_document_comments.py",
227+
"/examples/integrations/toolkits/google/docs/list_document_comments_example_call_tool.py",
228228
],
229-
JavaScript: ["/examples/integrations/toolkits/google/docs/list_document_comments.js"],
229+
JavaScript: ["/examples/integrations/toolkits/google/docs/list_document_comments_example_call_tool.js"],
230230
},
231231
}
232232
]}
@@ -250,9 +250,9 @@ List all comments on the specified Google Docs document.
250250
label: "Call the Tool with User Authorization",
251251
content: {
252252
Python: [
253-
"/examples/integrations/toolkits/google/docs/comment_on_document.py",
253+
"/examples/integrations/toolkits/google/docs/comment_on_document_example_call_tool.py",
254254
],
255-
JavaScript: ["/examples/integrations/toolkits/google/docs/comment_on_document.js"],
255+
JavaScript: ["/examples/integrations/toolkits/google/docs/comment_on_document_example_call_tool.js"],
256256
},
257257
}
258258
]}
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
# GoogleSlides
2+
3+
import ToolInfo from "@/components/ToolInfo";
4+
import Badges from "@/components/Badges";
5+
import TabbedCodeBlock from "@/components/TabbedCodeBlock";
6+
import TableOfContents from "@/components/TableOfContents";
7+
import ToolFooter from "@/components/ToolFooter";
8+
9+
<ToolInfo
10+
description="Enable agents to interact with GoogleSlides"
11+
author="Arcade"
12+
authType="OAuth2"
13+
versions={["0.1.0"]}
14+
/>
15+
16+
<Badges repo="arcadeai/arcade_google_slides" />
17+
18+
The GoogleSlides toolkit provides a set of tools for interacting with Google Slides presentations. These tools enable users and AI applications to:
19+
20+
- Create new presentations and add slides.
21+
- Comment on specific slides and list all comments in a presentation.
22+
- Search for presentations in Google Drive.
23+
- Retrieve and convert presentation content to markdown format.
24+
25+
## Available Tools
26+
27+
<TableOfContents
28+
headers={["Tool Name", "Description"]}
29+
data={
30+
[
31+
["GoogleSlides.CommentOnPresentation", "Comment on a specific slide by its index in a Google Slides presentation."],
32+
["GoogleSlides.ListPresentationComments", "List all comments on the specified Google Slides presentation."],
33+
["GoogleSlides.CreatePresentation", "Create a new Google Slides presentation"],
34+
["GoogleSlides.CreateSlide", "Create a new slide at the end of the specified presentation"],
35+
["GoogleSlides.SearchPresentations", "Searches for presentations in the user's Google Drive."],
36+
["GoogleSlides.GetPresentationAsMarkdown", "Get the specified Google Slides presentation and convert it to markdown."],
37+
]
38+
}
39+
/>
40+
41+
<Tip>
42+
If you need to perform an action that's not listed here, you can [get in touch
43+
with us](mailto:contact@arcade.dev) to request a new tool, or [create your
44+
own tools](/home/build-tools/create-a-toolkit).
45+
</Tip>
46+
47+
## GoogleSlides.CommentOnPresentation
48+
49+
<br />
50+
<TabbedCodeBlock
51+
tabs={[
52+
{
53+
label: "Call the Tool Directly",
54+
content: {
55+
Python: ["/examples/integrations/toolkits/google/slides/comment_on_presentation_example_call_tool.py"],
56+
JavaScript: ["/examples/integrations/toolkits/google/slides/comment_on_presentation_example_call_tool.js"],
57+
},
58+
},
59+
]}
60+
/>
61+
62+
Comment on a specific slide by its index in a Google Slides presentation.
63+
64+
**Parameters**
65+
66+
- **presentation_id** (`string`, required) The ID of the presentation to comment on
67+
- **comment_text** (`string`, required) The comment to add to the slide
68+
69+
70+
## GoogleSlides.ListPresentationComments
71+
72+
<br />
73+
<TabbedCodeBlock
74+
tabs={[
75+
{
76+
label: "Call the Tool Directly",
77+
content: {
78+
Python: ["/examples/integrations/toolkits/google/slides/list_presentation_comments_example_call_tool.py"],
79+
JavaScript: ["/examples/integrations/toolkits/google/slides/list_presentation_comments_example_call_tool.js"],
80+
},
81+
},
82+
]}
83+
/>
84+
85+
List all comments on the specified Google Slides presentation.
86+
87+
**Parameters**
88+
89+
- **presentation_id** (`string`, required) The ID of the presentation to list comments for
90+
- **include_deleted** (`boolean`, optional) Whether to include deleted comments in the results. Defaults to False.
91+
92+
93+
## GoogleSlides.CreatePresentation
94+
95+
<br />
96+
<TabbedCodeBlock
97+
tabs={[
98+
{
99+
label: "Call the Tool Directly",
100+
content: {
101+
Python: ["/examples/integrations/toolkits/google/slides/create_presentation_example_call_tool.py"],
102+
JavaScript: ["/examples/integrations/toolkits/google/slides/create_presentation_example_call_tool.js"],
103+
},
104+
},
105+
]}
106+
/>
107+
108+
Create a new Google Slides presentation
109+
110+
**Parameters**
111+
112+
- **title** (`string`, required) The title of the presentation to create
113+
- **subtitle** (`string`, optional) The subtitle of the presentation to create
114+
115+
116+
## GoogleSlides.CreateSlide
117+
118+
<br />
119+
<TabbedCodeBlock
120+
tabs={[
121+
{
122+
label: "Call the Tool Directly",
123+
content: {
124+
Python: ["/examples/integrations/toolkits/google/slides/create_slide_example_call_tool.py"],
125+
JavaScript: ["/examples/integrations/toolkits/google/slides/create_slide_example_call_tool.js"],
126+
},
127+
},
128+
]}
129+
/>
130+
131+
Create a new slide at the end of the specified presentation
132+
133+
**Parameters**
134+
135+
- **presentation_id** (`string`, required) The ID of the presentation to create the slide in
136+
- **slide_title** (`string`, required) The title of the slide to create
137+
- **slide_body** (`string`, required) The body (text) of the slide to create
138+
139+
140+
## GoogleSlides.SearchPresentations
141+
142+
<br />
143+
<TabbedCodeBlock
144+
tabs={[
145+
{
146+
label: "Call the Tool Directly",
147+
content: {
148+
Python: ["/examples/integrations/toolkits/google/slides/search_presentations_example_call_tool.py"],
149+
JavaScript: ["/examples/integrations/toolkits/google/slides/search_presentations_example_call_tool.js"],
150+
},
151+
},
152+
]}
153+
/>
154+
155+
Searches for presentations in the user's Google Drive.
156+
157+
**Parameters**
158+
159+
- **presentation_contains** (`array[string]`, optional) Keywords or phrases that must be in the presentation title or content. Provide a list of keywords or phrases if needed.
160+
- **presentation_not_contains** (`array[string]`, optional) Keywords or phrases that must NOT be in the presentation title or content. Provide a list of keywords or phrases if needed.
161+
- **search_only_in_shared_drive_id** (`string`, optional) The ID of the shared drive to restrict the search to. If provided, the search will only return presentations from this drive. Defaults to None, which searches across all drives.
162+
- **include_shared_drives** (`boolean`, optional) Whether to include presentations from shared drives. Defaults to False (searches only in the user's 'My Drive').
163+
- **include_organization_domain_presentations** (`boolean`, optional) Whether to include presentations from the organization's domain. This is applicable to admin users who have permissions to view organization-wide presentations in a Google Workspace account. Defaults to False.
164+
- **order_by** (`Enum` [OrderBy](/toolkits/productivity/googleslides/reference#OrderBy), optional) Sort order. Defaults to listing the most recently modified presentations first
165+
- **limit** (`integer`, optional) The number of presentations to list
166+
- **pagination_token** (`string`, optional) The pagination token to continue a previous request
167+
168+
169+
## GoogleSlides.GetPresentationAsMarkdown
170+
171+
<br />
172+
<TabbedCodeBlock
173+
tabs={[
174+
{
175+
label: "Call the Tool Directly",
176+
content: {
177+
Python: ["/examples/integrations/toolkits/google/slides/get_presentation_as_markdown_example_call_tool.py"],
178+
JavaScript: ["/examples/integrations/toolkits/google/slides/get_presentation_as_markdown_example_call_tool.js"],
179+
},
180+
},
181+
]}
182+
/>
183+
184+
Get the specified Google Slides presentation and convert it to markdown.
185+
186+
**Parameters**
187+
188+
- **presentation_id** (`string`, required) The ID of the presentation to retrieve.
189+
190+
191+
192+
193+
## Auth
194+
195+
The Arcade GoogleSlides toolkit uses the [Google auth provider](/home/auth-providers/google) to connect to users' GoogleSlides accounts. Please refer to the [Google auth provider](/home/auth-providers/google) documentation to learn how to configure auth.
196+
197+
## GoogleSlides Reference
198+
199+
Below is a reference of enumerations used by some tools in the GoogleSlides toolkit:
200+
201+
### OrderBy
202+
203+
- **CREATED_TIME**: `createdTime`
204+
- **CREATED_TIME_DESC**: `createdTime desc`
205+
- **FOLDER**: `folder`
206+
- **FOLDER_DESC**: `folder desc`
207+
- **MODIFIED_BY_ME_TIME**: `modifiedByMeTime`
208+
- **MODIFIED_BY_ME_TIME_DESC**: `modifiedByMeTime desc`
209+
- **MODIFIED_TIME**: `modifiedTime`
210+
- **MODIFIED_TIME_DESC**: `modifiedTime desc`
211+
- **NAME**: `name`
212+
- **NAME_DESC**: `name desc`
213+
- **NAME_NATURAL**: `name_natural`
214+
- **NAME_NATURAL_DESC**: `name_natural desc`
215+
- **QUOTA_BYTES_USED**: `quotaBytesUsed`
216+
- **QUOTA_BYTES_USED_DESC**: `quotaBytesUsed desc`
217+
- **RECENCY**: `recency`
218+
- **RECENCY_DESC**: `recency desc`
219+
- **SHARED_WITH_ME_TIME**: `sharedWithMeTime`
220+
- **SHARED_WITH_ME_TIME_DESC**: `sharedWithMeTime desc`
221+
- **STARRED**: `starred`
222+
- **STARRED_DESC**: `starred desc`
223+
- **VIEWED_BY_ME_TIME**: `viewedByMeTime`
224+
- **VIEWED_BY_ME_TIME_DESC**: `viewedByMeTime desc`
225+
226+
<ToolFooter pipPackageName="arcade_google_slides" />

public/examples/integrations/toolkits/google/docs/comment_on_document.js renamed to public/examples/integrations/toolkits/google/docs/comment_on_document_example_call_tool.js

File renamed without changes.

public/examples/integrations/toolkits/google/docs/comment_on_document.py renamed to public/examples/integrations/toolkits/google/docs/comment_on_document_example_call_tool.py

File renamed without changes.

public/examples/integrations/toolkits/google/docs/list_document_comments.js renamed to public/examples/integrations/toolkits/google/docs/list_document_comments_example_call_tool.js

File renamed without changes.

public/examples/integrations/toolkits/google/docs/list_document_comments.py renamed to public/examples/integrations/toolkits/google/docs/list_document_comments_example_call_tool.py

File renamed without changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "GoogleSlides.CommentOnPresentation";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({
10+
tool_name: TOOL_NAME,
11+
user_id: USER_ID,
12+
});
13+
14+
if (authResponse.status !== "completed") {
15+
console.log(`Click this link to authorize: ${authResponse.url}`);
16+
}
17+
18+
// Wait for the authorization to complete
19+
await client.auth.waitForCompletion(authResponse);
20+
21+
const toolInput = {
22+
presentation_id: "your_presentation_id_here",
23+
comment_text: "This is a comment"
24+
};
25+
26+
const response = await client.tools.execute({
27+
tool_name: TOOL_NAME,
28+
input: toolInput,
29+
user_id: USER_ID,
30+
});
31+
32+
console.log(response);
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from arcadepy import Arcade
2+
3+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
USER_ID = "{arcade_user_id}"
6+
TOOL_NAME = "GoogleSlides.CommentOnPresentation"
7+
8+
auth_response = client.tools.authorize(
9+
tool_name=TOOL_NAME,
10+
user_id=USER_ID,
11+
)
12+
13+
if auth_response.status != "completed":
14+
print(f"Click this link to authorize: {auth_response.url}")
15+
16+
# Wait for the authorization to complete
17+
client.auth.wait_for_completion(auth_response)
18+
19+
tool_input = {"presentation_id": "your_presentation_id_here", "comment_text": "This is a comment"}
20+
21+
response = client.tools.execute(
22+
tool_name=TOOL_NAME,
23+
input=tool_input,
24+
user_id=USER_ID,
25+
)
26+
print(response)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "GoogleSlides.CreatePresentation";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({
10+
tool_name: TOOL_NAME,
11+
user_id: USER_ID,
12+
});
13+
14+
if (authResponse.status !== "completed") {
15+
console.log(`Click this link to authorize: ${authResponse.url}`);
16+
}
17+
18+
// Wait for the authorization to complete
19+
await client.auth.waitForCompletion(authResponse);
20+
21+
const toolInput = {
22+
title: "New Presentation",
23+
subtitle: "By {arcade_user_id}"
24+
};
25+
26+
const response = await client.tools.execute({
27+
tool_name: TOOL_NAME,
28+
input: toolInput,
29+
user_id: USER_ID,
30+
});
31+
32+
console.log(response);

0 commit comments

Comments
 (0)