cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bfg
Regular Visitor

Build PDFs from Excel - issue with "List Rows Present in a table" action

Hi there,

 

My overall goal looks like this: I want to be able to generate PDF forms with data from an export from a CRM advanced find. Our CRM is not currently configured to allow us to just connect our CRM data right to PowerAutomate.

 

My thinking is the steps should look something like this:

  • Run flow when Excel file is uploaded to specific library
  • Iterate through each row of the Excel file
  • Match columns to fields in a PDF form per row*
  • Save the PDF form to destination*

* Planning on using Encodian, a third party connector, for this.

The issue I am running into is that it appears that the "List Rows Present in a table" action cannot accept dynamic content for choosing the excel file. I am worried about copying data into a centralized excel file because this is a process multiple people can run, and I don't want anything to get missed.

 

Anyone have any tips on how to generate a form for each row of an Excel file?

4 REPLIES 4
Mira_Ghaly
Dual Super User II
Dual Super User II

Hi @bfg 

 

what do you mean by :

Hi @bfg 


What do you mean by the below:

Our CRM is not currently configured to allow us to just connect our CRM data right to Power Automate.

You do not need to configure CRM to connect to Power Automate.. You need to create a solution and create a new flow using CDS(Current Environment Connector) and use the List Rows action to get the rows you want to generate the PDF from.

 

Please check my blog post on generating word templates:

https://wordpress.com/post/onlinemgblog.wordpress.com/88

 

Hope this gives you an idea!

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Serbay
Resolver I
Resolver I

Hi, You may use dynamic content to list rows in a table when a new excel file created in a library. Here is an example to give you some idea.

Serbay_0-1612710233858.png
To get file metadata please select "x-ms-file-path-encoded" from dynamic content,
To get tables select "Id" (the unique id of the file) from dynamic content,
Finally while using Listing rows in a table action, select "Id" (the unique id of the file) and "Id" (Table id) for table selection. 
Regards,
Serbay


 



bfg
Regular Visitor

Hi @Mira_Ghaly, appreciate your response.

 


What do you mean by the below:

Our CRM is not currently configured to allow us to just connect our CRM data right to Power Automate.

I was providing that information as background, in case a reader wondered why I didn't just use a trigger from Dynamics 365 instead of having this "export advanced find"/"upload to SharePoint" workflow. We're in an on-premises environment and my ability to access certain things is limited.

 

@Serbay, thank you for this example. This is so helpful. After putting it together, I am realizing I now do not have a way to access the headings or individual rows of the spreadsheet. That is, I want to assemble a JSON object for each iteration that should map something like 

 

{ "Heading 1" : [value],

"Heading 2" : [value 2]}

 

and so on, because that is the format that the plugin I am using expects so that it can put the excel data into the individual PDF forms. In the examples I've looked at, where someone is using a single excel sheet, they can just select those values from Dynamic Content, but I don't have them here since the spreadsheet can be different every time. Any tips?

Serbay
Resolver I
Resolver I

Hi,
Currently, We have a limited amount of excel actions in Power automate. If your table columns have dynamic names then I would suggest you try building an office script since the excel file will be on the web.


Here is information about office script,


https://docs.microsoft.com/en-us/office/dev/scripts/develop/power-automate-integration
https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel


Regards,
Serbay


Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,864)