Help

Markdown Images in Scripting Block!?

Topic Labels: Custom Extensions
Solved
Jump to Solution
17880 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Martin_Kranz
6 - Interface Innovator
6 - Interface Innovator

Been trying to wrap my head around how to display record attachments (images) in the markdown output of the scripting app. I heard rumours that’s possible :slightly_smiling_face: but haven’t seen any code snippets that seemed to be working []!($URL) produces errors asking for a function called

Any hints?

1 Solution

Accepted Solutions
Erin_OHern
6 - Interface Innovator
6 - Interface Innovator

Hi @Martin_Kranz ,

Here’s the syntax for rendering images with Markdown – you’ll want to put the exclamation before the square brackets, and then it should work!

Here’s an example for the scripting app:

let attachmentURL = record.getCellValue('Attachments')[0].url;
output.markdown(`![](${attachmentURL})`)

Hope this helps!

See Solution in Thread

3 Replies 3
Erin_OHern
6 - Interface Innovator
6 - Interface Innovator

Hi @Martin_Kranz ,

Here’s the syntax for rendering images with Markdown – you’ll want to put the exclamation before the square brackets, and then it should work!

Here’s an example for the scripting app:

let attachmentURL = record.getCellValue('Attachments')[0].url;
output.markdown(`![](${attachmentURL})`)

Hope this helps!

Sweet! Thanks Erin, helped a lot!

@Erin_OHern It’s working like charm, but is there any easy way to get to the thumbnail image ?

record.getCellValue('Attachments')[0].thumbnail.small.url

by any chance!?