Adding virtual column info to workflow email?

Hi all -

I have an app that generates an email that sends out just fine.
I’d like to pull in some data from an outside source (wunderground.com) to incorporate the hourly forecast table into the workflow email.

I have 2 tables. Table 1 collects user input (truck checkoff).
I have a second table (weather) that has an ImportHTML formula: (=importhtml(“https://www.wunderground.com/hourly/us/tx/dallas/75240?cm_ven=localwx_hour","table”,1)

I was hoping I could pull data from the Weather table into the first, which would then push that into the workflow email that gets sent, but I must not have the right button checked.

Or is this even the best way to accomplish this?
Any suggestions or help would be awesome!!

Cheers,
Tim

Do you want to include the whole Table2 or just the data for one row from Table2?

Hi Tim,

You can definitely include data from another table, in your email template.

One way to do this is to write a Start expression that selects one or more rows from the second table.
That Start expression would typically select the row or rows in the second table based on values in the current record from the first table. Your template can them display the appropriate field values from the second table. This article shows examples of templates having Start expressions that display rows from a second table. https://help.appsheet.com/en/articles/2697047-sample-email-templates

Start expressions are described here https://help.appsheet.com/en/articles/961746-template-start-expressions

Alternatively, you might include one or more Virtual columns in your first table that have AppFormulas that obtain data from the second table. You could then display those Virtual column values in your template.

The first approach is normally better when you wish to display more that one row from the second table.

thanks for your reply @Bellave_Jayaram - I was looking for some of the rows, but if I have to include all, that’s fine too.

it looks like @Phil has replied also - so I’ll see how it goes.

thank you, gentlemen!

so…i was finally able to get my data from the weather table into my email notification (yay!), but not exactly in a very friendly format…it looks like this:

What I’d like is like this:

And, no @Bellave_Jayaram , I don’t need all the rows, (or even all of the columns), but I have a feeling it’d be easier coding to include them all.

As that web service is returning HTML, I wonder if you could get that nice table formatting if you use a HTML template rather than a Google Doc template (which is what I presume you are using.)

no…actually i’m not using a template at all…
I have the data coming in via virtual columns as suggested by @Phil:

I’ve not been able to figure out the template thing for some reason. When I tell AppSheet to create the template, nothing happens (a template isn’t made/placed where it tells me it should be).
The email that goes out is the default body template:

If I could get the html to get pulled in via a virtual column (or some other way) that’d be great!

Here’s a template you could try:

<html>
  <head>
  </head>
  <Body>
<table>
<tbody>
<tr>
<td>
<h2><strong>Time</strong></h2>
</td>
<td>
<h2><strong>Conditions</strong></h2>
</td>
<td>
<h2><strong>Temp.</strong></h2>
</td>
<td>
<h2><strong>Feels Like</strong></h2>
</td>
<td>
<h2><strong>Precip</strong></h2>
</td>
<td>
<h2><strong>Amount</strong></h2>
</td>
<td>
<h2><strong>Cloud Cover</strong></h2>
</td>
<td>
<h2><strong>Dew Point</strong></h2>
</td>
</tr>
<tr>
<td>
<h2><span style="font-weight: 400;"><<Start: SELECT(Weather[ZIP], [ZIP]=[_THISROW].[ZIP])>></span><span style="font-weight: 400;"><<[</span><span style="font-weight: 400;">MBOID</span><span style="font-weight: 400;">]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Time]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Conditions]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Temp.]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Feels Like]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Precip]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Amount]>></span></h2>
</td>
<td>
<h2><span style="font-weight: 400;"><<[Cloud Cover]>></span></h2>
</td>
<td>
<p><span style="font-weight: 400;"><<[Dew Point]>><<End>></span></p>
</td>
</tr>
</tbody>
</table>
</Body>
</html>
2 Likes

I found the template!!!
So…now I just have to get the html into it.

So I’ve finally been able to import my table data into the email that gets kicked out…so, small victory there.

Any suggestions as to how to get each row from the table into individual rows in the email?
Here’s what the email looks like that gets sent:

And here is what’s in my email template (for reference):

I did try to use a START: & <>, but honestly that broke the email that got sent.
I checked for carriage returns, as that seems to be a common failure point, but that didn’t seem to be the issue.

Thanks in advance everyone!