Pasting extracted data in the mail body

Please anyone can help me with this problem…My task is i have extracted multiple pdf data using regex know i have to paste all that extracted data into the mail body and i have to attach a pdf files also with that and bot will mail that to user…I have to do this using a single mail id.

@Priyesh_Shetty1

Use read pdf…regex depends on your data…

Now you can use create html content to create your mail body which has options to include the variables you have…

Whoch then can be used in the send email activity…

send outlook mail message activity with isbodyhtml

Cheers

Hi @Priyesh_Shetty1

To achieve this task, you can follow the below steps:

  1. Use the “Read PDF Text” activity to extract the text from the PDF files and store it in a variable.
  2. Use the “Assign” activity to concatenate all the extracted text into a single variable.
  3. Use the “Send Outlook Mail Message” activity to send the email. In the “Body” field of this activity, you can pass the concatenated text variable that you created in step 2.
  4. Use the “Add Attachment” activity to attach the PDF files to the email. You can either use the file path or a byte array of the PDF file as input to this activity.

@Nitya1 But i want to append all the extracted data in mail body and their are multiple pdf extracted data…And only one extracted pdf data is getting pasted in the mail body.

Hi @Priyesh_Shetty1 ,

If possible, can you share the workflow with us for better understanding?.

Regards,

@Priyesh_Shetty1

Did you happen to try the above method…you can change the variable value for each iteration in a loop

Cheers

Did you try to concatenate all the extracted text into a single variable?

@Nitya1


I have done like this in that PDF_txt is the variable in which all the extracted pdf txt is stored.


Only one pdf txt is coming in mail body.
I want multiple pdf appended.

Hi @Priyesh_Shetty1 ,

We are not yet able to look at your whole implementation but I do think that you are not using an appending action for the extracted data if you reading the PDF data in a whole.

Something like the below in an Assign activity :

TotalExtractedData = TotalExtractedData + PDF_txt

Here, TotalExtractedData is a String variable initialised with Empty String and PDF_txt is the Output of Read PDF Text activity.

I believe in your case, you are just using Read PDF Text activity with the output variable as PDF_txt, do note that this would not append the data from the previously read file. It would overwrite the previous data present.

So, in such cases you would need to use two variables, one for getting the extracted data and the other for Storing/Appending the extracted data and then use that variable at the end.

@supermanPunch i tried this but it is pasting only one extracted data in the mail body…i want to append 19 extracted text in the mail body.

@Priyesh_Shetty1 ,

As mentioned we would not be able to give a better suggestion if we are not exposed to your implementation.

Is it possible for your to provide screenshots of your workflow ?

i have used a outlook mail message activity…before outlook activity i have used assign activity and as you said i have done that still it is pasting only extracted data.

@Priyesh_Shetty1 ,

Maybe My Suggestion was not clear and it was directing you to somewhere else.

The assumption is that you have Multiple PDF to process and extract data, which I assume again that you would be using a For Each activity to do so, Now The suggestion from above is to place the assign Expression within the For Each activity, so that storing of the extracted data from the output of Read PDF Text activity is done each time and stored into TotalExtractedData.

This way TotalExtractedData at the end would contain all the extracted data from all the PDF’s.

But, from your recent reply, we do not see the For Each or Looping itself mentioned :

In PDF_Readdt all extracted text is stored…Know the main task is to send the mail to the user and i have to paste all the extracted text in mail body and i have to append it and in that mail i have to attach multiple pdf’s file into it and i have to send the mail to user…Note that i do not want to send multiple mail i have to do all this task in one mail only.

@supermanPunch

@Priyesh_Shetty1 ,

Could you try placing/moving the Assign Expression in the above image into the First Image Section - Extracting the PDF's? After the Write Line activity and check ?