Bubble · Arazzo Workflow

Bubble Upsert a Thing

Version 1.0.0

Find a record by a key field and update it if it exists, otherwise create it.

1 workflow 1 source API 1 provider
View Spec View on GitHub No-CodeApplication PlatformDatabaseWorkflow-AutomationPluginsArazzoWorkflows

Provider

bubble

Workflows

upsert-thing
Upsert a single record into a Bubble data type by a unique key field.
Looks for an existing record whose key field matches the supplied value, and either modifies the matched record or creates a new one.
3 steps inputs: fields, keyField, keyValue, typename outputs: createdId, updatedId
1
findThing
searchThings
Search the data type for an existing record where the key field equals the supplied key value, returning at most one match.
2
updateExisting
modifyThing
Partially update the matched record with the supplied fields. Only the fields provided are changed; all other fields on the record are left intact.
3
createNew
createThing
Create a new record in the data type using the supplied fields when no existing record matched the key value.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Bubble Upsert a Thing
  summary: Find a record by a key field and update it if it exists, otherwise create it.
  description: >-
    One of the most common Bubble Data API integration patterns. The workflow
    searches a data type for an existing record using a single equality
    constraint on a key field, and then branches: when a match is found it
    modifies the existing record, and when no match is found it creates a new
    record. Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: dataApi
  url: ../openapi/_superseded/bubble-data-api-openapi.yml
  type: openapi
workflows:
- workflowId: upsert-thing
  summary: Upsert a single record into a Bubble data type by a unique key field.
  description: >-
    Looks for an existing record whose key field matches the supplied value, and
    either modifies the matched record or creates a new one.
  inputs:
    type: object
    required:
    - typename
    - keyField
    - keyValue
    - fields
    properties:
      typename:
        type: string
        description: Data type name in lowercase with spaces removed.
      keyField:
        type: string
        description: The field name used to detect an existing record (e.g. email).
      keyValue:
        type: string
        description: The value of the key field to match on.
      fields:
        type: object
        description: Map of field name/value pairs to write to the record.
  steps:
  - stepId: findThing
    description: >-
      Search the data type for an existing record where the key field equals the
      supplied key value, returning at most one match.
    operationId: searchThings
    parameters:
    - name: typename
      in: path
      value: $inputs.typename
    - name: constraints
      in: query
      value: '[{"key":"$inputs.keyField","constraint_type":"equals","value":"$inputs.keyValue"}]'
    - name: limit
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedId: $response.body#/response/results/0/_id
    onSuccess:
    - name: thingExists
      type: goto
      stepId: updateExisting
      criteria:
      - context: $response.body
        condition: $.response.results.length > 0
        type: jsonpath
    - name: thingMissing
      type: goto
      stepId: createNew
      criteria:
      - context: $response.body
        condition: $.response.results.length == 0
        type: jsonpath
  - stepId: updateExisting
    description: >-
      Partially update the matched record with the supplied fields. Only the
      fields provided are changed; all other fields on the record are left
      intact.
    operationId: modifyThing
    parameters:
    - name: typename
      in: path
      value: $inputs.typename
    - name: uid
      in: path
      value: $steps.findThing.outputs.matchedId
    requestBody:
      contentType: application/json
      payload: $inputs.fields
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      thingId: $steps.findThing.outputs.matchedId
    onSuccess:
    - name: done
      type: end
  - stepId: createNew
    description: >-
      Create a new record in the data type using the supplied fields when no
      existing record matched the key value.
    operationId: createThing
    parameters:
    - name: typename
      in: path
      value: $inputs.typename
    requestBody:
      contentType: application/json
      payload: $inputs.fields
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      thingId: $response.body#/id
  outputs:
    updatedId: $steps.updateExisting.outputs.thingId
    createdId: $steps.createNew.outputs.thingId

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/bubble-upsert-thing-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.