Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Get Contacts (Office 365 Outlook) -> Insert Row (SQL Server), flow autogenerating loops

End Goal:  Have new contacts that are created in outlook added to a table in SQL Server.


Flow: Scheduler -> Get Contacts (Office 365 Outlook) -> Insert Row (SQL Server).


I am running into the issue of Flow autogenerating loops in the Insert Row function for certain variables (Business Phone, Email Address, and Home Phone are examples). I’m assuming this is happening because the Get Contacts function groups all instances of these variables together. In outlook, you will have Email, Email 2, Email 3, Business, Business 2, Home, Home 2. With Get Contacts, you will only see arrays called Email Addresses Items, Business Phones Items, and Home Phones Items. When I try to map these to the columns in my SQL Server table, flow autogenerates a loop.


There are two main issues with this:

·         If I were to run this flow with a contact that doesn’t have a value in one of the loops, the contact won’t be inserted into the table. (ex. If flow generates a loop for email address and a contact doesn’t have an email associated with it, it will not get inserted into the table)

·         The other big issue is that if there are, for example two business phone numbers, two rows will be generated, one for each of the two business phone numbers. I only want one row per contact.


My ideal solution would be to have these arrays split into new variables, similar to what they are in outlook contacts to begin with. For example, I’d want to have multiple variables for Business Phone: BusinessPhone, BusinessPhone2 and have the ability to match these new variables to the correct columns in my SQL Server table.


Is this possible? Are there any other solutions to get around this?



**I've tried other tools similar to Flow and they all have separate variables for the above rather than grouped arrays. It seems Flow is the only one to do it this way.

Community Support
Community Support

Re: Get Contacts (Office 365 Outlook) -> Insert Row (SQL Server), flow autogenerating loops



Thanks for feedback.


The issue could be reproduced by me.


Action Get contacts will return dynamic contents called Email Address Items, Business Phones Items, Home Phone Items, while we need separate variables for each property.


I will help report this issue and back to you later.


Best regards,



Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,858)