Skip to main content
Solved

Markdown Images in Scripting Block!?


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?

Best answer by Erin_OHern

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!

View original
Did this topic help you find an answer to your question?

3 replies

  • Participating Frequently
  • 28 replies
  • Answer
  • February 24, 2021

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!


  • Author
  • Inspiring
  • 18 replies
  • February 24, 2021
Erin_OHern wrote:

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!


  • Author
  • Inspiring
  • 18 replies
  • February 25, 2021
Martin_Kranz wrote:

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!?


Reply