Announcement

Collapse
No announcement yet.

Send HTTP Request payload formula function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Send HTTP Request payload formula function

    I am trying to use a formula function in payload field of the Send HTTP Request action workflow, but it's not working.

    Code:
    {
    "text":"Hello World",
    "fields":[
        {
            "title":"Start",
           "value":"{date\format($dateStart)}"
       },
       {
           "title":"End",
           "value":"{$dateEnd}"
       }
    ]
    }
    I need to use the formula, because otherwise the replaced datetime will be in UTC+0 and it would not be formatted according to settings. Without formatting it would be something like this "2020-07-15 14:50".

    Is it possible to achieve datetime formatting somehow in Send HTTP Request payload?

  • #2
    Hi there,
    You can't use Formula in the Payload field. Do you want to send date w/o time part (e.g. w/o 14:50)? As a workaround, you can create a new date type field and push the date from the
    'dateStart' field to it by Workflow or Formula. After, use this field in Payload.

    Comment


    • #3
      Originally posted by Maximus View Post
      Hi there,
      You can't use Formula in the Payload field. Do you want to send date w/o time part (e.g. w/o 14:50)? As a workaround, you can create a new date type field and push the date from the
      'dateStart' field to it by Workflow or Formula. After, use this field in Payload.
      I thought about using hidden fields, but it feels so "dirty" doing that trick. I was hoping there would be some way to achieve this better.

      Comment


      • #4
        BPM allows using variables.
        If you find EspoCRM good, we would greatly appreciate it if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment


        • #5
          Originally posted by yurikuzn View Post
          BPM allows using variables.
          Is there some guide which shows how to use variables for such purpose? I couldn't find a way on my own to arrange with variables.

          Comment


          • #6
            Not sure if this help: https://docs.espocrm.com/administration/bpm/

            But some of those hyperlinks lead to a new page rather than section (hard to tell unless you hover over the URL).

            Comment


            • #7
              You can use a variable in a payload definition. The variable should be defined before in a script task (in the same BPM flowchart).

              You can setup your workflow to run a BPM process. That process will be intended solely for HTTP request handling. In that process variables are set in a script task and then are used in the payload definition.
              If you find EspoCRM good, we would greatly appreciate it if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

              Comment


              • #8
                Originally posted by shef View Post

                Is there some guide which shows how to use variables for such purpose? I couldn't find a way on my own to arrange with variables.
                BPM don't give possibility to use Notes (Stream)...
                Is that possible?

                Thanks

                Comment


                • #9
                  Originally posted by rodrigocoelho View Post

                  BPM don't give possibility to use Notes (Stream)...
                  Is that possible?

                  Thanks
                  yuri , may you confirm if is possible to use Notes on BPM?

                  Thanks

                  Comment


                  • yuri
                    yuri commented
                    Editing a comment
                    It's not possible to use notes as target entity in bpm.

                  • emillod
                    emillod commented
                    Editing a comment
                    You can create note through formula.

                  • rodrigocoelho
                    rodrigocoelho commented
                    Editing a comment
                    I tried, without success. Any example, please? Thanks emillod

                • #10

                  But it is on Workflows. What other way to use Notes? Only via Websockets?

                  Thanks for answering..

                  Comment


                  • yuri
                    yuri commented
                    Editing a comment
                    Please create a separate topics. No need to hijacking a topic.
                Working...
                X