0

I just started creating my first Flow in Power Automate. The goal is to create / update a record in SQL when an entry in a SharePoint online list is created OR modified. Ultimately I want to also delete the record in SQL if its deleted in SharePoint.

I see that the SQL Update, Insert and Delete options are all separate in Flow but I want to create an all in one flow that can do all of those.

I got the Create / Update to work successfully but don't think (pretty sure) that this is not the best method. What I did is start with a condition where I am comparing Created and Modified date in the SharePoint list because in most cases when a new record is created both are equal to each other.

There must be a better way and this still doesn't help me with how to also handle the Delete piece without creating a separate flow for the same list.

Any advise is appreciated. Here is how my flow looks now and so far it worked for updating an existing record and creating new one. Both got reflected in SQL properly

enter image description here

1 Answer 1

0

You could always add a yes/no field for delete. Have the workflow run deletions in the db off of that and then delete the record. You could also hide records that have the deletion box flagged from the default view. Not super elegant but a solution.

If the users don't have deletion rights on the list just edit and create it would make it this solution more sustainable.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.