I tried like that but it does not work too!
Gravity Form to Leads please?
Collapse
X
-
Nth20,
Yes, you can try this way. Change the settings in Gravity Forms, and leave everything as is in EspoCRM.Comment
-
I contacted the Gravity Form staff and they informed the following error and asked me to contact you to find out how to prevent your API returning the 400 error:
2025-07-31 11:51:56.211333 - DEBUG --> GF_Webhooks:rocess_feed(): Sending webhook request to (My lead capture link); Array
(
[body] => {"firstName":"Hanh","lastName":"Nguyen","cNoOfG ues ts":"5","emailAddress":"testtesttest@gmail.com","addressCountry":"Viet Nam","cPhoneNumber":"09999999999988","cDepartureT r ain":"","cDepartureTickets":"","cDepartureAdditio n alServices":"","cDeparturePoint":"","cDepartureAdd itionalNotes":"","cReturnTrain":"","cReturnTickets ":"","cDepartureDate":"","cReturnDate":""}
[method] => POST
[headers] => Array
(
[Content-Type] => application/json
[Accept] => application/json
)
[sslverify] => 1
)
2025-07-31 11:51:56.269546 - DEBUG --> GF_Webhooks:rocess_feed(): Webhook sent. Response code: 400; body: {"messageTranslation":{"label":"validationFailu re" ,"scope":null,"data":{"field":"cDepartureDate", "ty pe":"valid"}}}
Last edited by Nth20; Yesterday, 01:29 PM.Comment
-
Nth20,
The 400 error is caused by EspoCRM not accepting an empty string for the Date type field. To fix it, don't send that field when it’s empty, or send a default valid date like "2025-01-01".Comment
-
Nth20,
Create a Varchar field (in the provided example, it's called "newField") and insert the following formula script in the Administration > Entity Manager > Meeting > Formula:
Code:if (newField) { cDepartureDate = newField }
Comment
-
Thanks Iazovic, in my Gravity form, there are 2 date fields. One date field called Date from Hanoi (cdepartureDate in EspoCRM) and other date field called Date from Sapa (creturnDate in EspoCRM) so will I need to make 2 formula scripts as belows?
Code:if Date from Hanoi { cDepartureDate = Date from Hanoi } if Date from Sapa { creturnDate = Date from Sapa }
Thanks in advance for your help!Comment
-
Nth20,
In EspoCRM you need to create two more fields, for example, departureDate1 and returnDate1. In Grafity Form, you need to map the values of Date from Hanoi and Date from Sapa to these fields. Then in EspoCRM use the following formula script:
Code:if (departureDate1) { cDepartureDate = departureDate1 } if (returnDate1) { creturnDate = returnDate1 }
Comment
Comment