cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skillsy
Advocate I
Advocate I

Add attachments from a Form submission to a Planner Task with an incremental ID

Hi,

   I hope you are all safe at this time. I have a support form that logs an issue, username, phone number etc. and allows for multiple files. On submission of the form, I would like to 

  1. Create a planner task with the incremental ID
  2. Update Task details (phone number, issue they are reporting etc)
  3. Add the files to the Task if they exist (do I need to check if there are any first?)
  4. Post a message to a Teams Channel with a link to the Task and the title and submitter of the issue

 

I have found that the "Apply to Each" doesn't show any of the previous values that I need when trying to read the attachments. Any help gratefully received and apologies for the numpty question.

3 ACCEPTED SOLUTIONS

Accepted Solutions

I add the same need

Here is the process I used

 

- Get Response Details

- Create Sharepoint Item in a list

- Analyse JSON

- Apply to each
Get the content of the file
Add an attachments to a sharepoint items
- Get the sharepoint item
- Apply to each
Update Task

I just had to create a list in Sharepoint to handle the documents
the main idea is that the document attached in the form is store in sharepoint to get a shareable link and not a personal onedrive link...

 

 

Here the JSON Format I use

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string"
            },
            "link": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "type": {},
            "size": {
                "type": "integer"
            },
            "referenceId": {
                "type": "string"
            },
            "driveId": {
                "type": "string"
            },
            "status": {
                "type": "integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}

View solution in original post

I already gave my solution 😉

 

  1.  Get Response Details
  2. Create Sharepoint Item in a list
  3. Analyse JSON
  4. Apply to each
    1. Get the content of the file
    2. Add an attachments to a sharepoint items
    3. Get the sharepoint item
    4. Apply to each
    5. Update Task

View solution in original post

Thanks to you all @BenjaminJarry , @efialttes  and @v-bacao-msft  and apologies for the delay due to work.

 

   I did get it working from your assistance apart from when there were no files uploaded so I needed to check if they exist before running this process otherwise it would crash. 

 

   So far we have had 200+ successful submissions and improved our response to COVID requests and saved after-hours staff heaps of effort so a huge thank you to you all. Attached is the section of the flow concerning the files section.

 

 

Overview of file section - showing logic for the form field "Upload your files"Overview of file section - showing logic for the form field "Upload your files"Part one of the conditionalPart one of the conditionalPart two of the conditional -looping through the multiple attachments.Part two of the conditional -looping through the multiple attachments.

 

 

 

 

View solution in original post

7 REPLIES 7
efialttes
Super User III
Super User III

Hi!

Can you share a screenshot from your current flow design? Just to understand the context you are using 'Apply to each'

This post explains how to add attachments to a Planner Task with Power Automate

https://www.alanps1.io/power-platform/flow/flow-create-planner-task-and-include-attachments-from-out...

The scenario covered in the post is based on attachments received via email, the design uses Sharepoint to store them, get a link and store the link in Planner Task. Please note there is a limit in nr of Attached links per Planner Task, max 9.

The way to obtain Planner Task link, explained here:

https://www.aerieconsulting.com/blog/link-to-a-planner-task-in-microsoft-flow

https://tasks.office.com/{tenantenvironment}/en-US/Home/Task/{TaskId}

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



I add the same need

Here is the process I used

 

- Get Response Details

- Create Sharepoint Item in a list

- Analyse JSON

- Apply to each
Get the content of the file
Add an attachments to a sharepoint items
- Get the sharepoint item
- Apply to each
Update Task

I just had to create a list in Sharepoint to handle the documents
the main idea is that the document attached in the form is store in sharepoint to get a shareable link and not a personal onedrive link...

 

 

Here the JSON Format I use

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string"
            },
            "link": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "type": {},
            "size": {
                "type": "integer"
            },
            "referenceId": {
                "type": "string"
            },
            "driveId": {
                "type": "string"
            },
            "status": {
                "type": "integer"
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @skillsy / @BenjaminJarry ,

 

If the form is a group form, please check this similar thread and use the method in it to get the details of the file:

https://powerusers.microsoft.com/t5/Building-Flows/O365-Group-Form-responses-with-attachments-to-Sha...

Please take a try and feel free to let us know if you have any other questions.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@skillsy  @BenjaminJarry 

I know it's an old thread, but... did you finally overcome your challenge?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



I already gave my solution 😉

 

  1.  Get Response Details
  2. Create Sharepoint Item in a list
  3. Analyse JSON
  4. Apply to each
    1. Get the content of the file
    2. Add an attachments to a sharepoint items
    3. Get the sharepoint item
    4. Apply to each
    5. Update Task

View solution in original post

Thanks to you all @BenjaminJarry , @efialttes  and @v-bacao-msft  and apologies for the delay due to work.

 

   I did get it working from your assistance apart from when there were no files uploaded so I needed to check if they exist before running this process otherwise it would crash. 

 

   So far we have had 200+ successful submissions and improved our response to COVID requests and saved after-hours staff heaps of effort so a huge thank you to you all. Attached is the section of the flow concerning the files section.

 

 

Overview of file section - showing logic for the form field "Upload your files"Overview of file section - showing logic for the form field "Upload your files"Part one of the conditionalPart one of the conditionalPart two of the conditional -looping through the multiple attachments.Part two of the conditional -looping through the multiple attachments.

 

 

 

 

View solution in original post

Supersan123
Helper II
Helper II

Hello guys, I have a similar question, but I didn't understand how @skillsy  solved it, in my case I want to grab the form's attachment and play it in the attached field of the planner task but as I understand it I need to play it on a sharepoint list to get his link and put it in the correct task? sorry i haven't mastered the power automate yet but i wanted to do that. Would you know if it is possible for the form attachment to go to an item in the sharepoint and get this link and put it in the task in the planner?my flowmy flow

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (65,592)