Exporting email title and content to Excel

Created by akaBot Support, Modified on Fri, 6 Sep, 2024 at 2:50 PM by akaBot Support

Question: How do I export the email subject and body into an Excel file? What's the simplest way to do it using akaBot?


Answer: Here are the basic steps:


1. Declare a Table: Create a table with two columns: "Subject" and "Body". Use the BuildDataTable activity for this step.


2. Retrieve Emails: Use the GetMailMessages activity to retrieve your emails. The output will be stored in a variable, such as mailDatas.


3. Loop through Emails: Use the ForEach activity to iterate through the mailDatas variable. Inside the loop, use the AddDataRow activity to add rows to your table. You can extract the subject and body of each email using .Subject and .Body, and then add them to the respective columns of your table.


4. Write to Excel: Finally, write the data from the table into an Excel file using the WriteRange activity.


This is the simplest way to export email information to Excel using akaBot.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article