Hello,
I am struggling to figure out what I am doing wrong and looking for help. I am trying to design a flow that does this:
CSV file is dropped in SP -> Email exists in a column -> Automated email is sent to each email in the new file.
This seems very easy to me on the surface but for some reason I have hit a snag. Below are the steps I have and the configurations in each.
1. SP: When a file is created in a folder: I have the site address and folder ID identified
2. Initialize Variable: Name - Stored CSV, Type - String, Value - File Content from SP
3. Get File Content - Not sure where to point this file identifier, currently pointed at a static file
4. Compose Rows: split(outputs('Get_file_content')?['body'], '\n')
5. Compose Header: first(outputs('Compose Rows'))
6. Split Header (Compose): split(outputs('Compose Header'), ',')
7. Initialize Variable: Named 'emailColumnIndex', Type - Integer
8.Apply to Each (outputs)
- Condition
- True
- Set Variable: 'emailColumnIndex', Value - indexOf(item())
- Split Row (compose): split(items('Apply_to_each_row'), ','
- Extract Email: items('Split Row')?[variables('emailColumnIndex')
- Outlook: Send an email: To @(variables(::EmailColumnindex""))
Any help is appreciated! I am still learning the ropes so I probably did something dumb.