Dear All
Finally I got it working!
My requirement - I have two lists one with employee details and other with resumes of the employees. I wanted to send few records from the employee details list as an email and while sending those records, I wanted to attach the resumes of those selected employees picking the correct resumes from the employees list.
Here is the solution
I have created two collections one with employee details to be send out and the other with the corresponding resumes of the selected employees. Then I have created another collection with only the resumes with the following command
ClearCollect(count,0);ClearCollect(resumeAttachments,Filter(Ungroup(ForAll(Sequence(CountRows(resumeCol)),Collect(count,Last(count).Value+1);{AAA:Last(FirstN(resumeCol,Last(count).Value)).Attachments,BBB:Last(FirstN(resumeCol,Value)).ID}),"AAA"),!IsBlank(Id)));
Following this post Solved: Re: Save Sharepoint List Attachments in a collecti... - Power Platform Community (microsoft.com)
And for sending email with attachments used the below formula
Set(_emailRecipientString, Concat(MyPeople, Mail & ";"));
Office365Outlook.SendEmailV2(_emailRecipientString, TextEmailSubject1.Text, emailBody.HtmlText,
{Attachments:ForAll(resumeAttachments,{ContentBytes:Value,Name:DisplayName})});
Thanks