Update Object
Update an existing object in your Procore account. This includes updating the object's field values as well as attaching new files to the object.
This action can be used to execute most Procore API calls that use an HTTP PATCH request and take a single object (rather than an array of objects) as input. Please refer to the Procore API Reference to find such APIs; most of them begin with the word "Update". Here are just a handful of Procore APIs that you can invoke with this action:
Inputs
Key | Value | |
---|---|---|
apiPath | Required | The Procore API endpoint that you wish to invoke, without the "vapid" prefix. Please refer to the Procore Actions overview for more on the apiPath input, which is required for all Procore Actions. |
field_<fieldname> | Required (at least one) | The value you want to place in the fieldname field of the Procore object you are updating. fieldname must be a valid field for the object type. Refer to the Body Parameters section of your chosen API documentation for a list of valid field names. |
fieldType_<fieldname> | Optional | The data type of the field called fieldname . The accepted values are date , datetime , boolean , text , number , and integer . Specifying this for a field will format the value in field_<fieldname> in a way that Procore will accept. This is only necessary for date and boolean fields; it can be skipped for other field types.Refer to the Body Parameters section of your Procore API's documentation to determine the correct field type for a given field. |
timeZone | Optional | The time zone for the date or datetime fields you specify. Procore will use this information to convert these fields to the time zone of your Procore Project. By default, UTC time is assumed. See the Zone ID column here for a list of accepted values for the timeZone input.This input is unnecessary if you don't specify any date or datetime fields. |
fileUrl | Optional | The full URL (including path and filename) of the file that you wish to attach to the Procore object. Note that not all Procore objects support attachments. Please refer to the Procore API documentation's Body Parameters section to determine whether the Update API call you are using can accept attachments. APIs that accept attachments will have attachments as one of their body parameters. The Update Observation Item API is one example of this. |
fileName | Optional | The name and extension that you want to give to the file that you are attaching to the Procore object. |
Outputs
None
Usage Example
Suppose you want to update an existing Injury record in Procore based on new data collected from a form in GoFormz. To do this, you might start with a Form Completed trigger, then configure an Update Object step as follows:
Key | Value |
---|---|
apiPath | /projects/#{trigger.ProjectId}/incidents/injuries/#{trigger.InjuryId} |
field_injury.affected_body_part | #{trigger.affected_body_part} |
field_injury.hazard_id | #{trigger.hazard_id} |
field_injury.affected_company_id | #{trigger.vendor_id} |
field_injury.affected_person_id | #{trigger.affected_person_id} |
field_injury.affliction_type_id | #{trigger.affliction_type_id} |
In this example, we first construct the apiPath
as described in Procore's Update Injury API documentation, using the "ProjectId" and "InjuryId" fields from the completed form to fill in the required project ID and injury ID path parameters. Then we fill the affected_body_part
, hazard_id
, affected_company_id
, affected_person_id
, and affliction_type_id
parameters of the Incident with corresponding values from the completed form. Note that all of these parameters can be found in the Body Parameters of the Update Injury API documentation.
Updated over 5 years ago