I think you're right that that documentation needs an update. If you take a look at the "Defining Templates" section of the Timelines Overview documentation: https://developers.hubspot.com/docs/methods/timeline/timeline-overview#defining-templates, there's a note on there: "We accept two templates: the header template which should be just one line describing the event..."
In testing, I was able to submit the header template with a line break, which ends up showing up in the event type itself. But on the actual record timeline, it's reduced to one line.
I'll ask that we get this article updated: https://developers.hubspot.com/docs/methods/timeline/timeline-template-rendering. And I'll see if we can add some validation into the API itself, since I think it makes sense to alert the developer about this, when we're not actually allowing multiple lines for a header template in the record timeline.
As for the detail template, I'm not sure what's actually intended here. Our documentation does state that the template is rendered through markup. And if you take a look at this cheat sheet for markdown: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#line-breaks, you'll see that you can use a double space to create line breaks. So for example:
line one
line two
line three
line four
So basically after "line one" I have two line spaces like so: "line one ". So again, I'm not totally sure what's intended here, and I'll need to see if the \n is working as intended. But hopefully this is helpful in the meantime. Let me know if it works for you?
May 25, 201911:57 AM - edited May 25, 201912:01 PM
Top Contributor
Timeline Templates Formatting
SOLVE
I've read the articles on markup, and absolutely nothing works for line breaks or even bullet lists. I find it extremely odd that this can be the case and no one has ever brought it up. So I suppose I'm doing something wrong. But this seems so straightforward that I don't know how it's possible to get it wrong.
And by the way, in your example above, why do you show "line one" and "line two" with two spaces after each, but already on separate lines? Shouldn't it be: