web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Manually trigger a flo...
Power Automate
Unanswered

Manually trigger a flow when new record is added

(0) ShareShare
ReportReport
Posted on by

 

1)Start From the Manually trigger flow  then Get Rows of sql Table (student). And also get MySql table last row id.

 

2)Then Get Items of sharepoint list table( student) . And also get the last row id of the list.

 

3)then compare row Sql table id with sharepoint list id if it is equal then do nothing. if  Sql table id >(is greater than) sharepoint list id  then no of rows to add .

 

4)then have to do a loop for each and get the values of the list from the table for id and write those values to the sharepoint list


Please help. Thanks in advance.

Categories:
I have the same question (0)
  • Rodrigo Hentz Profile Picture
    on at

    Hi @Anonymous how are you?

     

    @Anonymous I think you can start looking for templates here https://preview.flow.microsoft.com/en-us/templates/ to check if any of them can be used to start your flow.

     

    For specific needs I suggest do check the documentation for each one of those connectors listed by you on your requirements.

     

    For SharePoint https://docs.microsoft.com/en-us/connectors/sharepointonline/

    For SQl Server https://docs.microsoft.com/en-us/connectors/sql/

    For conditions https://docs.microsoft.com/en-us/power-automate/add-condition

     

    You also can check this post about manually trigger a flow and get the rows on SQL https://powerusers.microsoft.com/t5/General-Power-Automate/Get-single-row-from-SQL-Server/td-p/116363

     

    Also this one to get items from SharePoint list item https://powerusers.microsoft.com/t5/General-Power-Automate/Get-Specific-Item-from-a-SharePoint-List-based-on-Value-in/td-p/288906

     

    If you have a specific problem or a how to question regarding some action, please create a new topic for this specific question.

     

    Please let me know if those references helped on your question.

     

    Regards.

     

    Rodrigo Hentz

    Microsoft Support Engineer

     

  • Community Power Platform Member Profile Picture
    on at

    I have created the flow and It doesn't take the last row ID's of SQL and sharepoint list. And in filter array the body is not support the specific function of comparing.

     

    i will share my screenshot here for your reference and do the changes of my need that i mentioned below. keep correcting my flows of what i did wrong 

     

    Needs:

    1)Get sql table and  get table last row id

    2)get sharepoint list item and get last row id 

    3)compare row table id with sharepoint list id if it is equal then do nothing. if table id >(is greater than) sharepoint list id then no of rows to add

    4)then have to do a loop for each and get the values of the list from the table  and write the values to the sharepoint list scope: when a new user is added to the table then run the flow to add the new users to the sharepoint list.

     

    Please do needful.

    myflow.png

     

     

  • Rodrigo Hentz Profile Picture
    on at

    Hi @Anonymous thanks for the update and details shared.

     

    I think you can use this sample to add on your flow.

     

    First, to get the last item on table I used the options to filter and order by the id attribute. on this sample only the recod with id 4 will be returned.

     

    2020-07-02-001.jpg

     

    In SharePoint you do not have the option to inform the same ID for the ID default attribute. So you need to reate your own identification attribute. Like my sample and how to get the last one in Power Automate:

     

    2020-07-02-002.jpg

     

    So the first block of the Flow will be:

     

    2020-07-02-003.jpg

     

    After that I added a condition to check if the SharePoint is empty, if yes, create the item on the list. If not, I compare the id from table and the identification of the record on SharePoint. If different , create the item on SharePoint

     

    2020-07-02-004.jpg

     

    Let me know if this helped on your question.

     

    Regards.

     

    Rodrigo Hentz

    Microsoft Support Engineer

  • Community Power Platform Member Profile Picture
    on at

    yes, Its very useful for me.

     

    But in my case  i dont have ID for table. So i need to figure out how to get the number of rows in the table and compare to the number of rows in the sharepoint list, if different then do something. But SQL  takes Full count upto maximum 512 only. i need only last row to compare. From this how could i take the last row Number. Is this possible?

     

    So instead of taking ID's i have recreate the flow to take count of the rows in table with Sharepoint list. I am Doing right? Whether this flow works out.

     

    flow1.png

     

  • Rodrigo Hentz Profile Picture
    on at

    Hi @Anonymous how are you?

     

    To get the total rows from table and also from SharePoint list you can use a expression after get all records like this:

     

    2020-07-03-001.jpg

     

    Please let me know if I can help you in something else. If this answered your question, please, mark this topic as answered.

     

    Regards.

     

    Rodrigo Hentz

    Microsoft Support Engineer.

  • Community Power Platform Member Profile Picture
    on at

    Hai, 

    Hope you are fine. Your last post helped me lot. Thanks for that.

     

    1)Now i have a new flow by counting number of rows in SQL and SharePoint list.

    2)Then need to check the SQL Row values is equal to Sharepoint list. If value count is Equal dont do anything.

    3)If Value count of SQL Table is greater than Sharepoint list Count means need to add = (SQL Table - Sharepoint List) those items by  do a loop for each and get the values of the list from the table to sharepoint list from SQL Table.

     

    Check my flow. Whether it work out for my points mentioned above. please do help.

    flow2.png

     

     

  • Rodrigo Hentz Profile Picture
    on at

    Hi @Anonymous I'm fine thanks.

     

    I think you can now add a foreach to the SharePoint list and create the ones that you need. 

     

    Please check this item that shows the foreach and the create item https://powerusers.microsoft.com/t5/Building-Flows/foreach-loop-through-a-list-and-move-each-item-to-another-list/td-p/377267 

     

    Regards

     

    Rodrigo Hentz

    Microsoft Support Engineer

  • Community Power Platform Member Profile Picture
    on at

    I already have an Foreach to get the items from SQL to Sharepoint list 

    for.png

  • Rodrigo Hentz Profile Picture
    on at

    Hi  @Anonymous , thanks for the response.

    I do not understand your doubt now. Are you having issues with those actions?

    Maybe a support ticket is a better path to address and help you to end this workflow.

    If so, please open a service request at https://preview.flow.microsoft.com/en-us/support/ at 'Ask for Help' - 'Contact Suport'

    That way we can contact you and do a remote session if needed.

     

    Regards.

    Rodrigo Hentz

    Microsoft Support Engineer

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard