Passing output.markdown to automations

Hi all,

Is there a way I could pass markdown - result of script run to automations?
Like in the example here
where the output table could be send in an email?

The Send Email action already supports markdown. Transfer whatever data you want from the Run a Script step to the Email step using output.set().

I.e. output.set('markdown', ## ${table.name})

1 Like

The example that @Kamille_Parks listed isn’t displaying correctly because this forum uses markdown-ish symbols that have different meaning in JavaScript, and it looks like the symbol clash made her example unclear. I think this is what was meant:

output.set('markdown', `## ${table.name}`)
1 Like

Makes sense. Thank you.
In the example above how would I replace the

output.table(
    records.map(record => ({
        Name: record.getCellValue('Name'),
        Category: record.getCellValue('Category'),
        'Project lead': record.getCellValue('Project lead'),
        Client: record.getCellValue('Client'),
    })),
);

to be able to pass the table to automations?

The send email action has limited markdown support. I believe that the flavor of markdown in automated emails matches the markdown for rich text fields, and tables are not included.

In the custom report that you link to, the Scripting app is actually using output.table() to produce the table, not markdown, and output.table() is not available in a Scripting action.

If you need an actual table, you will need to build HTML and use a third party service for delivery (likely in combination with Zapier or Integromat).

If this is for internal use only and you do not need pretty formatting, you can use text formatting hacks to try and get the data to be somewhat readable or at least copy/paste-able.

1 Like

Thank you @kuovonne
I’ll try to build something around Integromat, hoping this will be possible one day in a Scripting action.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.