A Mastra template showcasing a financial modeling agent that integrates with Google Sheets through Composio. This agent specializes in creating professional-grade financial models, projections, and analysis directly in Google Sheets.
This template demonstrates how to integrate third-party services like Composio to access external data sources while still leveraging Mastra's powerful agent framework.
This demo runs in Mastra Studio, but you can connect this agent to your React, Next.js, or Vue app using the Mastra Client SDK or agentic UI libraries like AI SDK UI, CopilotKit, or Assistant UI.
- Node.js >= 22.13.0
- An OpenAI API Key
- A Google account with access to Google Sheets
- A Composio account with Google Sheets integration configured
- Create a Composio account at composio.dev
- Create a new Composio project
- Set up Google Sheets integration:
- Navigate to your Composio dashboard
- Create a new auth config
- Enable the Google Sheets toolkit
- Configure OAuth settings for Google Sheets access
- Note your
COMPOSIO_AUTH_CONFIG_IDfrom the integration settings
- Get your Composio API key from your account settings
- Clone the template
- Run
npx create-mastra@latest --template google-sheetsto scaffold the project locally.
- Run
- Add your API key
- Copy
.env.exampleto.envand fill in all values.
- Copy
- Start the dev server
- Run
npm run devand open localhost:4111 to try it out.
- Run
Open Studio and navigate to "Financial Modeling Agent". In the system prompt you'll find a redirect URL to authenticate with Google. Open that URL and complete the OAuth flow. Afterward the prompt will update itself and all the tools are available.
Start conversing with the agent by saying "Hello". It'll tell you to create a new Google sheet and paste the ID/URL to the agent. Afterward tell the agent what you want to build.
Mastra templates are ready-to-use projects that show off what you can build — clone one, poke around, and make it yours. They live in the Mastra monorepo and are automatically synced to standalone repositories for easier cloning.
Want to contribute? See CONTRIBUTING.md.