8000 enhance: gmail: add tool to get the signed in user's address by g-linville · Pull Request #503 · obot-platform/tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

enhance: gmail: add tool to get the signed in user's address #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions google/gmail/currentEmail.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import asyncio
from helpers import client

async def main():
service = client('gmail', 'v1')
try:
profile = service.users().getProfile(userId='me').execute()
email_address = profile['emailAddress']
print(email_address)
except Exception as e:
print(f"Error getting email address: {e}")
return None

if __name__ == "__main__":
asyncio.run(main())
9 changes: 8 additions & 1 deletion google/gmail/tool.gpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
Name: Gmail
Description: Tools for interacting with a user's Gmail account
Metadata: bundle: true
Share Tools: List Inbox, Read Email, Search Emails, Send Email, Delete Email, List Drafts, Create Draft, Update Draft, Delete Draft, Send Draft
Share Tools: Current Email, List Inbox, Read Email, Search Emails, Send Email, Delete Email, List Drafts, Create Draft, Update Draft, Delete Draft, Send Draft

---
Name: Current Email
Description: Gets the email address of the currently signed in user
Credential: ../credential

#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/currentEmail.py

---
Name: List Inbox
Expand Down
Loading
0