cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Re: Convert Word Docx to PDF

Thank you both @gamoraes @rebeccas I was able to progress my Flow to continue through the stages but I now get a bad request at convert file - could this be something internal that is affecting this? 

Super User
Super User

Re: Convert Word Docx to PDF

@Basic_User007 

 

You can remove that 'Get file metadata' ...you shouldn't need that. 

 

For your 'Convert file' your 'File' should be "Id" selected from the dynamic conent of your 'Create file' (OneDrive)

 

and then for the 'Create file' (SharePoint) the file name and file content should be selected from the 'Convert file' of your dynamic content.

 

It should work fine.

Super User
Super User

Re: Convert Word Docx to PDF

Capture.JPG

Super User
Super User

Re: Convert Word Docx to PDF

Verify if in 'Create File' you are putting the extension .docx

 

If isn't put and Convert File will work.


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


StephCORKING
Level: Powered On

Re: Convert Word Docx to PDF

This worked perfectly for me - much better than the template from MS Flow, which works the first time and then failed everytime on the convert part.

The only problem I have now is that I want to attach the file to another list and it doesn't work, even though I'm giving it the ID for the list and also update the list item with other data).  it says that the record cannot be found....

Super User
Super User

Re: Convert Word Docx to PDF

@StephCORKING 

 

Your doing 'Get Item' and then 'Add attachment' and it isn't working?

StephCORKING
Level: Powered On

Re: Convert Word Docx to PDF

Hi @rebeccas 


Yes I am but the difference with my flow and your flow is that I want to attach the file to a different list - but I do have the right ID for the target list!  Do I need to do get item again from the list where I want to put the attachment?

Super User
Super User

Re: Convert Word Docx to PDF

@StephCORKING 

 

I think you will need to do a 'Get Item' in there before the 'Add Attachment' portion unless you are already using that in another spot in your Flow...you don't need it twice. 

 

How are you getting the 'ID' that you said you already have...where is it coming from?

 

I sometimes carry through the ID from PowerApps into Flow and then I use Compose to set it as a variable in my Flow. I have used that before on my 'Get Item' so I can use it instead of the 'Get Items'..I have not tried it with the 'Add attachment' but in theory it should work the same. 

 

 

 

StephCORKING
Level: Powered On

Re: Convert Word Docx to PDF

I carry the ID through to the subequest list (basically, the first list is where the user makes the request and the second list deals with approvals and other processes before completing).  The attach file process doesn't seem to like the ID but it works fine when I update the initial request with other stuff.


The other problem that I just noticed is that when I create the Word document without first creating a file in a sharepoint library,  the date fields are not accepted.   So I think I need to create the word document from the library rather than from the list...  I want to kill myself!

Super User
Super User

Re: Convert Word Docx to PDF

@StephCORKING 

 

Also, keep in mind that ID is not a text field..it is a value so for example if you are storing the ID from one list in a column on another list that is set to a singleline text you have then made it a text field. To refer back it in Flow you will have to use Compose to convert it back to a value.

 

On most of mine I carry the ID directly from PowerApps into Flow so it is still the correct format so I don't have to do that often...but I did run into that issue once. I use the int() to convert it back to a number or "value".

StephCORKING
Level: Powered On

Re: Convert Word Docx to PDF

@rebeccas 

It's stored as a number and it works fine for updating the list, it's only when I try to add the attachment.

 

I'll keep playing about with it.

 

Thanks for you help, I really appreciate it 🙂

 

Steph

Super User
Super User

Re: Convert Word Docx to PDF

@StephCORKING 

 

How are you updating the list without using 'Get item'?

 

You should need to do that compose and convert that ID and then you probably won't need the extra 'Get Item' in there. 

 

Mine does two steps:

 

1) Compose - Select the field that stores the ID number from the Dynamic content

 

2) Compose - Expression - int(outputs('Compose1'))

 

So..step one is getting that ID and step 2 and converting it. Your 'ID' you will refer to on the Add Attachment will be the output of the second Compose.

 

I'm not sure about that second part what the issue could be...I use this a lot and never do anything with with SP Library for it...keep playing around with it.

Highlighted
StephCORKING
Level: Powered On

Re: Convert Word Docx to PDF

Hi @rebeccas 

Finally managed to get it work without going through onedrive.   Wine is a wonderful help sometimes!

 

Cap1.JPG

Cap2.JPG

This seemed to do the trick.

PowerAppsUser2
Level: Powered On

Re: Convert Word Docx to PDF

Hi All,

 

I am using CDS connector to get data from flow and populating that in MS word template. I am saving this to onedrive. And then i am using this connector to convert created word document to PDF, the pdf is generating but with the logical names not with the data from CRM.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,428)