Invoke URL action lets you call an external API endpoint and process its response.

  • For a record in: if you select an object when creating an Invoke URL action, you'll be able to insert fields from this object using Insert field in the Twig template editor. This setting does not restrict usage of this action to only the selected object.

    Note. Once selected, this object cannot be changed.

  • Method determines the "verb" that should be used when calling the external API endpoint: GET, POST, PUT, PATCH or DELETE.

  • Content Type determines the value of content-type in the call to the API endpoint: POST-FORM, JSON or XML.

  • Target URL: the URL of the external API endpoint to be called.

  • URL parameters: add Name/Value pairs that will be appended to the URL as Name=Value parameters.

  • Header parameters: add Name/Value pairs that will be added to the call as its header parameters.

  • FORM parameters:

    If you POST FORM in the Content Type, you'll be prompted to add Content-form parameters.

  • Body:

    If you select JSON or XML in the Content Type, you'll be prompted to specify the Body Twig template.

    In the example above, we are using a Twig template to produce a json-array of IDs of records for which the action was executed, like [58377373,70328266,27463525]

  • Result message (optional): a Twig template that Mapsly will use to create a resultMessage key in the action's Context out of the response object with the response of the external endpoint, which can be used in Twig templates of subsequent actions as, for example, lastAction.resultMessage. Use this template to create reusable actions that encapsulate parsing raw responses from their respective API endpoints and creating an easy to read and use resulting object.

Note. All parameters here are Twig templates so you may use Twig template editor to insert merge tags that will be resolved at runtime.

Did this answer your question?