
Connectors / Data and analytics · HTTP Connector
Automate Azure Cosmos DB with Tray.ai
Create a database, create a collection and create a document in Azure Cosmos DB.
What can you do with Azure Cosmos DB on Tray.ai?
Azure Cosmos DB is Microsoft's globally distributed NoSQL database service, storing JSON documents in databases and containers with built-in replication across Azure regions. Tray.ai connects to Azure Cosmos DB through the HTTP Connector, so your workflows can call the Azure Cosmos DB API alongside the rest of your stack.
- Create a document for each new order from your store so your product team can query it alongside app data.
- Query documents on a schedule and send the results to your data warehouse for reporting.
- When a customer is updated in your CRM, replace a document so your app reads the latest details.
- Connects through
- HTTP Connector
- Authentication
- An API key in a request header or OAuth 2.0
- Base URL
- https://{databaseaccount}.documents.azure.com
Set it up
Connect Azure Cosmos DB to Tray.ai
Each step uses Azure Cosmos DB's own API details, from its documentation.
Step 1
Save Azure Cosmos DB's API key
Save the key as a Tray.ai authentication. The HTTP Client puts it in the request header, read from $.auth. The key stays out of the workflow and out of the logs.
Step 2
Point the HTTP Client at the API
Add an HTTP Client step and use https://{databaseaccount}.documents.azure.com as the base URL. Or paste a cURL example from Azure Cosmos DB's API docs, and Tray.ai fills in the method, URL, and headers.
Step 3
Start with “List databases”
It's one of 19 documented actions, under Databases. The response comes back as data the next step can map into your other apps.
Step 4
Hand it to an AI agent
Wrap “Create a database” and “Get a database” in workflows, and Tray.ai's Agent Gateway for MCP publishes them as governed tools Claude and other AI agents can call.
Workflows to build with Azure Cosmos DB
Each one uses actions and events from Azure Cosmos DB's own API documentation.
Store Shopify orders as Azure Cosmos DB documents
When
An order is placed in Shopify
Then
- Create a document in the orders collection
- Tag the order in Shopify once it is stored
With Shopify
Copy Azure Cosmos DB data to Snowflake for reporting
When
On a schedule
Then
- Query documents changed since the last run
- Load the results into Snowflake
With Snowflake
Update Azure Cosmos DB profiles from Salesforce accounts
When
An account is updated in Salesforce
Then
- Query documents for the account
- Replace a document with the new details
With Salesforce
Apps you can build on Azure Cosmos DB data
Internal tools your team can build with an AI assistant, each one using Azure Cosmos DB calls from its API documentation.
Document lookup tool
Queries documents in a container and lets support staff view and correct a record.
Database inventory
Lists databases with their collections and stored procedures for a platform review.
Give your AI agents Azure Cosmos DB tools
Build an MCP server on Azure Cosmos DB in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works
- List databases
- List collections
- List documents
- List stored procedures
- List users
- Create a database
- Get a database
- Delete a database
What the Azure Cosmos DB API covers
5 resources and 19 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.
Databases
- List databases
- Create a database
- Get a database
- Delete a database
Collections
- List collections
- Create a collection
- Replace a collection
- Delete a collection
Documents
- List documents
- Create a document
- Replace a document
- Delete a document
- Query documents
Stored procedures
- List stored procedures
- Create a stored procedure
- Execute a stored procedure
Users
- List users
- Create a user
- Delete a user
Checked against Azure Cosmos DB's own documentation on 2026-10-22
How Tray.ai makes this work
Azure Cosmos DB plugs into the whole Tray.ai platform
Intelligent Integration
Integrate and automate across 12,000+ apps, databases, APIs, and services with visual workflows, error handling, and observability.
Learn more →Agent Builder
Build AI agents that read, write, and take action in Azure Cosmos DB — with guardrails, audit, and human-in-the-loop.
Learn more →Agent Gateway for MCP
Expose Azure Cosmos DB actions as governed MCP tools — observable, rate-limited, authenticated.
Learn more →Tray Helix
Build apps on Azure Cosmos DB data with your AI assistant, then deploy, run, and govern them on Tray.ai.
Learn more →More data and analytics apps on Tray.ai
Dedicated connectors and other apps Tray.ai reaches in the same category. See every data and analytics connector →
Frequently asked questions
What can a Tray.ai workflow do in Azure Cosmos DB?
+
The Azure Cosmos DB API documents 19 actions across 5 resources (Databases, Collections, Documents, Stored procedures, Users). For example: List databases; List collections; List documents. A workflow can make any documented call through the HTTP Connector.
How does Tray.ai authenticate with Azure Cosmos DB?
+
The Azure Cosmos DB API uses an API key in a request header and OAuth 2.0. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.
See Azure Cosmos DB working against your stack.
We'll walk through a tailored demo with your systems plugged in.
Thanks — someone from our team will be in touch soon.