• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Recipe Building Questions
S

Saul Macht

started a topic about 6 years ago
Answered

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:

image


The data I am trying to pass to Google Contact:

image


The action I am trying to execute:

image



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.

image


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.


Answer

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.

image


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.


Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count