SendGrid · Arazzo Workflow

SendGrid Search Contacts and Suppress

Version 1.0.0

Find contacts with an SGQL query and add the matched address to the global suppression list.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub EmailEmail APIMarketing EmailSMTPT1Transactional EmailEmail MarketingDeliverabilityMarketingArazzoWorkflows

Provider

sendgrid

Workflows

search-contacts-and-suppress
Search for a contact and globally suppress its email when found.
Searches contacts with an SGQL query and branches: when at least one contact matches, the supplied email is added to the global suppression list.
2 steps inputs: apiKey, email, query outputs: contactCount, suppressedEmails
1
searchContacts
Search contacts using the supplied SGQL query and branch on whether any contacts were matched.
2
suppressEmail
Add the supplied email address to the account's global suppression group so SendGrid will stop delivering mail to it.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: SendGrid Search Contacts and Suppress
  summary: Find contacts with an SGQL query and add the matched address to the global suppression list.
  description: >-
    A compliance flow for honoring opt-outs. The workflow runs a Segmentation
    Query Language (SGQL) search to locate a contact, branches on whether the
    search matched any contacts, and when a match is found adds the supplied
    email address to the account-wide global suppression group so SendGrid will
    no longer deliver mail to it. When no contact matches, the flow ends without
    suppressing. Each step inlines its request and bearer token so the flow can
    be read and run on its own.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-420.10
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-420.10
      capability_name: Customer Data Management
      spec: sendgrid-contacts-api-openapi.yml
      confidence: 0.72
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: contactsApi
  url: ../openapi/sendgrid-contacts-api-openapi.yml
  type: openapi
- name: globalSuppressionsApi
  url: ../openapi/sendgrid-global-suppressions-api-openapi.yml
  type: openapi
workflows:
- workflowId: search-contacts-and-suppress
  summary: Search for a contact and globally suppress its email when found.
  description: >-
    Searches contacts with an SGQL query and branches: when at least one contact
    matches, the supplied email is added to the global suppression list.
  inputs:
    type: object
    required:
    - apiKey
    - query
    - email
    properties:
      apiKey:
        type: string
        description: SendGrid API key sent as a bearer token.
      query:
        type: string
        description: An SGQL search string used to locate the contact.
      email:
        type: string
        description: The email address to add to the global suppression list when matched.
  steps:
  - stepId: searchContacts
    description: >-
      Search contacts using the supplied SGQL query and branch on whether any
      contacts were matched.
    operationId: SearchContact
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    requestBody:
      contentType: application/json
      payload:
        query: $inputs.query
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contactCount: $response.body#/contact_count
      result: $response.body#/result
    onSuccess:
    - name: contactMatched
      type: goto
      stepId: suppressEmail
      criteria:
      - context: $response.body
        condition: $.contact_count > 0
        type: jsonpath
    - name: noMatch
      type: end
      criteria:
      - context: $response.body
        condition: $.contact_count == 0
        type: jsonpath
  - stepId: suppressEmail
    description: >-
      Add the supplied email address to the account's global suppression group
      so SendGrid will stop delivering mail to it.
    operationId: CreateGlobalSuppression
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    requestBody:
      contentType: application/json
      payload:
        recipient_emails:
        - $inputs.email
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      suppressedEmails: $response.body#/recipient_emails
  outputs:
    contactCount: $steps.searchContacts.outputs.contactCount
    suppressedEmails: $steps.suppressEmail.outputs.suppressedEmails

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/sendgrid-search-contacts-suppress-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.