airbyte-agent-sendgrid 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_agent_sendgrid-0.1.0/.gitignore +34 -0
- airbyte_agent_sendgrid-0.1.0/AUTH.md +116 -0
- airbyte_agent_sendgrid-0.1.0/CHANGELOG.md +6 -0
- airbyte_agent_sendgrid-0.1.0/PKG-INFO +160 -0
- airbyte_agent_sendgrid-0.1.0/README.md +127 -0
- airbyte_agent_sendgrid-0.1.0/REFERENCE.md +1948 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/__init__.py +301 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/__init__.py +1 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/__init__.py +83 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/auth_strategies.py +1171 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/auth_template.py +135 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/cloud_utils/client.py +447 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/connector_model_loader.py +1047 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/constants.py +78 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/exceptions.py +23 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/executor/__init__.py +31 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/executor/hosted_executor.py +242 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/executor/local_executor.py +1822 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/executor/models.py +202 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/extensions.py +693 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/__init__.py +37 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/adapters/__init__.py +9 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/adapters/httpx_adapter.py +260 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/config.py +98 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/exceptions.py +119 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/protocols.py +114 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http/response.py +104 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/http_client.py +711 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/introspection.py +493 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/logging/__init__.py +11 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/logging/logger.py +273 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/logging/types.py +93 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/observability/__init__.py +11 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/observability/config.py +179 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/observability/models.py +19 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/observability/redactor.py +81 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/observability/session.py +103 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/performance/__init__.py +6 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/performance/instrumentation.py +57 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/performance/metrics.py +93 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/__init__.py +71 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/base.py +246 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/components.py +244 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/connector.py +120 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/extensions.py +281 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/operations.py +151 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/schema/security.py +305 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/secrets.py +182 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/telemetry/__init__.py +10 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/telemetry/config.py +32 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/telemetry/events.py +59 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/telemetry/tracker.py +155 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/types.py +340 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/utils.py +127 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/validation/__init__.py +22 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/validation/models.py +17 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/validation/readiness.py +1013 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/_vendored/connector_sdk/validation/replication.py +1452 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/connector.py +2297 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/connector_model.py +1788 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/models.py +746 -0
- airbyte_agent_sendgrid-0.1.0/airbyte_agent_sendgrid/types.py +2427 -0
- airbyte_agent_sendgrid-0.1.0/pyproject.toml +50 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.eggs/
|
|
9
|
+
|
|
10
|
+
# Testing
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.coverage
|
|
13
|
+
htmlcov/
|
|
14
|
+
|
|
15
|
+
# Virtual environments
|
|
16
|
+
.venv/
|
|
17
|
+
venv/
|
|
18
|
+
|
|
19
|
+
# IDE
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
*.swp
|
|
23
|
+
|
|
24
|
+
# OS
|
|
25
|
+
.DS_Store
|
|
26
|
+
Thumbs.db
|
|
27
|
+
|
|
28
|
+
.env
|
|
29
|
+
configured_connectors.yaml
|
|
30
|
+
|
|
31
|
+
# Claude Code development symlink
|
|
32
|
+
# Contributors: Create this symlink locally for skill testing
|
|
33
|
+
# mkdir -p .claude/skills && ln -s ../../skills/airbyte-agent-connectors .claude/skills/airbyte-agent-connectors
|
|
34
|
+
.claude/skills/airbyte-agent-connectors
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Sendgrid authentication
|
|
2
|
+
|
|
3
|
+
This page documents the authentication and configuration options for the Sendgrid agent connector.
|
|
4
|
+
|
|
5
|
+
## Authentication
|
|
6
|
+
|
|
7
|
+
### Open source execution
|
|
8
|
+
|
|
9
|
+
In open source mode, you provide API credentials directly to the connector.
|
|
10
|
+
|
|
11
|
+
#### OAuth
|
|
12
|
+
This authentication method isn't available for this connector.
|
|
13
|
+
|
|
14
|
+
#### Token
|
|
15
|
+
|
|
16
|
+
`credentials` fields you need:
|
|
17
|
+
|
|
18
|
+
| Field Name | Type | Required | Description |
|
|
19
|
+
|------------|------|----------|-------------|
|
|
20
|
+
| `api_key` | `str` | Yes | Your SendGrid API key (generated at https://app.sendgrid.com/settings/api_keys) |
|
|
21
|
+
|
|
22
|
+
Example request:
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from airbyte_agent_sendgrid import SendgridConnector
|
|
26
|
+
from airbyte_agent_sendgrid.models import SendgridAuthConfig
|
|
27
|
+
|
|
28
|
+
connector = SendgridConnector(
|
|
29
|
+
auth_config=SendgridAuthConfig(
|
|
30
|
+
api_key="<Your SendGrid API key (generated at https://app.sendgrid.com/settings/api_keys)>"
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Hosted execution
|
|
36
|
+
|
|
37
|
+
In hosted mode, you first create a connector via the Airbyte API (providing your OAuth or Token credentials), then execute operations using either the Python SDK or API. If you need a step-by-step guide, see the [hosted execution tutorial](https://docs.airbyte.com/ai-agents/quickstarts/tutorial-hosted).
|
|
38
|
+
|
|
39
|
+
#### OAuth
|
|
40
|
+
This authentication method isn't available for this connector.
|
|
41
|
+
|
|
42
|
+
#### Bring your own OAuth flow
|
|
43
|
+
This authentication method isn't available for this connector.
|
|
44
|
+
|
|
45
|
+
#### Token
|
|
46
|
+
Create a connector with Token credentials.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
`credentials` fields you need:
|
|
50
|
+
|
|
51
|
+
| Field Name | Type | Required | Description |
|
|
52
|
+
|------------|------|----------|-------------|
|
|
53
|
+
| `api_key` | `str` | Yes | Your SendGrid API key (generated at https://app.sendgrid.com/settings/api_keys) |
|
|
54
|
+
|
|
55
|
+
`replication_config` fields you need:
|
|
56
|
+
|
|
57
|
+
| Field Name | Type | Required | Description |
|
|
58
|
+
|------------|------|----------|-------------|
|
|
59
|
+
| `start_date` | `str (date-time)` | Yes | UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. |
|
|
60
|
+
|
|
61
|
+
Example request:
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
curl -X POST "https://api.airbyte.ai/api/v1/integrations/connectors" \
|
|
66
|
+
-H "Authorization: Bearer <YOUR_BEARER_TOKEN>" \
|
|
67
|
+
-H "Content-Type: application/json" \
|
|
68
|
+
-d '{
|
|
69
|
+
"customer_name": "<CUSTOMER_NAME>",
|
|
70
|
+
"connector_type": "Sendgrid",
|
|
71
|
+
"name": "My Sendgrid Connector",
|
|
72
|
+
"credentials": {
|
|
73
|
+
"api_key": "<Your SendGrid API key (generated at https://app.sendgrid.com/settings/api_keys)>"
|
|
74
|
+
},
|
|
75
|
+
"replication_config": {
|
|
76
|
+
"start_date": "<UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated.>"
|
|
77
|
+
}
|
|
78
|
+
}'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Execution
|
|
82
|
+
|
|
83
|
+
After creating the connector, execute operations using either the Python SDK or API.
|
|
84
|
+
If your Airbyte client can access multiple organizations, include `organization_id` in `AirbyteAuthConfig` and `X-Organization-Id` in raw API calls.
|
|
85
|
+
|
|
86
|
+
**Python SDK**
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from airbyte_agent_sendgrid import SendgridConnector, AirbyteAuthConfig
|
|
90
|
+
|
|
91
|
+
connector = SendgridConnector(
|
|
92
|
+
auth_config=AirbyteAuthConfig(
|
|
93
|
+
customer_name="<your_customer_name>",
|
|
94
|
+
organization_id="<your_organization_id>", # Optional for multi-org clients
|
|
95
|
+
airbyte_client_id="<your-client-id>",
|
|
96
|
+
airbyte_client_secret="<your-client-secret>"
|
|
97
|
+
)
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
@agent.tool_plain # assumes you're using Pydantic AI
|
|
101
|
+
@SendgridConnector.tool_utils
|
|
102
|
+
async def sendgrid_execute(entity: str, action: str, params: dict | None = None):
|
|
103
|
+
return await connector.execute(entity, action, params or {})
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**API**
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
curl -X POST 'https://api.airbyte.ai/api/v1/integrations/connectors/<connector_id>/execute' \
|
|
110
|
+
-H 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
|
|
111
|
+
-H 'X-Organization-Id: <YOUR_ORGANIZATION_ID>' \
|
|
112
|
+
-H 'Content-Type: application/json' \
|
|
113
|
+
-d '{"entity": "<entity>", "action": "<action>", "params": {}}'
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: airbyte-agent-sendgrid
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Airbyte Sendgrid Connector for AI platforms
|
|
5
|
+
Project-URL: Homepage, https://github.com/airbytehq/airbyte-agent-connectors
|
|
6
|
+
Project-URL: Documentation, https://docs.airbyte.com/ai-agents/
|
|
7
|
+
Project-URL: Repository, https://github.com/airbytehq/airbyte-agent-connectors
|
|
8
|
+
Project-URL: Issues, https://github.com/airbytehq/airbyte-agent-connectors/issues
|
|
9
|
+
Author-email: Airbyte <contact@airbyte.io>
|
|
10
|
+
License: Elastic-2.0
|
|
11
|
+
Keywords: agent,ai,airbyte,api,connector,data-integration,llm,mcp,sendgrid
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: Other/Proprietary License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.13
|
|
22
|
+
Requires-Dist: httpx>=0.24.0
|
|
23
|
+
Requires-Dist: jinja2>=3.0.0
|
|
24
|
+
Requires-Dist: jsonpath-ng>=1.6.1
|
|
25
|
+
Requires-Dist: jsonref>=1.1.0
|
|
26
|
+
Requires-Dist: opentelemetry-api>=1.37.0
|
|
27
|
+
Requires-Dist: opentelemetry-sdk>=1.37.0
|
|
28
|
+
Requires-Dist: pydantic>=2.0.0
|
|
29
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: segment-analytics-python>=2.2.0
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# Sendgrid
|
|
35
|
+
|
|
36
|
+
The Sendgrid agent connector is a Python package that equips AI agents to interact with Sendgrid through strongly typed, well-documented tools. It's ready to use directly in your Python app, in an agent framework, or exposed through an MCP.
|
|
37
|
+
|
|
38
|
+
Connector for the Twilio SendGrid v3 API. Provides read access to marketing campaigns, contacts, lists, segments, single sends, transactional templates, and suppression management (bounces, blocks, spam reports, invalid emails, global suppressions, suppression groups, and suppression group members).
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Example questions
|
|
42
|
+
|
|
43
|
+
The Sendgrid connector is optimized to handle prompts like these.
|
|
44
|
+
|
|
45
|
+
- List all marketing contacts
|
|
46
|
+
- Get the details of a specific contact
|
|
47
|
+
- Show me all marketing lists
|
|
48
|
+
- List all transactional templates
|
|
49
|
+
- Show all single sends
|
|
50
|
+
- List all bounced emails
|
|
51
|
+
- Show all blocked email addresses
|
|
52
|
+
- List all spam reports
|
|
53
|
+
- Show all suppression groups
|
|
54
|
+
- How many contacts are in each marketing list?
|
|
55
|
+
- Which single sends were scheduled in the last month?
|
|
56
|
+
- What are the most common bounce reasons?
|
|
57
|
+
- Show me contacts created in the last 7 days
|
|
58
|
+
|
|
59
|
+
## Unsupported questions
|
|
60
|
+
|
|
61
|
+
The Sendgrid connector isn't currently able to handle prompts like these.
|
|
62
|
+
|
|
63
|
+
- Send an email
|
|
64
|
+
- Create a new contact
|
|
65
|
+
- Delete a bounce record
|
|
66
|
+
- Update a marketing list
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uv pip install airbyte-agent-sendgrid
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Usage
|
|
75
|
+
|
|
76
|
+
Connectors can run in open source or hosted mode.
|
|
77
|
+
|
|
78
|
+
### Open source
|
|
79
|
+
|
|
80
|
+
In open source mode, you provide API credentials directly to the connector.
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from airbyte_agent_sendgrid import SendgridConnector
|
|
84
|
+
from airbyte_agent_sendgrid.models import SendgridAuthConfig
|
|
85
|
+
|
|
86
|
+
connector = SendgridConnector(
|
|
87
|
+
auth_config=SendgridAuthConfig(
|
|
88
|
+
api_key="<Your SendGrid API key (generated at https://app.sendgrid.com/settings/api_keys)>"
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
@agent.tool_plain # assumes you're using Pydantic AI
|
|
93
|
+
@SendgridConnector.tool_utils
|
|
94
|
+
async def sendgrid_execute(entity: str, action: str, params: dict | None = None):
|
|
95
|
+
return await connector.execute(entity, action, params or {})
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Hosted
|
|
99
|
+
|
|
100
|
+
In hosted mode, API credentials are stored securely in Airbyte Cloud. You provide your Airbyte credentials instead.
|
|
101
|
+
If your Airbyte client can access multiple organizations, also set `organization_id`.
|
|
102
|
+
|
|
103
|
+
This example assumes you've already authenticated your connector with Airbyte. See [Authentication](AUTH.md) to learn more about authenticating. If you need a step-by-step guide, see the [hosted execution tutorial](https://docs.airbyte.com/ai-agents/quickstarts/tutorial-hosted).
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from airbyte_agent_sendgrid import SendgridConnector, AirbyteAuthConfig
|
|
107
|
+
|
|
108
|
+
connector = SendgridConnector(
|
|
109
|
+
auth_config=AirbyteAuthConfig(
|
|
110
|
+
customer_name="<your_customer_name>",
|
|
111
|
+
organization_id="<your_organization_id>", # Optional for multi-org clients
|
|
112
|
+
airbyte_client_id="<your-client-id>",
|
|
113
|
+
airbyte_client_secret="<your-client-secret>"
|
|
114
|
+
)
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
@agent.tool_plain # assumes you're using Pydantic AI
|
|
118
|
+
@SendgridConnector.tool_utils
|
|
119
|
+
async def sendgrid_execute(entity: str, action: str, params: dict | None = None):
|
|
120
|
+
return await connector.execute(entity, action, params or {})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Full documentation
|
|
124
|
+
|
|
125
|
+
### Entities and actions
|
|
126
|
+
|
|
127
|
+
This connector supports the following entities and actions. For more details, see this connector's [full reference documentation](REFERENCE.md).
|
|
128
|
+
|
|
129
|
+
| Entity | Actions |
|
|
130
|
+
|--------|---------|
|
|
131
|
+
| Contacts | [List](./REFERENCE.md#contacts-list), [Get](./REFERENCE.md#contacts-get), [Search](./REFERENCE.md#contacts-search) |
|
|
132
|
+
| Lists | [List](./REFERENCE.md#lists-list), [Get](./REFERENCE.md#lists-get), [Search](./REFERENCE.md#lists-search) |
|
|
133
|
+
| Segments | [List](./REFERENCE.md#segments-list), [Get](./REFERENCE.md#segments-get), [Search](./REFERENCE.md#segments-search) |
|
|
134
|
+
| Campaigns | [List](./REFERENCE.md#campaigns-list), [Search](./REFERENCE.md#campaigns-search) |
|
|
135
|
+
| Singlesends | [List](./REFERENCE.md#singlesends-list), [Get](./REFERENCE.md#singlesends-get), [Search](./REFERENCE.md#singlesends-search) |
|
|
136
|
+
| Templates | [List](./REFERENCE.md#templates-list), [Get](./REFERENCE.md#templates-get), [Search](./REFERENCE.md#templates-search) |
|
|
137
|
+
| Singlesend Stats | [List](./REFERENCE.md#singlesend-stats-list), [Search](./REFERENCE.md#singlesend-stats-search) |
|
|
138
|
+
| Bounces | [List](./REFERENCE.md#bounces-list), [Search](./REFERENCE.md#bounces-search) |
|
|
139
|
+
| Blocks | [List](./REFERENCE.md#blocks-list), [Search](./REFERENCE.md#blocks-search) |
|
|
140
|
+
| Spam Reports | [List](./REFERENCE.md#spam-reports-list) |
|
|
141
|
+
| Invalid Emails | [List](./REFERENCE.md#invalid-emails-list), [Search](./REFERENCE.md#invalid-emails-search) |
|
|
142
|
+
| Global Suppressions | [List](./REFERENCE.md#global-suppressions-list), [Search](./REFERENCE.md#global-suppressions-search) |
|
|
143
|
+
| Suppression Groups | [List](./REFERENCE.md#suppression-groups-list), [Get](./REFERENCE.md#suppression-groups-get), [Search](./REFERENCE.md#suppression-groups-search) |
|
|
144
|
+
| Suppression Group Members | [List](./REFERENCE.md#suppression-group-members-list), [Search](./REFERENCE.md#suppression-group-members-search) |
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Authentication
|
|
148
|
+
|
|
149
|
+
For all authentication options, see the connector's [authentication documentation](AUTH.md).
|
|
150
|
+
|
|
151
|
+
### Sendgrid API docs
|
|
152
|
+
|
|
153
|
+
See the official [Sendgrid API reference](https://docs.sendgrid.com/api-reference).
|
|
154
|
+
|
|
155
|
+
## Version information
|
|
156
|
+
|
|
157
|
+
- **Package version:** 0.1.0
|
|
158
|
+
- **Connector version:** 1.0.1
|
|
159
|
+
- **Generated with Connector SDK commit SHA:** bcb024e51bb63dfea8ecdbc59da0966e25d6ed53
|
|
160
|
+
- **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/sendgrid/CHANGELOG.md)
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Sendgrid
|
|
2
|
+
|
|
3
|
+
The Sendgrid agent connector is a Python package that equips AI agents to interact with Sendgrid through strongly typed, well-documented tools. It's ready to use directly in your Python app, in an agent framework, or exposed through an MCP.
|
|
4
|
+
|
|
5
|
+
Connector for the Twilio SendGrid v3 API. Provides read access to marketing campaigns, contacts, lists, segments, single sends, transactional templates, and suppression management (bounces, blocks, spam reports, invalid emails, global suppressions, suppression groups, and suppression group members).
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Example questions
|
|
9
|
+
|
|
10
|
+
The Sendgrid connector is optimized to handle prompts like these.
|
|
11
|
+
|
|
12
|
+
- List all marketing contacts
|
|
13
|
+
- Get the details of a specific contact
|
|
14
|
+
- Show me all marketing lists
|
|
15
|
+
- List all transactional templates
|
|
16
|
+
- Show all single sends
|
|
17
|
+
- List all bounced emails
|
|
18
|
+
- Show all blocked email addresses
|
|
19
|
+
- List all spam reports
|
|
20
|
+
- Show all suppression groups
|
|
21
|
+
- How many contacts are in each marketing list?
|
|
22
|
+
- Which single sends were scheduled in the last month?
|
|
23
|
+
- What are the most common bounce reasons?
|
|
24
|
+
- Show me contacts created in the last 7 days
|
|
25
|
+
|
|
26
|
+
## Unsupported questions
|
|
27
|
+
|
|
28
|
+
The Sendgrid connector isn't currently able to handle prompts like these.
|
|
29
|
+
|
|
30
|
+
- Send an email
|
|
31
|
+
- Create a new contact
|
|
32
|
+
- Delete a bounce record
|
|
33
|
+
- Update a marketing list
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv pip install airbyte-agent-sendgrid
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
Connectors can run in open source or hosted mode.
|
|
44
|
+
|
|
45
|
+
### Open source
|
|
46
|
+
|
|
47
|
+
In open source mode, you provide API credentials directly to the connector.
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from airbyte_agent_sendgrid import SendgridConnector
|
|
51
|
+
from airbyte_agent_sendgrid.models import SendgridAuthConfig
|
|
52
|
+
|
|
53
|
+
connector = SendgridConnector(
|
|
54
|
+
auth_config=SendgridAuthConfig(
|
|
55
|
+
api_key="<Your SendGrid API key (generated at https://app.sendgrid.com/settings/api_keys)>"
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
@agent.tool_plain # assumes you're using Pydantic AI
|
|
60
|
+
@SendgridConnector.tool_utils
|
|
61
|
+
async def sendgrid_execute(entity: str, action: str, params: dict | None = None):
|
|
62
|
+
return await connector.execute(entity, action, params or {})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Hosted
|
|
66
|
+
|
|
67
|
+
In hosted mode, API credentials are stored securely in Airbyte Cloud. You provide your Airbyte credentials instead.
|
|
68
|
+
If your Airbyte client can access multiple organizations, also set `organization_id`.
|
|
69
|
+
|
|
70
|
+
This example assumes you've already authenticated your connector with Airbyte. See [Authentication](AUTH.md) to learn more about authenticating. If you need a step-by-step guide, see the [hosted execution tutorial](https://docs.airbyte.com/ai-agents/quickstarts/tutorial-hosted).
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from airbyte_agent_sendgrid import SendgridConnector, AirbyteAuthConfig
|
|
74
|
+
|
|
75
|
+
connector = SendgridConnector(
|
|
76
|
+
auth_config=AirbyteAuthConfig(
|
|
77
|
+
customer_name="<your_customer_name>",
|
|
78
|
+
organization_id="<your_organization_id>", # Optional for multi-org clients
|
|
79
|
+
airbyte_client_id="<your-client-id>",
|
|
80
|
+
airbyte_client_secret="<your-client-secret>"
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
@agent.tool_plain # assumes you're using Pydantic AI
|
|
85
|
+
@SendgridConnector.tool_utils
|
|
86
|
+
async def sendgrid_execute(entity: str, action: str, params: dict | None = None):
|
|
87
|
+
return await connector.execute(entity, action, params or {})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Full documentation
|
|
91
|
+
|
|
92
|
+
### Entities and actions
|
|
93
|
+
|
|
94
|
+
This connector supports the following entities and actions. For more details, see this connector's [full reference documentation](REFERENCE.md).
|
|
95
|
+
|
|
96
|
+
| Entity | Actions |
|
|
97
|
+
|--------|---------|
|
|
98
|
+
| Contacts | [List](./REFERENCE.md#contacts-list), [Get](./REFERENCE.md#contacts-get), [Search](./REFERENCE.md#contacts-search) |
|
|
99
|
+
| Lists | [List](./REFERENCE.md#lists-list), [Get](./REFERENCE.md#lists-get), [Search](./REFERENCE.md#lists-search) |
|
|
100
|
+
| Segments | [List](./REFERENCE.md#segments-list), [Get](./REFERENCE.md#segments-get), [Search](./REFERENCE.md#segments-search) |
|
|
101
|
+
| Campaigns | [List](./REFERENCE.md#campaigns-list), [Search](./REFERENCE.md#campaigns-search) |
|
|
102
|
+
| Singlesends | [List](./REFERENCE.md#singlesends-list), [Get](./REFERENCE.md#singlesends-get), [Search](./REFERENCE.md#singlesends-search) |
|
|
103
|
+
| Templates | [List](./REFERENCE.md#templates-list), [Get](./REFERENCE.md#templates-get), [Search](./REFERENCE.md#templates-search) |
|
|
104
|
+
| Singlesend Stats | [List](./REFERENCE.md#singlesend-stats-list), [Search](./REFERENCE.md#singlesend-stats-search) |
|
|
105
|
+
| Bounces | [List](./REFERENCE.md#bounces-list), [Search](./REFERENCE.md#bounces-search) |
|
|
106
|
+
| Blocks | [List](./REFERENCE.md#blocks-list), [Search](./REFERENCE.md#blocks-search) |
|
|
107
|
+
| Spam Reports | [List](./REFERENCE.md#spam-reports-list) |
|
|
108
|
+
| Invalid Emails | [List](./REFERENCE.md#invalid-emails-list), [Search](./REFERENCE.md#invalid-emails-search) |
|
|
109
|
+
| Global Suppressions | [List](./REFERENCE.md#global-suppressions-list), [Search](./REFERENCE.md#global-suppressions-search) |
|
|
110
|
+
| Suppression Groups | [List](./REFERENCE.md#suppression-groups-list), [Get](./REFERENCE.md#suppression-groups-get), [Search](./REFERENCE.md#suppression-groups-search) |
|
|
111
|
+
| Suppression Group Members | [List](./REFERENCE.md#suppression-group-members-list), [Search](./REFERENCE.md#suppression-group-members-search) |
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Authentication
|
|
115
|
+
|
|
116
|
+
For all authentication options, see the connector's [authentication documentation](AUTH.md).
|
|
117
|
+
|
|
118
|
+
### Sendgrid API docs
|
|
119
|
+
|
|
120
|
+
See the official [Sendgrid API reference](https://docs.sendgrid.com/api-reference).
|
|
121
|
+
|
|
122
|
+
## Version information
|
|
123
|
+
|
|
124
|
+
- **Package version:** 0.1.0
|
|
125
|
+
- **Connector version:** 1.0.1
|
|
126
|
+
- **Generated with Connector SDK commit SHA:** bcb024e51bb63dfea8ecdbc59da0966e25d6ed53
|
|
127
|
+
- **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/sendgrid/CHANGELOG.md)
|