"Module singature" and "from" for email Signature?

I'm creating Resources to send emails either via SMTP or via Retools new email resource.
I have two challenges:

  1. I can insert HMTL into the body. But I'd like to abstract away the signature so that I only need to update in one place if needed. Modules would be ideal, but I need to add it to the App and cannot find a way to reference it inside the Resource query GUI builder. Any best approach for this?

  2. On the email Resource builder GUI there is "from e-mail" but not "from" as name string, to specify the name of the sender. Is this possible?

Hello, the module can only be added to app editor,
image

The Resource Library itself have similar function as template.

When you write some variable inside {{ }}, the variable will appear in right panel.

before you can refer this Resource in app editor,
you must make it public by click sharing


In app editor you can assign the value to variable of sender_name and receiver_name

I think you retool email directly in app editor right?

If you don't use Resource Library you don't experient the advance it come with.
You should first create a query in Resource library, and set the query to retool email, and refer this query in app editor.

Just try it. There are some many awesome function to dig in. :grinning:

here is entry of Resource Library

here is office docs

Hi AnsonHwang. Thank you for reaching out again.

I agree the Query Library is something I should explore as it allows to abstract away lots of cool stuff to be used in several apps.
But in this case I do not believe your proposal would solve my issues, because it would include the "sender" info on the e-mail body and not here:

As you can see the "name of the sender" is being parsed from the e-mail address, which is not ideal, because "team" means nothing to the receiver.

Regarding 1) I would need to insert the signature in the body of the "shared query", but as I create different e-mail templates (shared queries) I would need to update each one manually as the signature changes, right?

Here is how far I've gone:

It seems there is no variable in the query output for "sender name"

The question is, how can I change the "team" "sender name" in the image bellow?

you can save them in global js variable( or use function to return it) in setting, and in different app's query use different signature. or you can encode these signatures and save it to database.

I notice this first time. I will research it and give your feedback

1 Like

Continuing on this topic,
When setting up a SMTP mail we can have the "to" field to be a comma ", " separated list to send bulk emails(e.g. "asd@asd.com, gts@asd.com"). If one wants to insert in the body something like "Hi John", where john is retrieved from the database where a row has matching "email", how could one could achieve this?

I tried the following but got "undefined" where {{to_name}} is a query variable, to which I'm trying to pass the following from the App itself, where sendEmailSMTPTable is the imported resource query:

{{getRows.data.name[getRows.data.email.indexOf(sendEmailSMTPTable.toEmail)]}}

But being a newbie of course I got this wrong, mostly because maybe one needs a loop to achieve what I want?

Hello, it seem to you master Resource Library well. What error is disppear, when do it appear?

No error is actually displayed. The email displays "undefined" where the name should appear :wink:

You shouldn't refer sendEmailSMTPTable in sendEmailSMTPTable query,

just change it to

{{getRows.data.name[getRows.data.email.indexOf(emailListTextArea.value)]}}

And try again.