cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to attach the uploaded files of sap BPA to email

ayechan
Participant
0 Likes
2,308

Hi all,

In sap build process automation workflow, I used DMS to upload files.

Also, I used email notification for user alert.

And, I would like to attach the uploaded file from BPA workflow to email that can be able to download the files from users.

Is it possible to do so?

If yes, how can I develop that kind of setting?

Best Regards,

Aye Chan

 

Accepted Solutions (0)

Answers (4)

Answers (4)

Sankara1
Product and Topic Expert
Product and Topic Expert
0 Likes

To attach uploaded files from SAP Build Process Automation to an email, you can follow these best practices and steps:

Best Practices for Sending Multiple Attachments

  • Send Multiple Attachments in an Email: You can send multiple attachments in an email using SAP Build Process Automation. This workflow example demonstrates how to send multiple attachments in an email 

Steps to Configure Attachment Destination

  1. Navigate to your SAP BTP subaccount.
  2. Choose Connectivity > Destinations and then New Destination.
  3. Enter the following details:
    • Name: sap_process_automation_document_store (This is the required name. Please don't use another one.)
    • Type: HTTP
    • URL: {cmis}/browser/<repository-id> (Make sure that the URL points to a repository without /root/. Otherwise, you'll run into a 405 error.)
    • Proxy Type: Internet
    • Authentication: OAuth2ClientCredentials (For more information, see OAuth Client Credentials Authentication.)
    • Client ID: <client ID>
    • Client Secret: <client secret>
    • Token Service URL: <uaa-url>/oauth/token
    • Token Service URL Type: Dedicated
  4. Choose Save.
    • The attachment destination is now available in your SAP BTP subaccount.
  5. Check that the service has been configured correctly by creating or opening an existing form in the process editor and looking for the File element. For more information, see File Upload in Form Input Fields 
rohit_singhal
Active Contributor
0 Likes

Hi @ayechan ,

If you are able to access the file in your process, then there are two ways, that I can think of to send the file through email:

1. Create an automation in the same project as your process workflow and call the automation as a notification step in between your process workflow. Within the automation, pass the dms file id and the dms destination. Using the dms destination and file id, create a copy of the file in the local system. Then use Outlook SDK to send the file to intended recipients.

2. You can create an automation in a different project, and then using API calls, access the specific instance of the workflow and extract DMS file id. Follow similar steps as mentioned in step 1.

Do let me know in case you wish for more information.

Best Regards,

Rohit

ayechan
Participant
0 Likes

Hi @rohit_singhal;,

Thanks for the explanation.

And do you have any practice blog for the two ways you mentioned?

 

ayechan
Participant
0 Likes

Hi @rohit_singhal,

Using the approach of creating automation you mentioned will need to cost extra fee for attendant or unattendant mode of desktop agent?

rohit_singhal
Active Contributor
0 Likes
Hi @ayechan, It would depend on the current payment model that you have with SAP.
manish_09
Explorer
0 Likes

Hi @ayechan ,

You can check following automation from BPA store

Invoice Processing with Document Management Service

manish_09_0-1743741956687.png

They have given sample automation for downloading the file from DMS, you can modify it as per your requirement and use it.

or 

There are also DMS activities available in automation that you can use.

https://help.sap.com/doc/77f2293985d7420aabecc0c8d0647e46/Cloud/en-US/modules/dms.html#select

manish_09_1-1743742663636.png

You can also check following blog for more info. -- A Comprehensive Guide to Downloading Files in SAP Build Process Automation and Utilizing BTP DMS in SAP Build Process Automation automations and forms 

Before all this you need to create DMS destination in BTP subaccount, you can refer following link -- DMS destination

After downloading the file from the DMS to your server, you can attach it to an Outlook email using the 'Send Email' activity. Alternatively, you can use Python to send the email via SMTP.

 

 

ayechan
Participant
0 Likes

Hi @manish_09,

Thanks for sharing details information.

I will check them.

Thank You.

manish_09
Explorer
0 Likes

You can't upload files directly to the email notification in the process flow. for such kind of thing you will need to create separate automation.

ayechan
Participant
0 Likes

Hi @manish_09,

could you please guide me how can I create separate automation in BPA to be able to attach the uploaded file of BPA workflow to Email?

ayechan
Participant
0 Likes

Hi @rohit_singhal,

yes, the uploaded file is able to access and download in the BPA process flow.

But I am not sure how can I attach that uploaded file to Email.

Do you have any idea on it?