Help with aggregator and interator

Hi there. I have no idea what I am doing lol. ChatGPT ftw. well for the NOT win. Im almost got it working.

I have a Webhook from ElevenLabs. Im trying to use Make.com to email me some of the data. This works fine.

Then we pass that to a Iterator. Seems to work fine? I can see in the output this.

[
{
“role”: “agent”,
“message”: “Hello Trevor, welcome to Nybble Bytesize. My name is Elbbyn. How can I help you today?”,
“tool_calls”: ,
“tool_results”: ,
“feedback”: null,
“llm_override”: null,
“time_in_call_secs”: 0,
“conversation_turn_metrics”: null,
“rag_retrieval_info”: null,
“llm_usage”: null,
“interrupted”: false,
“original_message”: null,
“source_medium”: null,
IMTINDEX”: 1,
IMTLENGTH”: 1
}
]

When someone replies on the chat it would have another item in there, with role of “user” with their message.

What I want to do is basically email the transcript. Which works fine on Zapier, as they have a JS module. Make seems to only let you use third party solutions?

So I need to rely on Iterator and Text Aggretor. So grab the Role and Message from each array item, then input this into some HTML, which then gets emailed.

The issue is with the template or whatever in the Aggregator. ChatGPT is telling me to put this.

{{#each}}{{Iterator}}
{{#if}}{{(eq + role + “agent”)}}



Agent:

{{{message}}}



{{else}}


You:

{{{message}}{{“}



" / if}}{{”
" / each}}

But when the email comes through, there is no proper structure, its just not processing correctly.



I hope this makes sense. I have never used make before, so if i sound like i dont know what i am talking about, thats becuase i dont, really.

Rob.

{{#each}}{{Iterator}}
  {{#if}}{{(eq + role + "agent")}}
    <div style="display:flex; justify-content:flex-start; margin-bottom:8px">
      <div style="background:#f5f5f5; padding:8px; border-radius:12px; border:1px solid #e5e5e5; max-width:80%">
        <strong style="display:block; margin-bottom:4px; color:#333">Agent:</strong>
        <div style="color:#111; line-height:1.4">
          {{{message}}}
        </div>
      </div>
    </div>
  {{else}}
    <div style="display:flex; justify-content:flex-end; margin-bottom:8px">
      <div style="background:#e8f1fb; padding:8px; border-radius:12px; border:1px solid #d0e4f7; max-width:80%">
        <strong style="display:block; margin-bottom:4px; color:#333">You:</strong>
        <div style="color:#111; line-height:1.4">
          {{{message}}{{"}
        </div>
      </div>
    </div>
  " / if}}{{"
" / each}}```