SDKs overview
Quip, an integral part of the Salesforce ecosystem, provides developers with tools and APIs designed to programmatically interact with its collaborative document and spreadsheet platform. The primary mechanism for integration and extension is the Quip API, which supports a range of operations from creating and managing documents to integrating with Salesforce data and processes. Developers can utilize the Rich Text API for content manipulation and build custom functionality through Live Apps.
The Quip API is a RESTful interface, enabling applications to perform CRUD (Create, Read, Update, Delete) operations on Quip documents, folders, and messages. Authentication typically involves OAuth 2.0, aligning with modern API security standards. While Quip primarily emphasizes its API for direct integration, it also provides specific SDKs to facilitate development, particularly for building interactive Live Apps within the Quip environment.
Integrating with Quip allows for automation of document generation, embedding live Salesforce data into spreadsheets, and extending collaborative workflows directly within the Quip interface. The platform prioritizes seamless integration with Salesforce, providing specific endpoints and methods to connect Quip documents with Salesforce records and processes, enhancing data flow and collaborative capabilities within CRM environments.
Official SDKs by language
Quip's official developer tools are primarily focused on its API and the JavaScript SDK for Live Apps development. The Live Apps SDK provides the necessary framework for creating dynamic, interactive components that can be embedded directly into Quip documents and spreadsheets, enhancing their functionality beyond standard text and data. These applications run within the Quip client, offering real-time collaboration capabilities.
The following table outlines the key official development tools provided by Quip:
| Language/Framework | Package/Tool | Purpose | Maturity |
|---|---|---|---|
| JavaScript | Quip Live Apps SDK | Develop interactive components for Quip documents and spreadsheets. | Stable |
| REST API | Quip API Endpoints | Programmatic access to documents, folders, messages, and users. | Stable |
| Salesforce Apex | Quip Connect API | Integrate Quip with Salesforce Flow and Apex for automation. | Stable |
The Quip Live Apps SDK for JavaScript is designed to enable developers to build custom user interfaces and business logic that can directly manipulate Quip document content and interact with external services. This allows for rich, embedded experiences such as project management tools, approval workflows, or data visualizations that live alongside document content.
Installation
Installation for Quip's official tools primarily involves setting up a development environment for JavaScript-based Live Apps. For direct API interactions, standard HTTP client libraries in any language can be used.
For Quip Live Apps SDK (JavaScript)
To develop Live Apps, you typically need Node.js and npm (Node Package Manager) installed. The Quip Live Apps CLI (Command Line Interface) is used to scaffold and manage Live Apps projects.
- Install Node.js and npm: Ensure you have Node.js (version 12 or higher recommended) and npm installed on your system. You can download them from the official Node.js website.
- Install the Quip CLI: Open your terminal or command prompt and run the following command to install the Quip CLI globally:
npm install -g @quip/cli
- Create a new Live App: Navigate to your desired development directory and use the CLI to create a new Live App project:
quip-cli create my-live-app
This command will set up a basic Live App project structure, including necessary dependencies and configuration files. You can then navigate into the my-live-app directory and begin development.
For Quip API (RESTful interactions)
No specific SDK installation is required for direct interaction with the Quip REST API. Developers can use any HTTP client library available in their preferred programming language to send requests and parse responses. For example, in Python, you might use the requests library; in JavaScript (Node.js), axios or fetch; and in Java, HttpClient.
Key steps for direct API integration include:
- Obtain an Access Token: Register your application with Quip to get client credentials and implement an OAuth 2.0 flow to obtain an access token. Details for this process are available on the Quip developer documentation.
- Construct API Requests: Formulate HTTP requests (GET, POST, PUT, DELETE) to the appropriate Quip API endpoints, including the obtained access token in the
Authorizationheader. - Handle Responses: Parse the JSON responses returned by the API to process data or confirm operations.
Quickstart example
This quickstart example demonstrates how to create a new Quip document using the Quip REST API in Python. This assumes you have already obtained an OAuth 2.0 access token for your application. For detailed authentication steps, refer to the Quip API authentication guide.
Example: Create a new Quip document (Python)
First, ensure you have the requests library installed:
pip install requests
Then, use the following Python code snippet:
import requests
import json
# Replace with your actual OAuth 2.0 access token
ACCESS_TOKEN = "YOUR_QUIP_ACCESS_TOKEN"
# Quip API endpoint for creating documents
CREATE_DOCUMENT_URL = "https://platform.quip.com/1/threads/new-document"
# Document content and title
document_title = "My New Document from API"
document_content = "<h1>Welcome to my API-created Quip document!</h1><p>This document was generated programmatically using the Quip API.</p>"
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
"Content-Type": "application/x-www-form-urlencoded"
}
# Data payload for the new document
data = {
"title": document_title,
"content": document_content,
"format": "html" # You can also use 'markdown'
}
try:
response = requests.post(CREATE_DOCUMENT_URL, headers=headers, data=data)
response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
document_info = response.json()
print(f"Document created successfully!")
print(f"Document ID: {document_info['thread']['id']}")
print(f"Document URL: {document_info['thread']['link']}")
except requests.exceptions.HTTPError as http_err:
print(f"HTTP error occurred: {http_err}")
print(f"Response content: {response.text}")
except Exception as err:
print(f"An unexpected error occurred: {err}")
This example demonstrates a basic POST request to create a new document with specified HTML content and a title. The response will include the ID and URL of the newly created Quip document.
Community libraries
While Quip provides official APIs and an SDK for Live Apps, the ecosystem of community-contributed libraries is less extensive compared to standalone platforms. This is partly due to Quip's integration-first approach within the Salesforce ecosystem, where many extensions are built directly using Salesforce Apex or Flow, or through the official Live Apps SDK.
Developers looking for community contributions might find examples or utility scripts on platforms like GitHub, often shared by individual developers or consultancies working with Salesforce integrations. These typically focus on specific use cases, such as custom data synchronization scripts or specialized automation workflows leveraging the Quip API in conjunction with other tools. For instance, a developer might create a Python wrapper for common Quip API calls to streamline their own internal development process, but these are not typically maintained as official or widely adopted community SDKs.
When seeking community-driven tools, it is advisable to search for projects tagged with "Quip API" or "Salesforce Quip integration" on open-source repositories. Always review the project's documentation, license, and community activity before incorporating third-party libraries into production environments. Direct engagement with the Salesforce Trailblazer Community can also be a valuable resource for finding shared code examples and best practices for Quip development.