168
Views
15
Comments
Solved
Automatic Export to Excel
Question

Hello All,

i have one entity which i want to export every night. Is there is any job to create or ready to use?

I want automatically a job to download or send me through email every night.

2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Here is an example.

Three steps:

  1. Timer calls SendEmail Action.
  2. SendEmail calls Email Page and specifies the To, From, etc.
  3. Email page on Preparation gets data, creates Excel and attaches excel to file.


SendExcelByEmail.oml
2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi George,

You can create timer process in Outsystems for such jobs which needs to be scheduled.

please find the below link for reference.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Timers/Create_and_Run_Timers 


Regards,

Manish Jawla

2026-02-26 06-29-24
Rahul
 
MVP

Hi George,

As Manish said i provided some code for that.

1. Create a Timer and set as Daily Scheduled 

2. Create a action for send email like below image

3. in email1 provide attachment and Provide value send email and body and subject

and set Mime-Type="application/vnd.ms-excel"


Hope this will help you.

Regards

Rahul Sahu

UserImage.jpg
George M

Thanks for your reply.

Clarify the point 3.


Let me know what actions needed to be done by me.

2023-09-28 14-21-55
Daryna Kravets

Hi George,

Add input parameter to your Email1 and set its data type to binary. And give this parameter to AttachFile1 as File Content. 

And value of this parameter is the output of RecordListToExcel.

UserImage.jpg
George M

Thanks for your reply

Somewhere is my mistake :(



Can you advise me?

2023-09-28 14-21-55
Daryna Kravets

Set data type to binary here:

UserImage.jpg
George M

I have already set it.



Can you advise me what to fill to the below field?

2023-09-28 14-21-55
Daryna Kravets

Oh, my mistake. You can't make binary email's input.

So let make it simpler.

Move aggregate and RecordListToExcel to Email1's Preparation before AttachFile. And RecordListToExcel's output will be AttachFile's File Content.

UserImage.jpg
George M

So, the BinaryData is needed? Or can i delete it?

2020-03-29 19-08-33
Diana Milheiro

Hi George,


It is not possible to pass binaries as input in an email, you will have to make a query to obtain the binary. I advise you to input the binary id and then make the query to get the binary after that just fill in the attachment fields with the query result.


Regards

2023-09-28 14-21-55
Daryna Kravets

You can delete it.

2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Here is an example.

Three steps:

  1. Timer calls SendEmail Action.
  2. SendEmail calls Email Page and specifies the To, From, etc.
  3. Email page on Preparation gets data, creates Excel and attaches excel to file.


SendExcelByEmail.oml
UserImage.jpg
George M

Thank you All for your replies!

I have configure the additional details (i delete the password to the below screen for security reasons)

Is there something else to configure? 

I run immediately through Service Center (Factory -- > Module--> Run Now ) in order to test the fuctionality but no email received yet.

2016-04-22 00-29-45
Nuno Reis
 
MVP

You can go to Service Center > Monitoring > emails and see if it was sent.

Have you configured email sending?

UserImage.jpg
George M

Yes i have. Also, i see that already sent

I check my spam/junk email folder and my inbox but nothing received yet.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.