# Create Triggered Reporting in App

**URL:** <https://community.thunkable.com/t/create-triggered-reporting-in-app/117406>\
**Category:** Questions about Thunkable X\
**Created:** [June 23, 2019, 9:51am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406 "2019-06-23T09:51:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [June 23, 2019, 9:51am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/1 "2019-06-23T09:51:23Z")

</div>

Hi All,

Does anybody know if it is possible to create reports through Thunkable. I store data in firebase, I would like the user to be able to press a button in the app and it creates a csv/pdf file of the data aligned with their User ID and sends that to their email address? Happy to use other software or an API to do it if anybody knows of any?

Thanks!

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [June 23, 2019, 10:06am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/2 "2019-06-23T10:06:00Z")

</div>

Hi Jacob,

The csv format is very simple. You can create it yourself.

First, get all data from Firebase and then combine them into a string using the “,” symbol and send it by email using the Share block. If you wish, you can separate the data fields with a tab, and the lines with a newline.

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [June 23, 2019, 10:09am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/3 "2019-06-23T10:09:16Z")

</div>

Hi Actech - Would this not just send the data in the body of the email? Or would it create the csv file and attach?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [June 23, 2019, 10:13am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/4 "2019-06-23T10:13:20Z")

</div>

I am talking about a method without using a web server. In this case, it will be possible to send the data in the body of the letter as a message.

If you need a file, then you need a web-server. The data is sent to it, it creates the file and send a letter as an attachment.

CSV format:

name1,address1,age1,note1  
name2,address2,age2,note2

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [November 27, 2019, 10:36am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/5 "2019-11-27T10:36:04Z")

</div>

Still searching for a good alternative here,

Does anyone have any experience with Firebase Cloud Functions or an API that could convert JSON to CSV… my end goal is to pull information from firebase then send an email to the users address with a CSV or PDF attachment of their reporting when they click “Generate” in the app

Any ideas?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 27, 2019, 1:13pm UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/6 "2019-11-27T13:13:32Z")

</div>

Will the JSON structure change or does it have the same structure?

Do you have an example of a JSON structure so that it can be viewed?

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [November 27, 2019, 11:04pm UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/7 "2019-11-27T23:04:37Z")

</div>

Hi Alex,

Yes the JSON structure will remain the same, example below:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa17eda0ee698ec2641f1580c905c8b75b3ffc36.png)

The only variable part bar the child node values is the time stamp parent node i.e 2019112105

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 28, 2019, 8:37am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/8 "2019-11-28T08:37:57Z")

</div>

Check it

[https://x.thunkable.com/projects/5ddf7ba73cc8a1e17c06046c/project/properties/designer/](https://x.thunkable.com/projects/5ddf7ba73cc8a1e17c06046c/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [November 28, 2019, 8:54am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/9 "2019-11-28T08:54:23Z")

</div>

Thanks Alex - but I need it to create the CSV file and then send to the user… any thoughts?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 28, 2019, 8:59am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/10 "2019-11-28T08:59:52Z")

</div>

Thunkable X does not support file saving, but you can send CSV data via email or messenger.

If you need a file, you need to look for an API service that allows you to transfer text to it, and it will make them an file and send it by mail, or write a server script for this yourself.

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [November 29, 2019, 11:56am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/11 "2019-11-29T11:56:09Z")

</div>

Thanks Alex,

If anyone is further interested in this, I have figured out a way to do this as below:

1 - Pull the JSON data back from Firebase  
2 - Turn that data into HTML using blocks  
3 - Use [restpack.io](http://restpack.io) API to convert this HTML to PDF  
4 - Use sendgrids API to send this link to the user

Works quite well, Sendgrid is has free use for 100 emails a day, and [restpack.io](http://restpack.io) is a about $9 usd a month but is seemless.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/create-triggered-reporting-in-app/117406/12 "2024-11-08T11:46:31Z")

</div>


