Gravity Form to Leads please?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nth20
    Junior Member
    • Jun 2025
    • 28

    #16
    I tried like that but it does not work too!

    Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 1130

      #17
      Nth20,

      Yes, you can try this way. Change the settings in Gravity Forms, and leave everything as is in EspoCRM.

      Comment

      • Nth20
        Junior Member
        • Jun 2025
        • 28

        #18
        Originally posted by lazovic
        Nth20,

        Yes, you can try this way. Change the settings in Gravity Forms, and leave everything as is in EspoCRM.
        I did but it still does not work. I still need to fill in the date field in the Gravity form if I want the form to be captured. Otherwise, nothing captured!

        Comment

        • Nth20
          Junior Member
          • Jun 2025
          • 28

          #19
          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
            Junior Member
            • Jun 2025
            • 28

            #20
            Can anyone help me please?

            Comment

            • Nth20
              Junior Member
              • Jun 2025
              • 28

              #21
              Can anyone help me please?

              Comment

              • lazovic
                Super Moderator
                • Jan 2022
                • 1130

                #22
                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
                  Junior Member
                  • Jun 2025
                  • 28

                  #23
                  Originally posted by lazovic
                  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".
                  Thanks Iazovic, because I use the form for travel booking for both one-way and round-trip tickets with departure date and return date so someone can book one-way tickets only (they will fill in the departure date and leave the return date empty). That's the reason why sometimes the date field will be empty if my clients book one-way tickets only. How to tell the EspoCRM not to send that field when it's empty please? Is there anyway to set it in the workflow? I really need your help please.

                  Comment

                  • Ashif Malayil
                    Senior Member
                    • Dec 2023
                    • 226

                    #24
                    Nth20 , I think you can add these conditions in a workflow and select the Action "Send HTTP Request". Supported request methods are:
                    • GET
                    • POST
                    • PUT
                    • PATCH
                    • DELETE
                    Refer to the documentation: https://docs.espocrm.com/administrat...d-http-request

                    Comment

                    • lazovic
                      Super Moderator
                      • Jan 2022
                      • 1130

                      #25
                      Nth20,

                      As a workaround, you can create a text or varchar field for the date, send date data there, and if the field is not empty, then transfer the date to the desired field (cDepartureDate) specifically for the date.

                      Comment

                      Working...