This flow automates the creation of structured tasks in Microsoft Planner based on form input. This repository contains a generic example. No real data, systems, or environments are represented.
- A user submits a Microsoft Form
- The flow retrieves the response
- The data is formatted into a structured text block
- A Planner task is created using the formatted data
- When a new response is submitted (Forms)
- Get response details (Forms)
- Compose (description logic)
- Create a task (Planner)
- Update task details (Planner)
The task description is generated using a single Compose action with a custom expression.
The Planner connector in Power Automate does not handle line breaks like standard text or HTML. Instead of using multiple conditions or Compose steps, this approach:
- Produces consistent formatting
- Avoids unnecessary empty lines
- Reduces flow complexity
- Works reliably with Planner and Teams
trim(concat(
if(
empty(trim(outputs('Get_response_details')?['body/<A_FIELD_ID>'])),
'',
concat(
'A:',
decodeUriComponent('%0A'),
outputs('Get_response_details')?['body/<A_FIELD_ID>'],
decodeUriComponent('%0A%0A')
)
),
if(
empty(trim(outputs('Get_response_details')?['body/<B_FIELD_ID>'])),
'',
concat(
'B:',
decodeUriComponent('%0A'),
outputs('Get_response_details')?['body/<B_FIELD_ID>'],
decodeUriComponent('%0A%0A')
)
),
if(
empty(trim(outputs('Get_response_details')?['body/<C_FIELD_ID>'])),
'',
concat(
'C:',
decodeUriComponent('%0A'),
outputs('Get_response_details')?['body/<C_FIELD_ID>'],
decodeUriComponent('%0A%0A')
)
)
))
Add a modified version of the code above as an expression in the inputs-field of the compose block:
- Add label
- Add line break (%0A)
- Add value
- Add spacing (%0A%0A)
- Skip it completely
This is an example of what the form response might contain:
A: {value for A}
B: {value for B}
c: {value for C}
This is how the generated Planner description will look:
A:
{value for A}
B:
{value for B}
Field C is skipped because it is empty.
- Replace <FIELD_ID> with your own Form field IDs
- Add or remove sections as needed
- Modify labels to fit your use case