├── README.md ├── gmail-assistant ├── gmail-assistant-firebase │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── backend │ │ ├── .env.example │ │ ├── agent.py │ │ ├── composio_config.py │ │ ├── firebase │ │ │ ├── __pycache__ │ │ │ │ └── init.cpython-312.pyc │ │ │ └── init.py │ │ ├── initialize_sheet_agent.py │ │ ├── main.py │ │ ├── requirements.txt │ │ └── setup.sh │ ├── eslint.config.js │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ └── vite.svg │ ├── src │ │ ├── App.css │ │ ├── App.jsx │ │ ├── assets │ │ │ ├── brain.svg │ │ │ └── react.svg │ │ ├── components │ │ │ ├── ActionButton.jsx │ │ │ ├── AddAgent.jsx │ │ │ ├── Avatar.jsx │ │ │ ├── BenefitCard.jsx │ │ │ ├── Benefits.jsx │ │ │ ├── FAQ.jsx │ │ │ ├── Footer.jsx │ │ │ ├── Hero.jsx │ │ │ ├── LogoComponent.jsx │ │ │ ├── Navbar.jsx │ │ │ ├── ResponsiveMessage.jsx │ │ │ ├── ScrollToTop.jsx │ │ │ ├── SettingsAttribute.jsx │ │ │ ├── SkeletonLoader.jsx │ │ │ ├── SmallButton.jsx │ │ │ ├── Working.jsx │ │ │ └── WorkingFlow.jsx │ │ ├── config │ │ │ └── firebase.js │ │ ├── index.css │ │ ├── main.jsx │ │ ├── pages │ │ │ ├── Agent.jsx │ │ │ ├── Dashboard.jsx │ │ │ ├── Home.jsx │ │ │ ├── Login.jsx │ │ │ ├── NotFound.jsx │ │ │ └── Settings.jsx │ │ └── utils │ │ │ └── authUtils.js │ ├── tailwind.config.js │ ├── vercel.json │ └── vite.config.js ├── gmail-assistant-simple │ ├── .gitignore │ ├── README.md │ ├── backend │ │ ├── .env.example │ │ ├── agent.py │ │ ├── counter.json │ │ ├── main.py │ │ ├── requirements.txt │ │ ├── setup.sh │ │ └── taskData.json │ ├── eslint.config.js │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ └── vite.svg │ ├── src │ │ ├── App.css │ │ ├── App.jsx │ │ ├── assets │ │ │ ├── brain.svg │ │ │ └── react.svg │ │ ├── components │ │ │ ├── ActionButton.jsx │ │ │ ├── BenefitCard.jsx │ │ │ ├── Benefits.jsx │ │ │ ├── ConfigParameters.jsx │ │ │ ├── FAQ.jsx │ │ │ ├── Footer.jsx │ │ │ ├── Hero.jsx │ │ │ ├── LogoComponent.jsx │ │ │ ├── Navbar.jsx │ │ │ ├── ScrollToTop.jsx │ │ │ └── Working.jsx │ │ ├── index.css │ │ ├── main.jsx │ │ └── pages │ │ │ ├── Dashboard.jsx │ │ │ └── Home.jsx │ ├── tailwind.config.js │ └── vite.config.js └── gmail-assistant-support │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── backend │ ├── .env.example │ ├── agent.py │ ├── agent_slackbot.py │ ├── composio_config.py │ ├── firebase │ │ ├── __pycache__ │ │ │ └── init.cpython-312.pyc │ │ └── init.py │ ├── initialise_agent.py │ ├── initialize_sheet_agent.py │ ├── main.py │ ├── prompt.py │ ├── requirements.txt │ └── setup.sh │ ├── eslint.config.js │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ └── vite.svg │ ├── src │ ├── App.css │ ├── App.jsx │ ├── assets │ │ ├── brain.svg │ │ ├── gmailLogo.png │ │ ├── react.svg │ │ └── slackLogo.png │ ├── components │ │ ├── ActionButton.jsx │ │ ├── AddAgent.jsx │ │ ├── Avatar.jsx │ │ ├── BenefitCard.jsx │ │ ├── Benefits.jsx │ │ ├── FAQ.jsx │ │ ├── Footer.jsx │ │ ├── Hero.jsx │ │ ├── LogoComponent.jsx │ │ ├── Navbar.jsx │ │ ├── NewMail.jsx │ │ ├── RedirectedTo.jsx │ │ ├── ResponsiveMessage.jsx │ │ ├── ScrollToTop.jsx │ │ ├── SettingsAttribute.jsx │ │ ├── SkeletonLoader.jsx │ │ ├── SmallButton.jsx │ │ ├── Working.jsx │ │ └── WorkingFlow.jsx │ ├── config │ │ └── firebase.js │ ├── index.css │ ├── main.jsx │ ├── pages │ │ ├── Agent.jsx │ │ ├── Home.jsx │ │ ├── Login.jsx │ │ ├── NotFound.jsx │ │ └── Settings.jsx │ └── utils │ │ └── authUtils.js │ ├── tailwind.config.js │ ├── vercel.json │ └── vite.config.js ├── imgs ├── banner.gif ├── banner.png ├── composio_black_font.svg └── composio_white_font.svg └── twitter-assistant └── twitter-retweet-helper ├── .env.example ├── .gitignore ├── README.md ├── backend ├── .env.example ├── TweetAndRepost.py ├── agent.py ├── agent_repost.py ├── agent_tweet.py ├── composio_config.py ├── firebase │ └── init.py ├── get_connections.py ├── initialise_agent.py ├── main.py ├── new_tweet_repost.py ├── prompt.py ├── quote_generator.py ├── repost_existing_tweet.py ├── requirements.txt ├── setup.sh └── twitter_functions.py ├── eslint.config.js ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public └── vite.svg ├── src ├── App.css ├── App.jsx ├── assets │ ├── brain.svg │ ├── gmailLogo.png │ ├── react.svg │ ├── slackLogo.png │ └── twitterUI │ │ ├── main_post.png │ │ ├── repost1.png │ │ └── repost2.png ├── components │ ├── ActionButton.jsx │ ├── AddNewUser.jsx │ ├── AddNewUserOutline.jsx │ ├── AddNewUserSearchBar.jsx │ ├── AddedUsers.jsx │ ├── AuthorizedUsers.jsx │ ├── Avatar.jsx │ ├── BenefitCard.jsx │ ├── Benefits.jsx │ ├── Clipboard.jsx │ ├── ComingSoon.jsx │ ├── CreatePostTextArea.jsx │ ├── FAQ.jsx │ ├── Footer.jsx │ ├── GetPostTextArea.jsx │ ├── Hero.jsx │ ├── LogoComponent.jsx │ ├── Navbar.jsx │ ├── NewMail.jsx │ ├── ReTweetCard.jsx │ ├── RedirectedTo.jsx │ ├── ResponsiveMessage.jsx │ ├── ScrollToTop.jsx │ ├── Separator.jsx │ ├── SettingsAttribute.jsx │ ├── SkeletonLoader.jsx │ ├── SmallButton.jsx │ ├── TwitterUserCard.jsx │ ├── UsersIcon.jsx │ ├── Working.jsx │ └── WorkingFlow.jsx ├── config │ └── firebase.js ├── index.css ├── main.jsx ├── pages │ ├── CreatePost.jsx │ ├── Home.jsx │ ├── Login.jsx │ ├── NotFound.jsx │ ├── Repost.jsx │ └── Settings.jsx └── utils │ ├── composio_utils.js │ ├── firebase_utils.js │ └── twitter_utils.js ├── tailwind.config.js ├── vercel.json └── vite.config.js /gmail-assistant/gmail-assistant-firebase/.env.example: -------------------------------------------------------------------------------- 1 | VITE_FIREBASE_API_KEY= 2 | VITE_FIREBASE_AUTH_DOMAIN= 3 | VITE_FIREBASE_PROJECT_ID= 4 | VITE_FIREBASE_STORAGE_BUCKET= 5 | VITE_FIREBASE_MESSAGING_SENDER_ID= 6 | VITE_FIREBASE_APP_ID= 7 | VITE_FIREBASE_MEASUREMENT_ID= 8 | VITE_BACKEND_URL= 9 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | .DS_Store 11 | .env 12 | backend/firebase/genius-57d8d-firebase-adminsdk-ue7u9-90656332c6.json 13 | backend/attachments 14 | 15 | backend/__pycache__ 16 | backend/genius-57d8d-firebase-adminsdk-ue7u9-90656332c6.json 17 | 18 | node_modules 19 | dist 20 | dist-ssr 21 | *.local 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | 34 | backend/.env 35 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/backend/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= 2 | MODEL= 3 | NANO_API_KEY= 4 | NANO_URL= 5 | FRONTEND_URL= 6 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/backend/firebase/__pycache__/init.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ComposioHQ/cookbook/af3a242220f6435c957bd8542ab7bf7e2ec89ab2/gmail-assistant/gmail-assistant-firebase/backend/firebase/__pycache__/init.cpython-312.pyc -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/backend/firebase/init.py: -------------------------------------------------------------------------------- 1 | import firebase_admin 2 | from firebase_admin import credentials, auth, firestore 3 | from pathlib import Path 4 | import os 5 | 6 | # cred = credentials.Certificate(f"{Path.cwd()}/firebase/genius-57d8d-firebase-adminsdk-ue7u9-90656332c6.json") 7 | creds = { 8 | "type": os.environ.get("type"), 9 | "project_id": os.environ.get("project_id"), 10 | "private_key_id": os.environ.get("private_key_id"), 11 | "private_key": os.environ.get("private_key"), 12 | "client_email": os.environ.get("client_email"), 13 | "client_id": os.environ.get("client_id"), 14 | "auth_uri": os.environ.get("auth_uri"), 15 | "token_uri": os.environ.get("token_uri"), 16 | "auth_provider_x509_cert_url": 17 | os.environ.get("auth_provider_x509_cert_url"), 18 | "client_x509_cert_url": os.environ.get("client_x509_cert_url"), 19 | } 20 | firebase_admin.initialize_app(cred) 21 | 22 | db = firestore.client() 23 | 24 | # def get_user_by_username(username): 25 | # users_ref = db.collection('users') 26 | # query = users_ref.where('username', '==', username).limit(1) 27 | # docs = query.get() 28 | 29 | # for doc in docs: 30 | # return doc.to_dict() 31 | 32 | # return False 33 | 34 | 35 | def get_user_by_username(username): 36 | users_ref = db.collection('users') 37 | query = users_ref.where('uid', '==', username).limit(1) 38 | docs = query.get() 39 | 40 | for doc in docs: 41 | return doc.to_dict() 42 | 43 | return False 44 | 45 | 46 | def update_row(uid, new_row): 47 | users_ref = db.collection('users') 48 | query = users_ref.where('uid', '==', uid).limit(1) 49 | docs = query.get() 50 | 51 | for doc in docs: 52 | try: 53 | doc.reference.update({'sheetsConfig.row': str(new_row)}) 54 | return True 55 | except Exception as e: 56 | print(f"Error updating user row: {e}") 57 | return False 58 | 59 | print(f"User with uid {uid} not found") 60 | return False 61 | 62 | 63 | def update_spreadsheet_id(username: str, spreadsheet_id: str): 64 | users_ref = db.collection('users') 65 | query = users_ref.where('username', '==', username).limit(1) 66 | docs = query.get() 67 | 68 | for doc in docs: 69 | try: 70 | doc.reference.update( 71 | {'sheetsConfig.spreadsheet_id': spreadsheet_id}) 72 | print(f"Successfully updated spreadsheet_id for user {username}") 73 | return True 74 | except Exception as e: 75 | print(f"Error updating spreadsheet_id for user {username}: {e}") 76 | return False 77 | 78 | print(f"User {username} not found") 79 | return False 80 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/backend/requirements.txt: -------------------------------------------------------------------------------- 1 | crewai 2 | composio-crewai 3 | langchain-openai 4 | python-dotenv 5 | crewai_tools 6 | fastapi 7 | uvicorn 8 | langchain_google_genai 9 | 10 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/backend/setup.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | # Create a virtual environment 5 | echo "Creating virtual environment..." 6 | python3 -m venv ~/.venvs/gmail_agent 7 | 8 | # Activate the virtual environment 9 | echo "Activating virtual environment..." 10 | source ~/.venvs/gmail_agent/bin/activate 11 | 12 | # Install libraries from requirements.txt 13 | echo "Installing libraries from requirements.txt..." 14 | pip install -r requirements.txt 15 | 16 | # Login to your account 17 | echo "Login to your Composio acount" 18 | composio login 19 | 20 | # Add calendar tool 21 | echo "Add Gmail tools. Finish the flow" 22 | composio add gmail 23 | composio add googlesheets 24 | 25 | # Copy env backup to .env file 26 | if [ -f ".env.example" ]; then 27 | echo "Copying .env.example to .env..." 28 | cp .env.example .env 29 | else 30 | echo "No .env.example file found. Creating a new .env file..." 31 | touch .env 32 | fi 33 | 34 | # Prompt user to fill the .env file 35 | echo "Please fill in the .env file with the necessary environment variables." 36 | 37 | echo "Setup completed successfully!" 38 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import react from 'eslint-plugin-react' 4 | import reactHooks from 'eslint-plugin-react-hooks' 5 | import reactRefresh from 'eslint-plugin-react-refresh' 6 | 7 | export default [ 8 | { ignores: ['dist'] }, 9 | { 10 | files: ['**/*.{js,jsx}'], 11 | languageOptions: { 12 | ecmaVersion: 2020, 13 | globals: globals.browser, 14 | parserOptions: { 15 | ecmaVersion: 'latest', 16 | ecmaFeatures: { jsx: true }, 17 | sourceType: 'module', 18 | }, 19 | }, 20 | settings: { react: { version: '18.3' } }, 21 | plugins: { 22 | react, 23 | 'react-hooks': reactHooks, 24 | 'react-refresh': reactRefresh, 25 | }, 26 | rules: { 27 | ...js.configs.recommended.rules, 28 | ...react.configs.recommended.rules, 29 | ...react.configs['jsx-runtime'].rules, 30 | ...reactHooks.configs.recommended.rules, 31 | 'react/jsx-no-target-blank': 'off', 32 | 'react-refresh/only-export-components': [ 33 | 'warn', 34 | { allowConstantExport: true }, 35 | ], 36 | }, 37 | }, 38 | ] 39 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | GmailGenius 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gmailgenius", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "axios": "^1.7.5", 14 | "firebase": "^10.13.0", 15 | "flowbite": "^2.5.1", 16 | "flowbite-react": "^0.10.1", 17 | "lucide-react": "^0.436.0", 18 | "notistack": "^3.0.1", 19 | "react": "^18.3.1", 20 | "react-dom": "^18.3.1", 21 | "react-loader-spinner": "^6.1.6" 22 | }, 23 | "devDependencies": { 24 | "@eslint/js": "^9.9.0", 25 | "@types/react": "^18.3.3", 26 | "@types/react-dom": "^18.3.0", 27 | "@vitejs/plugin-react": "^4.3.1", 28 | "autoprefixer": "^10.4.20", 29 | "eslint": "^9.9.0", 30 | "eslint-plugin-react": "^7.35.0", 31 | "eslint-plugin-react-hooks": "^5.1.0-rc.0", 32 | "eslint-plugin-react-refresh": "^0.4.9", 33 | "globals": "^15.9.0", 34 | "postcss": "^8.4.42", 35 | "react-router-dom": "^6.26.1", 36 | "tailwindcss": "^3.4.10", 37 | "vite": "^5.4.1" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | -------------------------------------------------------------------------------- /gmail-assistant/gmail-assistant-firebase/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom"; 2 | import { onAuthStateChanged } from "firebase/auth"; 3 | import { auth } from "./config/firebase"; 4 | import Navbar from "./components/Navbar"; 5 | import Home from "./pages/Home"; 6 | import Footer from "./components/Footer"; 7 | // import Dashboard from "./pages/Dashboard"; 8 | import ScrollToTop from "./components/ScrollToTop"; 9 | import { useState, useEffect } from "react"; 10 | import Login from "./pages/Login"; 11 | import Settings from "./pages/Settings"; 12 | import Agent from "./pages/Agent"; 13 | import NotFound from "./pages/NotFound"; 14 | import SkeletonLoader from "./components/SkeletonLoader"; 15 | import { SnackbarProvider } from 'notistack' 16 | 17 | const ProtectedRoute = ({ user, children }) => { 18 | if (!user) { 19 | return ; 20 | } 21 | return children; 22 | }; 23 | 24 | const App = () => { 25 | const [user, setUser] = useState(null); 26 | const [loading, setLoading] = useState(true); 27 | 28 | useEffect(() => { 29 | const unsubscribe = onAuthStateChanged(auth, (user) => { 30 | setUser(user); 31 | setLoading(false); 32 | }); 33 | 34 | return () => unsubscribe(); 35 | }, []); 36 | 37 | if (loading) { 38 | return 39 | } 40 | 41 | return ( 42 | 43 | 44 | 45 | 46 | 47 | } /> 48 | {/* 50 | 51 | 52 | } /> */} 53 | 55 | 56 | 57 | } /> 58 | {/* 62 | 63 | 64 | } 65 | /> */} 66 | } /> 67 | } /> 68 | 69 |