Synchronizing Status Between Planner and SharePoint List (Power Automate) – Update a Task Failing with BadRequest

Guilherme Thiago Gellert 20 Pontos de reputação
2025-11-14T16:26:47+00:00

Context

I have a Microsoft Teams environment created for a client, where our engineering disciplines (Electrical, Instrumentation, etc.) collaborate internally.

Inside this Team, I use:

A SharePoint list called “Registros de Ajustes” (Adjustments Register) — this is our main tracking system.

A Planner plan called “Planner Rio Verde” used by the team to manage tasks.

A Microsoft Forms form that users fill out when they need to register a new adjustment.

I already have working flows in Power Automate:

When a new Forms response is submitted, the flow:

Creates an item in the SharePoint list.

  Creates a corresponding task in Planner.
```This part is working fine.

---
## **Goal**

I want the **Status** from my SharePoint list to be synchronized with the **Progress** status in Planner.

Meaning:

### ✔ When someone updates the **Status** column in the SharePoint list

→ The corresponding Planner task must update automatically.

### ✔ When someone updates the **Progress / percentComplete** in Planner

→ The SharePoint list item should update its **Status** column accordingly.

Users may update the status from either system (SharePoint or Planner), and both must stay synchronized automatically.

---
## **Lists involved**

### 1) Main SharePoint List – `Registros de Ajustes`

Relevant fields:

`Title`

`Status` – Choice

   Not Started
   
```sql
  In Progress

  
     Completed

     
     `IDtarefaPlanner` – Single line of text → Stores the ID of the Planner task created by Flow #1.
```### 2) Auxiliary List – `VínculosPlanner` (Links between SharePoint and Planner)

I created this list to help maintain a stable, explicit link between SharePoint items and Planner tasks.

Fields:

`IDRegistro` – Number → The SharePoint item ID from the main list

`IDPlanner` – Text → The Planner task ID

`UltStatusPlanner` – Text

`UltStatusSharePoint` – Text

This list is meant to avoid unreliable matching or comparing across multiple loops.

---
# ⭐ **FLOW 1 – Forms → SharePoint → Planner → VínculosPlanner**

*(Working correctly)*

**Trigger:** When a new response is submitted → Get response details

### Actions:

**Create item** in SharePoint list `Registros de Ajustes`.

**Create a task** in Planner.

**Update item** → set field `IDtarefaPlanner` with:

```ruby
outputs('Create_a_task')?['body/id']

Create item in VínculosPlanner storing:

IDRegistro = SharePoint item ID

  `IDPlanner` = `outputs('Create_a_task')?['body/id']`

  
     `UltStatusPlanner` = “Not Started”

     
        `UltStatusSharePoint` = “Not Started”
```### Diagram (Flow 1)


```sql
Forms → Get response
  → Create item (SharePoint)
  → Create task (Planner)
  → Update item (save Planner ID)
  → Create item in VínculosPlanner

⭐ FLOW 2 – SharePoint → Planner (synchronizing status)

(This is where the errors occur)

Trigger: When an item is created or modified (SharePoint)

Step 1 — Condition to ensure the item has a Planner task ID

Since the new interface does not show Advanced Mode, I configured the condition like this:

Left side (Expression):

empty(triggerOutputs()?['body/IDtarefaPlanner'])

Operator: is equal to

Right side: false

This ensures the flow only continues if the field IDtarefaPlanner is NOT empty.

Step 2 — Convert SharePoint Status → Planner Progress

Compose:

if(
  equals(triggerOutputs()?['body/Status'], 'Não Iniciado'),
  'notStarted',
  if(
    equals(triggerOutputs()?['body/Status'], 'Em Andamento'),
    'inProgress',
    'completed'
  )
)

Step 3 — Update Planner task

Action: Update a task

Task Id:

triggerOutputs()?['body/IDtarefaPlanner']

Progress:

outputs('Compose')

Step 4 — Update VínculosPlanner

Get items with ODATA:

IDRegistro eq @{triggerOutputs()?['body/ID']}

Update the returned item with:

UltStatusPlanner = Progress value

  `UltStatusSharePoint` = SharePoint Status
```---
## ❗ **Current Problem in Flow 2**

Even after correctly sending the Planner task ID, I receive errors like:

`The resolved string values for the following parameters are invalid, they may not be null or empty: 'id'`

`BadRequest. Falha ao executar o fluxo.` (BadRequest. Flow failed.)

Sometimes Planner rejects the “Progress” field even when it seems valid.

I need guidance about:

Whether `Update a task` requires additional fields

Whether Bucket or Plan ID must be provided again

Whether something about the Planner connector changed recently

If using “notStarted / inProgress / completed” is correct in my environment

---
# ⭐ **FLOW 3 – Planner → SharePoint (sync back)**

*(Partially working / partially problematic)*

**Trigger:** Recurrence (every 1 minute)

### Steps:

List Planner tasks

Get items from `VínculosPlanner`

For each Planner task:

   Filter VínculosPlanner where `IDPlanner == task.id`
   
```haskell
  If a match is found:

  
        Map percentComplete → SharePoint Status

        
              Get the corresponding SharePoint record (`Registros de Ajustes`)

              
                    Update the Status field

                    
                          Update the VínculosPlanner entry
```### Key expressions used:

**Filter array**


```sql
@equals(
    string(item()?['IDPlanner']),
    string(items('Apply_to_each')?['id'])
)

Condition

@greater(length(body('Filter_array')), 0)

❗ Problems seen in Flow 3

Before introducing the auxiliary table, multiple SharePoint items were being updated incorrectly because both loops (tasks + SharePoint items) were intersecting.

Even with the links table, sometimes Filter array returns an empty array and the update step throws:

id may not be null or empty

I am unsure whether this is the best architecture or if there is a more robust approach.


⭐ What I need help with

Best practice for bidirectional synchronization between:

SharePoint Choice column (Not Started / In Progress / Completed)

  Planner Progress (notStarted / inProgress / completed)

  
  Proper way to avoid:

  
     Null task IDs

     
        BadRequest errors

        
           Incorrect matching of items

           
              Loop conflicts

              
                 Recurrence performance bottlenecks

                 
                 Whether using a **lookup table (VínculosPlanner)** is the recommended strategy or if Planner supports a more direct lookup approach.

                 
                 If there are known limitations or bugs with the **Planner "Update a task"** connector.
```---
# 📝 I can provide screenshots of all actions (Create task, Update task, Filter Array, Conditions, etc.) if needed.

This functionality is important for our internal workflow, as multiple disciplines rely on these status updates for decision-making.

---
If you wish, I can also prepare the version **with screenshots placeholders** for the Power Automate forum.

Let me know and I’ll format it for you.Claro, Guilherme — aqui está o **texto completo traduzido para inglês**, pronto para você postar na comunidade da Microsoft Power Automate.

 Mantive o conteúdo claro, profissional e técnico, para que engenheiros, MVPs e especialistas entendam exatamente o contexto.

---
# ⭐ **English Version – Ready to Post**

## **Title suggestion:**

**Synchronizing Status Between Planner and SharePoint List (Power Automate) – Update a Task Failing with BadRequest / Null ID**

---
## **Context**

I have a Microsoft Teams environment created for a client, where our engineering disciplines (Electrical, Instrumentation, etc.) collaborate internally.

Inside this Team, I use:

A **SharePoint list** called **“Registros de Ajustes”** (Adjustments Register) — this is our main tracking system.

A **Planner plan** called **“Planner Rio Verde”** used by the team to manage tasks.

A **Microsoft Forms** form that users fill out when they need to register a new adjustment.

I already have working flows in Power Automate:

When a new Forms response is submitted, the flow:

   Creates an item in the SharePoint list.
   
```yaml
  Creates a corresponding task in Planner.
```This part is working fine.

---
## **Goal**

I want the **Status** from my SharePoint list to be synchronized with the **Progress** status in Planner.

Meaning:

### ✔ When someone updates the **Status** column in the SharePoint list

→ The corresponding Planner task must update automatically.

### ✔ When someone updates the **Progress / percentComplete** in Planner

→ The SharePoint list item should update its **Status** column accordingly.

Users may update the status from either system (SharePoint or Planner), and both must stay synchronized automatically.

---
## **Lists involved**

### 1) Main SharePoint List – `Registros de Ajustes`

Relevant fields:

`Title`

`Status` – Choice

   Not Started
   
```sql
  In Progress

  
     Completed

     
     `IDtarefaPlanner` – Single line of text  
      → Stores the ID of the Planner task created by Flow #1.
```### 2) Auxiliary List – `VínculosPlanner` (Links between SharePoint and Planner)

I created this list to help maintain a stable, explicit link between SharePoint items and Planner tasks.

Fields:

`IDRegistro` – Number  
 → The SharePoint item ID from the main list

`IDPlanner` – Text  
 → The Planner task ID

`UltStatusPlanner` – Text

`UltStatusSharePoint` – Text

This list is meant to avoid unreliable matching or comparing across multiple loops.

---
# ⭐ **FLOW 1 – Forms → SharePoint → Planner → VínculosPlanner**

*(Working correctly)*

**Trigger:**  
 When a new response is submitted → Get response details

### Actions:

**Create item** in SharePoint list `Registros de Ajustes`.

**Create a task** in Planner.

**Update item** → set field `IDtarefaPlanner` with:

```ruby
outputs('Create_a_task')?['body/id']

Create item in VínculosPlanner storing:

IDRegistro = SharePoint item ID

  `IDPlanner` = `outputs('Create_a_task')?['body/id']`

  
     `UltStatusPlanner` = “Not Started”

     
        `UltStatusSharePoint` = “Not Started”
```### Diagram (Flow 1)


```sql
Forms → Get response
  → Create item (SharePoint)
  → Create task (Planner)
  → Update item (save Planner ID)
  → Create item in VínculosPlanner
Microsoft 365 e Office | Desenvolvimento | API JavaScript do Office
0 comentários Sem comentários

Resposta aceita pelo autor da pergunta
Anônima
2025-11-15T03:17:03.6633333+00:00

Hi @Guilherme Thiago Gellert

Thank you for posting your question in the Microsoft Q&A forum. 

Please note that this is the pt-br forum. We kindly recommend posting your question in Portuguese so that more community members can assist you. We sincerely appreciate your understanding. 

Since this forum currently lacks a dedicated tag for Power Platform, you might find more targeted support by posting in the Microsoft Power Platform Community Forum Thread. It’s a great space full of helpful, knowledgeable people who are more than willing to walk you through the steps and share their experience. You’ll likely get clearer guidance and the support you need to make this work.  

Based on your description, you already have Flow 1 working which creates SharePoint items and Planner tasks while saving the link in VínculosPlanner. Now you want two-way synchronization between SharePoint Status and Planner Progress (percentComplete), so updates in either system are reflected automatically. 

Based on my research, here’s one possible approach: 

Flow 2: SharePoint to Planner 

Trigger: When an item is created or modified on Registros de Ajustes. 

Actions:  

1.Get item from VínculosPlanner  

-Filter VínculosPlanner where IDRegistro = SharePoint item ID.  

-Output: Planner task ID (IDPlanner) 

2.Check if status actually changed  

Compare current Status with UltStatusSharePoint from VínculosPlanner. Only proceed if different to avoid loops. 

3.Map Planner percentComplete to SharePoint

{
  "Not Started": 0,
  "In Progress": 50,
  "Completed": 100
}

4.Update task in Planner  

-Use Update a task action.  

-Set percentComplete to mapped value.  

-If IDPlanner is null, skip update. 

5.Update VínculosPlanner  

-UltStatusSharePoint to current SharePoint Status  

-UltStatusPlanner to the derived Planner status (Not Started/In Progress/Completed). 

Flow 3: Planner to SharePoint 

Planner’s connector does not expose a task updated trigger.  

Choose one of these options:  

-When a task is completed, update SharePoint Status to Completed. 

-Recurrence (polling): List tasks, compare percentComplete with UltStatusPlanner, and update SharePoint when different. 

When you have two-way sync, you must prevent loops. Example: SharePoint triggers Planner update, which triggers SharePoint update, etc. 
I hope this information is helpful.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

Esta resposta foi útil?

1 pessoa achou esta resposta útil.

1 resposta adicional

Classificar por: Mais útil
  1. Guilherme Thiago Gellert 20 Pontos de reputação
    2025-11-19T09:58:18.0266667+00:00

    Hi @Anonymous

    Thank you for the response, it was very helpful, I managed to apply it as you suggested, my team decided on a more logical approach now and everything worked out, thanks again!

    Esta resposta foi útil?


Sua resposta

As respostas podem ser marcadas como ‘Aceitas’ pelo autor da pergunta e ‘Recomendadas’ pelos moderadores, o que ajuda os usuários a saber a resposta que resolveu o problema do autor.