Showing results for 
Search instead for 
Did you mean: 

Extract email attachments and send data to SuccessFactors

0 Kudos

Hi All,

I need to extract an Excel file from an email as an attachment and convert it to JSON, then dynamically set the data and send it to SuccessFactors. I can do it manually via Message Body in Content Modifier, but I need to dynamically set data directly from Excel step like this. My manual example is here:

How to insert data dynamically? Can I write Groovy script in Content Modifier Message Body? (I'm new to SAP BTP field) i made like example in below, but it doesn't seem to be working.


Accepted Solutions (1)

Accepted Solutions (1)

Product and Topic Expert
Product and Topic Expert

Hi khaledkalo,

On a Cloud Integration Flow you cannot run a script on Content Modifier.

The message flow would be something like the following:

inbox as sender --> extract attachment --> check attachment type is excel --> use a groovy script to process the excel file --> generate results in JSON or XML -> map the fields with Content Modifier --> Send the Message to a receiver system.

There are some useful scripts here that you could adapt to your needs:

1. You can convert the attachment data from CSV to XML and then use XPATH to map the data. Or you could add the expected result as an OpenAPI yaml file and import it to make mapping as drag and drop.


2. You could use some helper classes that allows you to extract the data directly from XLS format using:

Best regards,

Answers (0)