Good morning, If anyone has a better idea to handle this issue I would love to hear it!
The use case and goal of this project is for each of my call center sales agents to have their own automated excel workbook that tracks the information they fill out on a form. To accomplish this all sales agents use the same form to answer questions about the sales calls they received. The form responders' email address from the form response is then matched to an excel file by the same name in a specified sharepoint folder and the form responses for that agent are then added to the table within that folder.
The current flow steps I have in place appear to work UNTIL I get to the apply to each where it appears to become "stuck" and never completes the last step but continues processing before I finally cancel it after 30+ minutes.
Because form responses will be coming in continually for approx 25 sales agents with every sales call they receive over an 8 hour period which averages about 100 plus responses a day, process time is a factor.
Side Note on the use of script- we didn't have a better idea to get the form response per agent into their own file without the use of the script. Any better ideas would be appreciated!
The flow steps are as follows:
1. When a new response is submitted
2. Get Response Details: Response ID
3. Get files (properties only)
3. Filter Array: value - Name ( File name of the item in the document library, display name of the item in lists) eg. the name format of the file is the responders' email address.xlsx CONTAINS Responders' Email
4. Apply to each: Body
5. Apply to each 2 : Value - Run script from SharePoint Library
The script is a simple one:
function convertToRow(formData: object😞 (number|string)[]
{ return [
formData["Completion time"],
formData["Email"],
formData["Call Type"],
formData["Customer Phone Number"],
formData["New Customer Outcome"]
]; }
function main(workbook: ExcelScript.Workbook, formData: object) {
workbook.getTable("Table_Name").addRow(-1, convertToRow(formData))}
_____________________________________________________________________________________
DURING PROCESSING:
While it's running it looks like this; passes quickly through until it reaches the Apply to each.
----------------------------------------------------------------------------------------------------THE FLOW STEPS: The last step of the apply to each formData (which is what is used in the script) is a simple JSON with no errors.