Create an email query with data from google sheet added through your appsmith cite

If I add columns to multiple google sheets attached to my appsmith and then want the new added info to be put into an email, how would I do this?

Hey @productsTPI, can you explain what you mean by:

Do you want to use the data you created on Google Sheets in Appsmith to send Emails?

Yes. On Appsmith I have input boxes that are filled out and added to the google sheet, I would like this new data to be put in an email.

You can do this on Appsmith by creating a workflow. To send emails you can use the native SMTP plugin or by creating webhooks from n8n or Zapier to send Emails.

Here’s a video:

Thank you but how do I get information from the google sheet into the email, I understand how to create the email just not how to get that specific information. The information is added to one sheet and also bulk added to a different sheet in the same google sheet.

You can get the data from Google Sheets using the Fetch Detail operation on our native GSheets integration. More docs here.

After you fetch the data, you can bind it on a Table widget on Appsmith. If you want to share information from the table via Email, you can access it via {{ }} / {{ TableName.selectedRow }} properties.

That shows up in the email in a very hard to read format, also the selected Row is automatically the top row and does not give me the right information, how would I get the info from the bulk added rows at the bottom of the google sheet?
Thank you for the assistance.

You can customize the application using JavaScript.

For example, in the below screenshot, we use the selectedRow property to access the selected item on the table on a RichTextEditor widget.

You can use the data from the rich text editor (RichTextEditor1.text) to view content and send emails.

If you want to access the data from the last row, you can use the slice operation: {{Table1.tableData.slice(-1)}}

Can I do this with list data instead of table data?
Thank you

Also if I am getting the data from multiple bulk rows how do I select getting the data from the multiple rows not just the one? They are product orders and a different number of products is added every time the app is used so different amounts of rows are added to the google sheet. How would I get my email to grab the information from the new products imputted if they are a different amount everytime?

This can be possible with the List widget, instead of Table1.selectedRow property, you can use List1.selectedItem property.

The table widget has Enable multi-row selection property, you can enable it to access selected multiple rows at a time.

You can save the data in a local store using the storeValue function and access that information in an email if you want to use specific data.

Ok thank you. How would you suggest if I want to pull multiple rows of data from one sheet that have a certain ID that matches an ID from the other sheet. Shown below.

this is the sheet with the number ID highlighted, I want all info from rows with that same ID on the next sheet,

How would you suggest being able to grab this info with matching IDs in a way I could put in an email to easily read out all the multiple rows of data?
thank you

Hey @productsTPI, I see you’re trying to combine data from two queries based on a particular ID.

If the columns are the same in the two sheets, then you could use two map functions and filter them out with the ID to combine them; you can refer to this post here:

If the columns are different, you’ll need to filter them individually and bring them to your email.

Hope this helps.