Create Dynamic PDFs with Tabular Data using Power Automate

Create Dynamic PDFs with Tabular Data using Power Automate Hello everyone razza here in this video I will show you how to generate documents PDF or word from a template with Dynamic data coming from your data source this will also include tables.

Create Dynamic PDFs with Tabular Data using Power Automate

Within the document so let's check it out in [Music] action our goal is to generate documents word PDF with tabular data coming from.

Our data source a SharePoint list a data ver table I have a list that tracks project information and I have a second list that has task.

Information wherein each task is connected to the project via a look up column experience first step is to create a template in Microsoft.

Word I am signed into word with my M365 account here I'll search for a template related to project report I'll go ahead and pick this one which says project status.

Report and click create I'll keep my template simple I'll go and remove the stop section project summary has the report date project name instead.

Of prepared by I'll change this to project manager since in my SharePoint list I'm tracking who the project manager is status summary I'll change this to.

The project name is currently in project status you can also add formatting project overview I'll rename this to tasks overview task would be the title of the.

Task I'll add status the due date and I have priority I'll go and remove the last column I'll go ahead and remove the remaining.

Sections and at the end I'll say notes so I've got my template ready but I need to insert Dynamic elements into my template and for that I will leverage the developer.

Tab report date I'll select the text date enter plain text go to properties and give it a unique title project name I'll do the [Music].

Same project manager I'll do the same status summary this text I'll make it plain text properties and the project.

Posts Related:

    Status plain

    Text and give it a title now for tasks overview I'm trying to create a repeating table first thing I'll do.

    Is I'll enter some sample textt here like task name this will be the status due date and priority and I'll make each of these Dynamic this is Task.

    Name task status task due date and task priority now the other rows I'll go ahead and delete them.

    And I will go ahead and select the complete first row and go and insert a repeating section content control make sure you go and select this.

    Repeating section go to properties and I will call this my tasks table I'll click okay and for notes added a plain text control and set its property.

    Title that completes my template I'll go ahead and save this to my one drive and I will call this project report.

    Template that's gone ahead and uploaded the file to my one drive power automate I'll head over to create and start and inst in Cloud.

    Flow that triggers for a selected item in a SharePoint list I'll click create this flow I will give it the.

    Name generate project report the flow will trigger for a selected item in my SharePoint site for my projects list I can also take inputs from the.

    User let's go ahead and take an input of

    Type text these would be the notes that I would like to add in my notes.

    Section next step I will use the action get item to get the details of that selected item connect to my SharePoint site connect to my projects list.

    The ID will come from the dynamic Content ID from my Trigger action next I need to get the tasks so I Leverage The Action get items from.

    SharePoint connect to my SharePoint site connect to my tasks list and here I would want to filter the data to only show the tasks where project lookup is filtered to show the.

    Data for the selected project here I'll add a filter query my lookup column has the internal name project lookup I'm going to connect to the title.

    Of the project I'll check to see if this is equal to the title Dynamic content coming from the get item access action this will.

    Have the name of the project I can rename this action to get tasks Next Step I'll search for word we have the word online business connector here I will use the action to.

    Populate a Microsoft Word template the location of this template is in my one drive the document library is one drive and my file was called project report template.

    And I'll put the extension of my file it will try to find that file in the root of my one drive folder which it has found and now it will ask me to go and populate the dynamic.

    Content project manager name status date and again again project name all of this will come from my projects table project manager I'll search for project manager.

    This is a person type column I'll want to show the display name of the project manager project name this will come from the title column get item.

    Action project status status is a choice column so I'll pick status value project date this is the date of the.

    Report so I want to put today's date and time and I would like to format that date as well so I'll use the Expression format date time UTC now which gets me the current.

    Date and time and I would like to format this in month day and your format project name title.

    Tasks is an array I'll just put some sample values like name status date and priority and I will go to switch to input entire.

    Array right after get tasks I'll go and insert an action go to data operation and pick the select data operation from expects an array of data.

    List of items Dynamic content called value coming from the get tasks action I'll select this next we need to define the mapping I'll keep the the mapping consistent.

    With what my tasks table repeating section expects task name I'll enter the value later task status task due.

    Date and task priority now all I have to do is set the values task name will come from the title task status I have a column called task.

    Status I'll pick value due date and priority once again a choice column for tasks table I will clear and go and pick the output of the.

    Select action Dynamic content we have notes this will be the notes input that we added in the Trigger action so this goes and populates the.

    Word template now all we have to do is go ahead and create a file with the document data that this action has generated I'll go and create the file in.

    One drive I'll just save it at the root the name of the file I'll try and make this unique I'll put the title of the.

    Project underscore I'll put the current date and time dot doc X and the file content would be the dynamic content Microsoft Word document.

    Coming from the populat Microsoft Word template action if you want a pdf version of that go and add a new Step once again select the Microsoft.

    Word online business connector we have an option here convert Word document to PDF location one drive Library one drive and the.

    File I'll pick the dynamic content path I'll send it as an email to switch to advanced mode search for user email the Trigger action for a selected item knows which user has triggered the flow.

    So I'll simply send an email to that user subject I'll say project report 4 and put the title of the project in the body I'll say please find attached the report and in.

    Attachments here I'll put the name of the attachment I'll put the project name do PD PDF extension of the file is very important attachment content would be PDF document coming from the convert.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=KVnfWsO1Fhs
Previous Post Next Post