Getting Error 412 Precondition Failed errors from Google Contacts
Hi, I am in the process of writing a recipe which updates my Google Contacts. When attempting the execute the `Update Contact in Google Contacts` action, the Google Contacts API seems to be throwing Workato a `412 Precondition Failed` error. Why is this the case? In my recipe I am simply mapping datapill from a previous action into the Google Contact action, with no transformations.
The error message I am getting:
The data I am trying to pass to Google Contact:
The action I am trying to execute:
Best Answer
B
Bryan Yap
said
about 6 years ago
Hi Saul, the issue seems to be that in your update step, Workato is not skipping datapills which are empty and is sending them formatted as empty strings to the Google Contact API which in turn causes some validation checks on Google Contact to fail. The fix for this would be to run some datapill validation on the Workato recipe in formula mode for each of the datapills we are trying to pass to Google Contact.
The example below shows how this can be done.
Essentially, what you need to do is to check if your datapill, in this case `Message` is present. And, if it is `present?`, return the datapill itself, else just `skip` it. Please ensure that you have formula mode enabled as well.
Hi Saul, the issue seems to be that in your update step, Workato is not skipping datapills which are empty and is sending them formatted as empty strings to the Google Contact API which in turn causes some validation checks on Google Contact to fail. The fix for this would be to run some datapill validation on the Workato recipe in formula mode for each of the datapills we are trying to pass to Google Contact.
The example below shows how this can be done.
Essentially, what you need to do is to check if your datapill, in this case `Message` is present. And, if it is `present?`, return the datapill itself, else just `skip` it. Please ensure that you have formula mode enabled as well.
Saul Macht
Getting Error 412 Precondition Failed errors from Google Contacts
Hi, I am in the process of writing a recipe which updates my Google Contacts. When attempting the execute the `Update Contact in Google Contacts` action, the Google Contacts API seems to be throwing Workato a `412 Precondition Failed` error. Why is this the case? In my recipe I am simply mapping datapill from a previous action into the Google Contact action, with no transformations.
The error message I am getting:
The data I am trying to pass to Google Contact:
The action I am trying to execute:Hi Saul, the issue seems to be that in your update step, Workato is not skipping datapills which are empty and is sending them formatted as empty strings to the Google Contact API which in turn causes some validation checks on Google Contact to fail. The fix for this would be to run some datapill validation on the Workato recipe in formula mode for each of the datapills we are trying to pass to Google Contact.
The example below shows how this can be done.
Essentially, what you need to do is to check if your datapill, in this case `Message` is present. And, if it is `present?`, return the datapill itself, else just `skip` it. Please ensure that you have formula mode enabled as well.
For more details on what other formulas you can use, check out the documentation at https://support.workato.com/support/solutions/articles/1000173152-formula-mode-list-of-common-formulas-operators-and-how-to-use-them.
Bryan Yap
Hi Saul, the issue seems to be that in your update step, Workato is not skipping datapills which are empty and is sending them formatted as empty strings to the Google Contact API which in turn causes some validation checks on Google Contact to fail. The fix for this would be to run some datapill validation on the Workato recipe in formula mode for each of the datapills we are trying to pass to Google Contact.
The example below shows how this can be done.
Essentially, what you need to do is to check if your datapill, in this case `Message` is present. And, if it is `present?`, return the datapill itself, else just `skip` it. Please ensure that you have formula mode enabled as well.
For more details on what other formulas you can use, check out the documentation at https://support.workato.com/support/solutions/articles/1000173152-formula-mode-list-of-common-formulas-operators-and-how-to-use-them.