Docs
Update based on field

Update based on field

When using overwrite mode with run once requests, you specify how Otera updates existing Notion rows by matching data based on unique field values that exist in your Notion database and the API response (such as an ID field).

How to update based on unique matching fields

  1. Create a new request or open an existing one
  2. After connecting to Notion, setting the request options, and mapping database fields, click the Output options step
  3. Under Request type, choose Run once
  4. Under Output mode, choose Overwrite
  5. Select the source field from the API response and matching Notion field

Example of updating based on unique matching fields

Let's say you have a Notion database that looks like this:

Product IDItemPrice
32Headphones
523Speaker
213Phone Case

And your API response looks like this:

[
  {
    "id": 32,
    "name": "Wireless Headphones",
    "price": 89.99
  },
  {
    "id": 523,
    "name": "Bluetooth Speaker",
    "price": 45.5
  },
  {
    "id": 213,
    "name": "Phone Case",
    "price": 12.99
  }
]

The id field in the API response corresponds to the Product ID field in your Notion database, so you can:

  • set Source field to id
  • set Notion field to Product ID

Update based on matching fields

  • For each API response item, Otera will look for a row where the id value matches the field value of Product ID.
  • If it finds a matching row, it will update it.
  • If it doesn't, it will either do nothing or create a new record if Create records not found in Notion database is enabled.

Result after import:

Product IDItemPrice
32Headphones89.99
523Speaker45.50
213Phone Case12.99

Best practices

  • Ensure matching field values are unique in your database
  • Before running a request on a large database, ensure that your settings work by testing in a smaller database with sample fields