I'm using GTL (Guide Template Language) on the body of an email where I want to show some images dynamically and works well. But, to let the email more "clean" I want to copy that GTL code on a different ContentArea and then call that content using AMPscript.

I tried with ContentAreaByName and TreatAsContent but on both cases doesn't work, nothing is displayed.

So my question is: Is possible use the GTL on a ContentArea or that code block have to be at the same place?

  • Any solutions for this? I've tried the ContentBlockByKey but get a data source not found error.
    – Noor Alam
    Commented Aug 7, 2018 at 15:21

1 Answer 1


Yes, the content block can be pulled in by using GTL.

List of AMPscript functions that should be available within the Guide and follows the same parameters for usage.

Here is the structure:


In your scenario you should be pulling in content block using the function below:

  • Brad, I don't think this solution works. The use case is if you have GTL content in a content block how can it be brought into a email. I get this error "An error occurred when attempting to evaluate a ContentBlockByKey function call"
    – Noor Alam
    Commented Aug 7, 2018 at 15:20
  • @NoorAlam this was tested and it works for me. if you have a GTL within a content block then you'd need to wrap it with TreatAsContent function which will execute the ampscript Commented Aug 8, 2018 at 1:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .