cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CLG
Level: Powered On

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?

flow1.PNGflow2.PNG

 

**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.

1 REPLY 1
Community Support Team
Community Support Team

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

HI @CLG ,

 

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,

Mabel

 

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

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 345 members 5,051 guests
Please welcome our newest community members: