Email the results of a database query

No we don’t have any improvements in that area.

But as we were recently extending the server connect data formatters we did brainstorm about the idea to have a query data to HTML table formatter.

Such formatter we produce a simple HTML table with all the data specified, so you can use it directly in a mail body.

Maybe this will help?

Then @patrick can implement it

12 Likes

That would be great @George @patrick and something I am sure a lot of Wapplers would welcome.

Thank you

1 Like

I too would be looking for this, as this is a blocker for my current project. In my case, I’m probably going to resort to a dynamic php page to be included in the body of the email, to meet strict formatting requirements.

1 Like

I followed the @Hyperbytes method.
So we are creating a daily email of records that will go to subscribers.
Everything is working as it should but the email is showing code.

API Overview

Code for the repeat (assuming I haven’t escaped something correctly after the dynamic variable.

Any help is appreciated. Also, btw, repeating tables are so doable if you do it this way.

Let’s start with the obvious, you are sending as HTML?

It does look like there is a problem with the html tags, all the ‘/’ characters seem to be escaped I.e

"\/"

Probably the cause of the problem.
So tags like

 </p>  

are transformed into non html

 <\/p>

Yes sending as html.

What can i look at to solve it?

Also /n tags will.probably need to be replaced with

<br> 

tags using replace()

can you click the data picker icon here:

Screenshot 2024-03-29 at 14.48.51

And in the dialog that appears, select Code and make a screenshot of how your code looks there?

@Teodor

And code view since I check for any “wackiness”

Can you double-check your Send Mail to see if you’re sending as HTML?

Yes. I have checked this part a few times just to make sure :slight_smile:

Use sendgrid.com (there is a free tier) and handlebars will process the array for you and output exactly as you wish. You can design very nice emails and sendgrid deals with the data merging and sending. They’ve also got a webhook API that allows you to track delivery and open events

2 Likes