
Announcements
Hi all,
I am a newbie to power automate and have been trying create a PDF which the data from a MS form response but having difficulty having the data show up.
So far what occurs is the PDF will create with no file name. When you open up the PDF it just has the form titles like this.
Can someone guide me to the following:
1. Have the file name appear
2. Have the form inputted data on the PDF?
Thanks in advance.
Check the below steps and let me know if this works for you.
1)Start by setting up a trigger for your Microsoft Form using "When a new response is submitted".
2)Retrieve the details of the form response using the "Get response details" action. This action helps to retrieve the individual answers submitted by the respondent.
triggerOutputs()?['body/resourceData/responseId]
3)Build HTML content on compose action to structure your PDF document. Utilize HTML tags to format the text and layout according to your preferences. Incorporate dynamic content from the form response to populate the HTML template.
outputs('Design_html_template')
4)Implement a 'Create File' action to generate a temporary html file with the customized html content on the previous action.
5)Then utilize the 'Convert File using path' action to convert PDF.
outputs('Create_file')?['body/Path']
6)Now add 'Create File' action and provide the File content from the before step and also add the Filename with extension.
outputs('Create_file')?['body/NameNoExt']
body('Convert_file_using_path')
6)As a final step, include a 'Delete File' action to remove the html file since it is changed as a pdf.
outputs('Create_file')?['body/Id']
If this solution proves helpful and resolves your issue, kindly consider marking it as accepted. Doing so will aid others who encounter similar challenges in the future.
Regards,
Santhosh Balakrishnan
Apps4.Pro - Trusted Office365 T2T Migration partner. Migrate Exchange, SharePoint, Microsoft Teams, Stream, Yammer, Power Platform between tenants.
Product Specialist - http://www.apps4.pro/