{
  "$result_object_key":  {
    "metric_entries":  [
      {
        "added_by_user":  "901234",
        "category":  "Breakfast",
        "created_at":  "2023-04-01T14:30:00Z",
        "description":  "Banana and protein smoothie after workout",
        "emotions":  "Happy",
        "id":  "890123",
        "name":  "Morning Smoothie",
        "type":  "FoodEntry",
        "value":  450
      }
    ]
  }
}
{
  "$result_object_key":  {
    "metric_entries":  {
      "added_by_user":  "ID of user that added the entry",
      "category":  "The category of this entry",
      "created_at":  "The time at which this entry was created",
      "description":  "The description for the entry",
      "emotions":  "The users emotions towards the meal",
      "id":  "The unique identifier of the entry",
      "name":  "The name for this entry",
      "type":  "The type for this entry, options are - FoodEntry, WorkoutEntry, MirrorEntry, SleepEntry, NoteEntry, WaterIntakeEntry, PoopEntry', null: false",
      "value":  "The `metric_stat` value of the metric entry"
    }
  }
}

Parameters

Action
Parameters
Patient ID
string
required

ID This field maps to the destination API patient_id field.

Description
string
required

This field maps to the destination API description field.

{
  "$result_object_key":  {
    "metric_entries":  [
      {
        "added_by_user":  "901234",
        "category":  "Breakfast",
        "created_at":  "2023-04-01T14:30:00Z",
        "description":  "Banana and protein smoothie after workout",
        "emotions":  "Happy",
        "id":  "890123",
        "name":  "Morning Smoothie",
        "type":  "FoodEntry",
        "value":  450
      }
    ]
  }
}
{
  "$result_object_key":  {
    "metric_entries":  {
      "added_by_user":  "ID of user that added the entry",
      "category":  "The category of this entry",
      "created_at":  "The time at which this entry was created",
      "description":  "The description for the entry",
      "emotions":  "The users emotions towards the meal",
      "id":  "The unique identifier of the entry",
      "name":  "The name for this entry",
      "type":  "The type for this entry, options are - FoodEntry, WorkoutEntry, MirrorEntry, SleepEntry, NoteEntry, WaterIntakeEntry, PoopEntry', null: false",
      "value":  "The `metric_stat` value of the metric entry"
    }
  }
}

Result Object Field Details

You can use the result of the action’s data as inputs to downstream workflow actions.

Each fetch action requires a result object key to be specified which will nest the action’s result data inside the downstream data context in the Workflow.

Here we demonstrate how to refer to this data using the prefix $result_object_key.

MetricEntries
Fetch Action Response Object
metric_entries
object
required

List of metric entries

CEL
$result_object_key.metric_entries
Example
[
{
"added_by_user":  "901234",
"category":  "Breakfast",
"created_at":  "2023-04-01T14:30:00Z",
"description":  "Banana and protein smoothie after workout",
"emotions":  "Happy",
"id":  "890123",
"name":  "Morning Smoothie",
"type":  "FoodEntry",
"value":  450
}
]
metric_entries.map(x, x.id)
[]string
required

Mapped array of: The unique identifier of the entry

CEL
$result_object_key.metric_entries.map(x, x.id)
Example
[
"890123"
]
metric_entries.map(x, x.type)
[]string
required

Mapped array of: The type for this entry, options are - FoodEntry, WorkoutEntry, MirrorEntry, SleepEntry, NoteEntry, WaterIntakeEntry, PoopEntry’, null: false

CEL
$result_object_key.metric_entries.map(x, x.type)
Example
[
"FoodEntry"
]
metric_entries.map(x, x.added_by_user)
[]string
required

Mapped array of: ID of user that added the entry

CEL
$result_object_key.metric_entries.map(x, x.added_by_user)
Example
[
"901234"
]
metric_entries.map(x, x.category)
[]string
required

Mapped array of: The category of this entry

CEL
$result_object_key.metric_entries.map(x, x.category)
Example
[
"Breakfast"
]
metric_entries.map(x, x.emotions)
[]string
required

Mapped array of: The users emotions towards the meal

CEL
$result_object_key.metric_entries.map(x, x.emotions)
Example
[
"Happy"
]
metric_entries.map(x, x.name)
[]string
required

Mapped array of: The name for this entry

CEL
$result_object_key.metric_entries.map(x, x.name)
Example
[
"Morning Smoothie"
]
metric_entries.map(x, x.description)
[]string
required

Mapped array of: The description for the entry

CEL
$result_object_key.metric_entries.map(x, x.description)
Example
[
"Banana and protein smoothie after workout"
]
metric_entries.map(x, x.created_at)
[]timing.v1.Timestamp
required

Mapped array of: The time at which this entry was created

CEL
$result_object_key.metric_entries.map(x, x.created_at)
Example
[
"2023-04-01T14:30:00Z"
]
metric_entries.map(x, x.value)
[]float64 (double)
required

Mapped array of: The metric_stat value of the metric entry

CEL
$result_object_key.metric_entries.map(x, x.value)
Example
[
450
]