Microsoft Exchange · Arazzo Workflow

Microsoft Exchange Upsert a Contact

Version 1.0.0

Find a contact by email and update it if it exists, otherwise create it.

1 workflow 1 source API 1 provider
View Spec View on GitHub CalendarCollaborationContactsEmailEnterpriseArazzoWorkflows

Provider

microsoft-exchange

Workflows

upsert-contact
Upsert a contact in the default contacts folder by email address.
Looks for an existing contact whose email matches the supplied value and either updates the matched contact or creates a new one.
3 steps inputs: companyName, emailAddress, givenName, surname outputs: createdContactId, updatedContactId
1
findContact
Search the default contacts folder for a contact whose email address equals the supplied value, returning at most one match.
2
updateExisting
Patch the matched contact with the supplied name and company values.
3
createNew
Create a new contact with the supplied name, company, and email address when no existing contact matched.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Exchange Upsert a Contact
  summary: Find a contact by email and update it if it exists, otherwise create it.
  description: >-
    A contact synchronization pattern on Microsoft Graph contacts. The workflow
    searches the default contacts folder for a contact whose email address
    matches a supplied value and then branches: when a match is found it patches
    the existing contact, and when no match is found it creates a new one. Each
    step inlines its request so the flow can be executed without consulting the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: contactsApi
  url: ../openapi/microsoft-exchange-contacts-api-openapi.yml
  type: openapi
workflows:
- workflowId: upsert-contact
  summary: Upsert a contact in the default contacts folder by email address.
  description: >-
    Looks for an existing contact whose email matches the supplied value and
    either updates the matched contact or creates a new one.
  inputs:
    type: object
    required:
    - emailAddress
    - givenName
    - surname
    properties:
      emailAddress:
        type: string
        description: The email address used to detect an existing contact.
      givenName:
        type: string
        description: The contact's given (first) name.
      surname:
        type: string
        description: The contact's surname (last name).
      companyName:
        type: string
        description: The optional company name for the contact.
  steps:
  - stepId: findContact
    description: >-
      Search the default contacts folder for a contact whose email address
      equals the supplied value, returning at most one match.
    operationId: listContacts
    parameters:
    - name: $filter
      in: query
      value: emailAddresses/any(e:e/address eq '$inputs.emailAddress')
    - name: $top
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedContactId: $response.body#/value/0/id
    onSuccess:
    - name: contactExists
      type: goto
      stepId: updateExisting
      criteria:
      - context: $response.body
        condition: $.value.length > 0
        type: jsonpath
    - name: contactMissing
      type: goto
      stepId: createNew
      criteria:
      - context: $response.body
        condition: $.value.length == 0
        type: jsonpath
  - stepId: updateExisting
    description: >-
      Patch the matched contact with the supplied name and company values.
    operationId: updateContact
    parameters:
    - name: contact-id
      in: path
      value: $steps.findContact.outputs.matchedContactId
    requestBody:
      contentType: application/json
      payload:
        givenName: $inputs.givenName
        surname: $inputs.surname
        companyName: $inputs.companyName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      contactId: $response.body#/id
    onSuccess:
    - name: done
      type: end
  - stepId: createNew
    description: >-
      Create a new contact with the supplied name, company, and email address
      when no existing contact matched.
    operationId: createContact
    requestBody:
      contentType: application/json
      payload:
        givenName: $inputs.givenName
        surname: $inputs.surname
        companyName: $inputs.companyName
        emailAddresses:
        - address: $inputs.emailAddress
          name: $inputs.givenName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactId: $response.body#/id
  outputs:
    updatedContactId: $steps.updateExisting.outputs.contactId
    createdContactId: $steps.createNew.outputs.contactId

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/microsoft-exchange-upsert-contact-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.