Retrieving Remote Data Within a Block

You can pull data directly from a remote application into a Sendlio template by supplying a URL to the sendlio.getJSON() method. This is useful if you want to pull content specific to the member based on member variables available in your message block template.

Here's an example of how this works:

{# get the remote data #}
{% set response = sendlio.getJSON("https://jsonplaceholder.typicode.com/todos/1") %}

{# use the response in your block #}
{{ response.title }}

By setting the response to a variable, the data will be accessbile from anywhere within the block. 

If you are sending the same content to multiple recipients, you should connect a content collection to your block instead.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us