# Which REST APIs Are Natively Integrated with Craft Agents?

> Discover which REST APIs integrate natively with Craft Agents, including Google Workspace, Microsoft Graph, and Slack, for seamless automation and service detection.

- Repository: [Craft Ai Agents/craft-agents-oss](https://github.com/craft-ai-agents/craft-agents-oss)
- Tags: api-reference
- Published: 2026-07-04

---

**Craft Agents provides built-in support for Google Workspace APIs (Gmail, Drive, Calendar, YouTube, etc.), Microsoft Graph APIs (Outlook, Teams, OneDrive, SharePoint), and the Slack API, featuring automatic service detection and pre-configured OAuth flows.**

The Craft Agents OSS repository ships with first-class, native integrations for three major REST API families. These integrations allow developers to connect to enterprise services without manual endpoint configuration, leveraging automatic service inference from URL patterns and standardized OAuth authentication.

## Google Workspace REST APIs

Craft Agents natively recognizes seven Google services through the `inferGoogleServiceFromUrl` function in [`packages/shared/src/sources/types.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/types.ts) (lines 63-70).

The function extracts the service identifier from the API base URL hostname:

- **Gmail** (`gmail.googleapis.com`)
- **Google Calendar** (`calendar.googleapis.com`)
- **Google Drive** (`drive.googleapis.com`)
- **Google Docs** (`docs.googleapis.com`)
- **Google Sheets** (`sheets.googleapis.com`)
- **YouTube** (`youtube.googleapis.com`)
- **Search Console** (`searchconsole.googleapis.com`)

When a user provides any of these endpoints, Craft Agents automatically maps the request to the correct service type and applies the appropriate OAuth scopes and default headers.

## Microsoft Graph REST APIs

Microsoft's ecosystem is supported through the `inferMicrosoftServiceFromUrl` function (lines 119-151 in [`packages/shared/src/sources/types.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/types.ts)), which inspects the Graph API hostname (`graph.microsoft.com`) and path fragments to identify specific services:

- **Outlook** (mail and messages)
- **Microsoft Calendar** (`microsoft-calendar`)
- **OneDrive**
- **Teams**
- **SharePoint**

The path-based detection allows Craft Agents to distinguish between different Microsoft 365 services even when they share the same base Graph URL, ensuring the correct API tooling and permissions are applied for each endpoint.

## Slack REST API

The Slack integration provides full service coverage for messaging, channels, users, and files through the `inferSlackServiceFromUrl` function (lines 90-103).

This function matches hostnames containing `slack.com` or `api.slack.com` and returns the generic `full` service designation, indicating that the complete Slack API surface is available. Unlike the granular Google detection, Slack operates as a unified service where all endpoints share the same base authentication and configuration.

## OAuth Provider Configuration

These three providers are explicitly defined as native OAuth integrations in the `API_OAUTH_PROVIDERS` constant:

```typescript
export const API_OAUTH_PROVIDERS = ['google', 'microsoft', 'slack'] as const;

```

This definition in [`packages/shared/src/sources/types.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/types.ts) (lines 174-176) drives the automatic credential handling across the system. The [`packages/shared/src/sources/server-builder.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/server-builder.ts) file uses this provider list to configure the appropriate OAuth flow and default headers, while [`packages/shared/src/sources/credential-manager.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/credential-manager.ts) implements the provider-specific token refresh logic required for long-lived integrations.

## Summary

- Craft Agents OSS includes **native REST API integrations** for Google, Microsoft, and Slack.
- **Automatic service detection** occurs through URL pattern matching in [`packages/shared/src/sources/types.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/types.ts), with specific functions for each provider family.
- **Google services** are identified by hostname patterns (e.g., `gmail.googleapis.com`), while **Microsoft Graph** services use path-based detection on `graph.microsoft.com`.
- **Pre-configured OAuth** flows are handled via the `API_OAUTH_PROVIDERS` constant, with dedicated credential management and token refresh logic.

## Frequently Asked Questions

### How does Craft Agents detect which Google service I'm using?

The `inferGoogleServiceFromUrl` function analyzes the hostname of the provided API URL to extract the service name. For example, when it encounters `gmail.googleapis.com`, it returns `gmail`, while `drive.googleapis.com` maps to `drive`. This detection happens automatically in [`packages/shared/src/sources/types.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/packages/shared/src/sources/types.ts) (lines 63-70).

### Does Craft Agents support all Microsoft Graph endpoints?

Yes, the native Microsoft integration covers Outlook, Calendar, OneDrive, Teams, and SharePoint endpoints. The `inferMicrosoftServiceFromUrl` function inspects path fragments on the `graph.microsoft.com` base URL to determine which specific service tool to invoke, allowing access to the full range of Microsoft Graph capabilities.

### What authentication method is used for these native integrations?

All three native providers (Google, Microsoft, and Slack) use **OAuth 2.0** authentication. The `API_OAUTH_PROVIDERS` constant in [`types.ts`](https://github.com/craft-ai-agents/craft-agents-oss/blob/main/types.ts) defines these as first-class citizens, enabling automatic credential acquisition and refresh through the credential manager without requiring manual token handling.

### Can I integrate custom REST APIs that aren't natively supported?

While this article covers the native integrations for Google, Microsoft, and Slack, Craft Agents supports generic REST API sources through manual configuration. However, only the three native providers receive automatic service detection, pre-configured OAuth flows, and default tool icons (`api_*`) out of the box.