Skip to content

Commit 6d831cc

Browse files
committed
feat(google-contacts): add google contacts integration
1 parent 67f8a68 commit 6d831cc

File tree

20 files changed

+1362
-7
lines changed

20 files changed

+1362
-7
lines changed

apps/docs/components/icons.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,32 @@ export function GoogleSlidesIcon(props: SVGProps<SVGSVGElement>) {
12351235
)
12361236
}
12371237

1238+
export function GoogleContactsIcon(props: SVGProps<SVGSVGElement>) {
1239+
return (
1240+
<svg
1241+
{...props}
1242+
viewBox='0 0 24 24'
1243+
fill='none'
1244+
xmlns='http://www.w3.org/2000/svg'
1245+
>
1246+
<path
1247+
d='M20.16 3H3.84C2.82 3 2 3.82 2 4.84v14.32C2 20.18 2.82 21 3.84 21h16.32c1.02 0 1.84-.82 1.84-1.84V4.84C22 3.82 21.18 3 20.16 3z'
1248+
fill='#F1F3F4'
1249+
/>
1250+
<path
1251+
d='M12 12.75c-1.63 0-4.88.82-4.88 2.44v1.22c0 .34.27.61.61.61h8.54c.34 0 .61-.27.61-.61v-1.22c0-1.63-3.25-2.44-4.88-2.44z'
1252+
fill='#4285F4'
1253+
/>
1254+
<circle cx='12' cy='9.38' r='2.5' fill='#4285F4' />
1255+
<path
1256+
d='M17.25 12.13c.72.49 1.63 1.23 1.63 2.19v1.09h1.25c.34 0 .61-.27.61-.61v-1.22c0-1.06-1.96-1.67-3.49-1.45z'
1257+
fill='#A0C3FF'
1258+
/>
1259+
<circle cx='17' cy='9.38' r='1.88' fill='#A0C3FF' />
1260+
</svg>
1261+
)
1262+
}
1263+
12381264
export function GoogleCalendarIcon(props: SVGProps<SVGSVGElement>) {
12391265
return (
12401266
<svg

apps/docs/components/ui/icon-mapping.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ import {
3838
EyeIcon,
3939
FirecrawlIcon,
4040
FirefliesIcon,
41-
GithubIcon,
4241
GitLabIcon,
42+
GithubIcon,
4343
GmailIcon,
4444
GongIcon,
4545
GoogleBooksIcon,
4646
GoogleCalendarIcon,
47+
GoogleContactsIcon,
4748
GoogleDocsIcon,
4849
GoogleDriveIcon,
4950
GoogleFormsIcon,
@@ -72,9 +73,9 @@ import {
7273
LinearIcon,
7374
LinkedInIcon,
7475
LinkupIcon,
76+
MailServerIcon,
7577
MailchimpIcon,
7678
MailgunIcon,
77-
MailServerIcon,
7879
Mem0Icon,
7980
MicrosoftDataverseIcon,
8081
MicrosoftExcelIcon,
@@ -107,6 +108,8 @@ import {
107108
ResendIcon,
108109
RevenueCatIcon,
109110
S3Icon,
111+
SQSIcon,
112+
STTIcon,
110113
SalesforceIcon,
111114
SearchIcon,
112115
SendgridIcon,
@@ -118,19 +121,17 @@ import {
118121
SimilarwebIcon,
119122
SlackIcon,
120123
SmtpIcon,
121-
SQSIcon,
122124
SshIcon,
123-
STTIcon,
124125
StagehandIcon,
125126
StripeIcon,
126127
SupabaseIcon,
128+
TTSIcon,
127129
TavilyIcon,
128130
TelegramIcon,
129131
TextractIcon,
130132
TinybirdIcon,
131133
TranslateIcon,
132134
TrelloIcon,
133-
TTSIcon,
134135
TwilioIcon,
135136
TypeformIcon,
136137
UpstashIcon,
@@ -141,11 +142,11 @@ import {
141142
WhatsAppIcon,
142143
WikipediaIcon,
143144
WordpressIcon,
144-
xIcon,
145145
YouTubeIcon,
146146
ZendeskIcon,
147147
ZepIcon,
148148
ZoomIcon,
149+
xIcon,
149150
} from '@/components/icons'
150151

151152
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
@@ -189,6 +190,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
189190
gong: GongIcon,
190191
google_books: GoogleBooksIcon,
191192
google_calendar_v2: GoogleCalendarIcon,
193+
google_contacts: GoogleContactsIcon,
192194
google_docs: GoogleDocsIcon,
193195
google_drive: GoogleDriveIcon,
194196
google_forms: GoogleFormsIcon,
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
---
2+
title: Google Contacts
3+
description: Manage Google Contacts
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="google_contacts"
10+
color="#E0E0E0"
11+
/>
12+
13+
## Usage Instructions
14+
15+
Integrate Google Contacts into the workflow. Can create, read, update, delete, list, and search contacts.
16+
17+
18+
19+
## Tools
20+
21+
### `google_contacts_create`
22+
23+
Create a new contact in Google Contacts
24+
25+
#### Input
26+
27+
| Parameter | Type | Required | Description |
28+
| --------- | ---- | -------- | ----------- |
29+
| `givenName` | string | Yes | First name of the contact |
30+
| `familyName` | string | No | Last name of the contact |
31+
| `email` | string | No | Email address of the contact |
32+
| `emailType` | string | No | Email type: home, work, or other |
33+
| `phone` | string | No | Phone number of the contact |
34+
| `phoneType` | string | No | Phone type: mobile, home, work, or other |
35+
| `organization` | string | No | Organization/company name |
36+
| `jobTitle` | string | No | Job title at the organization |
37+
| `notes` | string | No | Notes or biography for the contact |
38+
39+
#### Output
40+
41+
| Parameter | Type | Description |
42+
| --------- | ---- | ----------- |
43+
| `content` | string | Contact creation confirmation message |
44+
| `metadata` | json | Created contact metadata including resource name and details |
45+
46+
### `google_contacts_get`
47+
48+
Get a specific contact from Google Contacts
49+
50+
#### Input
51+
52+
| Parameter | Type | Required | Description |
53+
| --------- | ---- | -------- | ----------- |
54+
| `resourceName` | string | Yes | Resource name of the contact \(e.g., people/c1234567890\) |
55+
56+
#### Output
57+
58+
| Parameter | Type | Description |
59+
| --------- | ---- | ----------- |
60+
| `content` | string | Contact retrieval confirmation message |
61+
| `metadata` | json | Contact details including name, email, phone, and organization |
62+
63+
### `google_contacts_list`
64+
65+
List contacts from Google Contacts
66+
67+
#### Input
68+
69+
| Parameter | Type | Required | Description |
70+
| --------- | ---- | -------- | ----------- |
71+
| `pageSize` | number | No | Number of contacts to return \(1-1000, default 100\) |
72+
| `pageToken` | string | No | Page token from a previous list request for pagination |
73+
| `sortOrder` | string | No | Sort order for contacts |
74+
75+
#### Output
76+
77+
| Parameter | Type | Description |
78+
| --------- | ---- | ----------- |
79+
| `content` | string | Summary of found contacts count |
80+
| `metadata` | json | List of contacts with pagination tokens |
81+
82+
### `google_contacts_search`
83+
84+
Search contacts in Google Contacts by name, email, phone, or organization
85+
86+
#### Input
87+
88+
| Parameter | Type | Required | Description |
89+
| --------- | ---- | -------- | ----------- |
90+
| `query` | string | Yes | Search query to match against contact names, emails, phones, and organizations |
91+
| `pageSize` | number | No | Number of results to return \(default 10, max 30\) |
92+
93+
#### Output
94+
95+
| Parameter | Type | Description |
96+
| --------- | ---- | ----------- |
97+
| `content` | string | Summary of search results count |
98+
| `metadata` | json | Search results with matching contacts |
99+
100+
### `google_contacts_update`
101+
102+
Update an existing contact in Google Contacts
103+
104+
#### Input
105+
106+
| Parameter | Type | Required | Description |
107+
| --------- | ---- | -------- | ----------- |
108+
| `resourceName` | string | Yes | Resource name of the contact \(e.g., people/c1234567890\) |
109+
| `etag` | string | Yes | ETag from a previous get request \(required for concurrency control\) |
110+
| `givenName` | string | No | Updated first name |
111+
| `familyName` | string | No | Updated last name |
112+
| `email` | string | No | Updated email address |
113+
| `emailType` | string | No | Email type: home, work, or other |
114+
| `phone` | string | No | Updated phone number |
115+
| `phoneType` | string | No | Phone type: mobile, home, work, or other |
116+
| `organization` | string | No | Updated organization/company name |
117+
| `jobTitle` | string | No | Updated job title |
118+
| `notes` | string | No | Updated notes or biography |
119+
120+
#### Output
121+
122+
| Parameter | Type | Description |
123+
| --------- | ---- | ----------- |
124+
| `content` | string | Contact update confirmation message |
125+
| `metadata` | json | Updated contact metadata |
126+
127+
### `google_contacts_delete`
128+
129+
Delete a contact from Google Contacts
130+
131+
#### Input
132+
133+
| Parameter | Type | Required | Description |
134+
| --------- | ---- | -------- | ----------- |
135+
| `resourceName` | string | Yes | Resource name of the contact to delete \(e.g., people/c1234567890\) |
136+
137+
#### Output
138+
139+
| Parameter | Type | Description |
140+
| --------- | ---- | ----------- |
141+
| `content` | string | Contact deletion confirmation message |
142+
| `metadata` | json | Deletion details including resource name |
143+
144+

apps/docs/content/docs/en/tools/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"gong",
4040
"google_books",
4141
"google_calendar",
42+
"google_contacts",
4243
"google_docs",
4344
"google_drive",
4445
"google_forms",
@@ -146,4 +147,4 @@
146147
"zep",
147148
"zoom"
148149
]
149-
}
150+
}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const SCOPE_DESCRIPTIONS: Record<string, string> = {
4040
'https://www.googleapis.com/auth/drive.file': 'View and manage Google Drive files',
4141
'https://www.googleapis.com/auth/drive': 'Access all Google Drive files',
4242
'https://www.googleapis.com/auth/calendar': 'View and manage calendar',
43+
'https://www.googleapis.com/auth/contacts': 'View and manage Google Contacts',
4344
'https://www.googleapis.com/auth/userinfo.email': 'View email address',
4445
'https://www.googleapis.com/auth/userinfo.profile': 'View basic profile info',
4546
'https://www.googleapis.com/auth/forms.body': 'View and manage Google Forms',

0 commit comments

Comments
 (0)