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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Set Predecessors in Pr...
Power Automate
Answered

Set Predecessors in Project Online Tasks

(0) ShareShare
ReportReport
Posted on by 13

Hello,

 

We have an integration though Power Automate to create pojects and tasks inside Project Online. We've managed to create the tasks with parents and correctly ordered, but we can't find out how to define the predecessors.

 

Our sharepoint schema is as follows (/_api/ProjectServer/Projects('@{triggerBody()?['project_id']}')/draft/tasks/Add()):

{"parameters": {
"Name": "@{triggerBody()?['Name']}",
"Start": "@{triggerBody()?['Start']}",
"Duration": "@{triggerBody()?['Duration']}",
"ParentId": "@{triggerBody()?['ParentId']}",
"AddAfterId": "@{triggerBody()?['AddAfterId']}"
}}

 

Is it possible to add predecessors as well?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,872 Most Valuable Professional on at

    Hi @oscardias,


    You should be able to use the draft/tasklinks/add method for that.

     

    Below is an example where I create a dependency between two task of type Finish to Start (FS):

    https://docs.microsoft.com/en-us/previous-versions/office/project-class/jj232950(v=office.15)

     

    {
     "parameters":
     {
     "DependencyType": "1", 
     "StartId": "@{variables('PredecessorTask')}", 
     "EndId": "@{variables('SuccessorTask')}"
     }
     }

     

    tasklinks.png

  • oscardias Profile Picture
    13 on at

    Thank you very much! Haven't implemented it yet, but that's exactly what I needed.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello!

     

    how would it work for external dependencies (i.e. tasks with predecessors in other project files on the same PWA site)?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 875

#2
Valantis Profile Picture

Valantis 817

#3
Haque Profile Picture

Haque 481

Last 30 days Overall leaderboard