Prerequisites
Before you begin, ensure you have:- A SambaCloud account with an API key
- Access to Google Workspace (Google Docs and/or Google Sheets)
Setup
- Get Your SambaNova API Key Sign up for a free API key at SambaCloud. The free tier provides access to powerful models like Llama 3 405B.
- Access Google Apps Script Open your Google Document or Google Sheet and navigate to Extensions → Apps Script.
-
Add the Integration Script
- Copy the appropriate JavaScript script for your Google application into the Apps Script editor.
- For Google Docs: Use the Google Docs script
- For Google Sheets: Use the Google Sheets script
-
Configure Your API Key
-
In the script, locate the line:
-
Replace
0with your SambaNova API key:Save the script and you’re ready to use the integration.
-
In the script, locate the line:
Google Docs features
Once configured, you’ll have access to AI-powered text editing tools through the SambaAI menu.Clean grammar
- Highlight any text in your document
- Navigate to SambaAI → Clean Grammar
- The selected text will be automatically corrected for grammar issues in place
Rephrase text
- Highlight the text you want to rephrase
- Navigate to SambaAI → Rephrase
- A new paragraph with a concise and professional rephrasing will be appended below your selection
Google Sheets features1
The integration provides two custom functions for use in your spreadsheets:-
=SAMBA_AI_QUESTION()Use this function for general AI queries and text analysis. Example Use Cases: -
=SAMBA_AI_FORMULA()Use this function when requesting specific Excel/Sheets formulas from the model. Example Use Cases:
Benefits
By integrating SambaNova with Google Workspace, you can:- Improve writing quality with instant grammar corrections and professional rephrasing
- Automate formula creation by describing what you need in plain English
- Analyze data intelligently with natural language queries directly in your spreadsheets
- Boost productivity by reducing context switching between applications
- Leverage state-of-the-art models like Llama-3.1-405B without leaving your documents
Additional resources
1 Inspired by SheetAI for the custom function implementation approach.
