diff --git a/src/provider-guides/sendGrid.mdx b/src/provider-guides/sendGrid.mdx index 66407786..8a9a496b 100644 --- a/src/provider-guides/sendGrid.mdx +++ b/src/provider-guides/sendGrid.mdx @@ -1,38 +1,86 @@ --- -title: SendGrid +title: "SendGrid" --- + ## What's supported ### Supported actions This connector supports: +- [Read Actions](/read-actions), including full historic backfill for all supported objects below. Incremental read is not currently supported. +- [Write Actions](/write-actions) (create/update/delete). - [Proxy Actions](/proxy-actions), using the base URL `https://api.sendgrid.com`. +- Subscribe Actions are not currently supported. + +### Supported objects + +export const Check = () => +export const Cross = () => 🚫 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ObjectReadWriteSubscribe
contacts
lists
segments
singlesends
templates
field_definitions
verified_senders
senders
bounces
blocks
spam_reports
unsubscribes
invalid_emails
asm_groups
categories
subusers
+
### Example integration -To define an integration for SendGrid, create a manifest file that looks like this: +For an example manifest file of a SendGrid integration, visit our [samples repo on Github](https://github.com/amp-labs/samples/blob/main/sendGrid/amp.yaml). -```YAML -# amp.yaml -specVersion: 1.0.0 -integrations: - - name: sendGrid-integration - displayName: My SendGrid Integration - provider: sendGrid - proxy: - enabled: true -``` +## Before you get started -## Using the connector +To connect SendGrid with Ampersand, you will need a [SendGrid account](https://signup.sendgrid.com/). -This connector uses API Key auth, which means that you do not need to set up a Provider App before getting started. (Provider apps are only required for providers that use OAuth2 Authorization Code grant type.) +This connector uses **API key** authentication. You do **not** need to create a Provider App in Ampersand before getting started (Provider apps are only required for OAuth2 Authorization Code providers). -To start integrating with SendGrid: -- Create a manifest file like the example above. -- Deploy it using the [amp CLI](/cli/overview). -- Embed the [InstallIntegration](/embeddable-ui-components#install-integration) UI component. The UI component will prompt the customer for an API key. -- Start making [Proxy Calls](/proxy-actions), and Ampersand will automatically attach the API key supplied by the customer. Please note that this connector's base URL is `https://api.sendgrid.com`. +Each customer supplies their own SendGrid API key during installation via the [InstallIntegration](/embeddable-ui-components#install-integration) UI component. + +### Create a SendGrid API key -## Creating an API key for SendGrid +Follow SendGrid’s documentation to create an API key with the scopes your integration needs: -[Click here](https://www.twilio.com/docs/sendgrid) for more information about generating an API key for SendGrid. The UI components will display this link, so that your users can successfully create API keys. +1. Log in to your [SendGrid account](https://app.sendgrid.com/). +2. Go to **Settings → API Keys**. +3. Click **Create API Key**. +4. Choose **Restricted Access** and grant the minimum scopes required for your integration (for example, Marketing Campaigns for `lists`, Template Engine for `templates`, and Suppressions for `asm_groups` and suppression reads). +5. Copy the API key — SendGrid shows the full key only once. + +SendGrid documentation: [Create and manage API keys](https://www.twilio.com/docs/sendgrid/ui/account-and-settings/api-keys). + +## Using the connector + +To start integrating with SendGrid: + +- Create a manifest file like the [example](https://github.com/amp-labs/samples/blob/main/sendGrid/amp.yaml). +- Deploy it using the [amp CLI](/cli/overview). +- If you are using Read Actions, create a [destination](/destinations). +- Embed the [InstallIntegration](/embeddable-ui-components#install-integration) UI component. The UI component will prompt the customer for their SendGrid API key. +- Start using the connector! + - If your integration has [Read Actions](/read-actions), you'll start getting webhook messages. + - If your integration has [Write Actions](/write-actions), you can start making API calls to our Write API. + - If your integration has [Proxy Actions](/proxy-actions), you can start making Proxy API calls. Ampersand will automatically attach the customer's API key.