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

How to send an email with attachment using outlook sdk in sap BPA.

Ashunitrox
Explorer
1,426

I have a requirement where we are Rendering a PDF form, we are getting the result from this action. now when we are trying to send the email with file content as attachment getting error file not found.

I am not sure how we have to send the file content as attachment as without attachment the automation is working without error.

 

#SAP #BTP #BPA

Accepted Solutions (1)

Accepted Solutions (1)

arroyoweisson
Participant
0 Likes

Hello @Ashunitrox , 

I hope I can answer your question.  I am assuming you wanted to handle the base64 to pdf and send it as an attachment using Outlook.

So to do this, you have to save first the base64 content as an "actual file" before you can use it as an attachment.

 First: (I have to create a base64 content, to replicate that I have a b64 data)

arroyoweisson_0-1734599854673.png

(Save the Base64 file as a PDF File)

arroyoweisson_1-1734599933300.png

Once you save the file, you can use it now as an attachment to Outlook:  Add Open Outlook Instance -> add Send Email (Outlook). At the parameter tab, at the bottom there is "Attachments". Add the fullFilePath of your PDF.

arroyoweisson_2-1734600041279.png

Add "Close Outlook Instance" activity. 

I hope this helps. I

 

Ashunitrox
Explorer
0 Likes
Hi @arroyoweisson thank you for the solution it worked, only issue was that this solution required outlook to be installed on the system. hence opted for the Micro soft graph API mail send .
arroyoweisson
Participant
0 Likes

Hi @Ashunitrox ,

 

Glad that the initial solution works for you, and even better that you found a better approach.

Great stuff! Happy automating 🙂

Answers (0)