Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Re: Passing output.markdown to automations

Solved
Jump to Solution
138 0
cancel
Showing results for 
Search instead for 
Did you mean: 

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?

1 Solution

Accepted Solutions

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})

See Solution in Thread

5 Replies 5

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})

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}`)

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.

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