# Worflow to send disable accounts report in an attachment file to a service account email

**URL:** <https://developer.sailpoint.com/discuss/t/worflow-to-send-disable-accounts-report-in-an-attachment-file-to-a-service-account-email/79261>\
**Category:** SHF Discussion and Questions\
**Tags:** email-templates, workflows, identity-security-cloud, search\
**Created:** [September 4, 2024, 11:03am UTC](https://developer.sailpoint.com/discuss/t/worflow-to-send-disable-accounts-report-in-an-attachment-file-to-a-service-account-email/79261 "2024-09-04T11:03:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreaQueiroz50](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@AndreaQueiroz50](https://developer.sailpoint.com/discuss/u/AndreaQueiroz50)\
**Post date:** [September 4, 2024, 11:03am UTC](https://developer.sailpoint.com/discuss/t/worflow-to-send-disable-accounts-report-in-an-attachment-file-to-a-service-account-email/79261/1 "2024-09-04T11:03:31Z")

</div>

Hi Community,  
I have a use case in which I need to send a daily report with the disabled accounts in the current day, in an email. This is the search query:

@accountRequests(source.name:xyz AND op:disable) AND modified:[now-1d TO now]

This report should be sent to a service account.  
E.g. application.support-team@domain

And I need a csv file attached in the email body. I can´t use in the email a link to open the IdentityNow because IDN doesn´t handle service accounts as email recipient.

Has anyone ever needed to do something similar?  
Thanks a lot, Andrea.

---

<div class="post-metadata">

**Author:** ![Anshu\_Kunal](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/anshu_kunal/32/14680_2.png) [@Anshu\_Kunal](https://developer.sailpoint.com/discuss/u/Anshu_Kunal)\
**Post date:** [September 4, 2024, 5:52pm UTC](https://developer.sailpoint.com/discuss/t/worflow-to-send-disable-accounts-report-in-an-attachment-file-to-a-service-account-email/79261/2 "2024-09-04T17:52:47Z")

</div>

> [@AndreaQueiroz50](#):
>
> This report should be sent to a service account.  
> E.g. application.support-team@domain

You can create an identity (dummy) using a flat file source and add above email to this identity.

> [@AndreaQueiroz50](#):
>
> And I need a csv file attached in the email body.

Don’t think CVS attachment is possible currently, you can try schedule search which can send report to above email in below sample format.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/e/0/e0489ce2db516f8c563e73bf002842e97a7058e7.png)

Alternatively you can also try sending report via workflow using schedule search trigger [Triggers - SailPoint Identity Services](https://documentation.sailpoint.com/saas/help/workflows/workflow-triggers.html#scheduled-trigger)

Thanks

---

<div class="post-metadata">

**Author:** ![gourab](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gourab/32/18650_2.png) [@gourab](https://developer.sailpoint.com/discuss/u/gourab)\
**Post date:** [September 6, 2024, 1:03pm UTC](https://developer.sailpoint.com/discuss/t/worflow-to-send-disable-accounts-report-in-an-attachment-file-to-a-service-account-email/79261/3 "2024-09-06T13:03:09Z")

</div>

Hi @AndreaQueiroz50 ,  
I also agree with @Anshu_Kunal 's solution, However, as I recall, ISC provides a download link for the CSV file rather than attaching it. To address this, you can utilize PowerShell or another SDK to generate a custom report format and embed the csv within the email . This method also offers the flexibility to send the report to service account emails. It is necessary to schedule the script to execute daily at a specified time. Hope this helps

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [November 5, 2024, 1:03pm UTC](https://developer.sailpoint.com/discuss/t/worflow-to-send-disable-accounts-report-in-an-attachment-file-to-a-service-account-email/79261/4 "2024-11-05T13:03:49Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
