MykeeLee
Canvas Initiate

Export a list to excel and send as attachment in email notification

Hello, 
I'm using Nintex for SharePoint 2016 to create a workflow to automatically send an email weekly to a group of people if certain field are set to something.

 
Here's what I my flow looks like, 

    If Certified is equal to 'No' AND Owner is blank

    Export the list to excel

    Attach the excel to the email notification, send it to the managers

I need help on exporting the list and attaching it to the email. Can some please help. It will be greatly appreciated. Thanks in advance. 

0 Kudos
Reply
4 Replies
kchaluvadi
Workflow Veteran

Re: Export a list to excel and send as attachment in email notification

Nintex does not provide an option to export the list to excel, instead, use a PowerShell script that performs this job, and automate this script running using a schdule task.

0 Kudos
Reply
MykeeLee
Canvas Initiate

Re: Export a list to excel and send as attachment in email notification

Thank you.
0 Kudos
Reply
kunalpatel
Automation Master
Automation Master

Re: Export a list to excel and send as attachment in email notification

@MykeeLee try below approach:

 

  1. Query your list to get all the data you need and store them in a collection. Also get the ID column.
  2. Now using for loop, ID collection and Index variable (for each ID):
    1. Using collection operations for each collection and using index variable get the value 
    2. using build string build action and each values from each collection create the CSV string and each row
  3. Using Web Request and above string, create the CSV file and store it in a document library.
  4. Create a workflow to send email notification when new document gets created and make sure you attach the document in the email notification too.
0 Kudos
Reply
MykeeLee
Canvas Initiate

Re: Export a list to excel and send as attachment in email notification

Thank you for all your help and responses. We've decide to create a view in SharePoint and include a link to the view vs. exporting into excel.

0 Kudos
Reply