Need help retrieving MS Form response and insert it into a cell in .xlsx

%3CLINGO-SUB%20id%3D%22lingo-sub-3016606%22%20slang%3D%22en-US%22%3ENeed%20help%20retrieving%20MS%20Form%20response%20and%20insert%20it%20into%20a%20cell%20in%20.xlsx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3016606%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20MS%20Power%20Automate%20Specialists%2C%20Experts%20and%20Gurus%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMay%20I%20trouble%20you%20to%20help%20me%20a%20little%20bit%20with%20this%20question%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20an%20MS%20Form%20to%20get%20a%20text%20response%20and%20then%20I%20would%20like%20to%20insert%20this%20text%20into%20E2%20cell%20and%20send%20me%20an%20email%20with%20this%20excel%20file%20attached.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pjuvish_0-1638245548931.png%22%20style%3D%22width%3A%20697px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F330254iD823CB3D0D952F27%2Fimage-dimensions%2F697x72%3Fv%3Dv2%22%20width%3D%22697%22%20height%3D%2272%22%20role%3D%22button%22%20title%3D%22pjuvish_0-1638245548931.png%22%20alt%3D%22pjuvish_0-1638245548931.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBasically%2C%20I%20can%20just%20create%20new%20.xlsx%20in%20my%20Onedrive%2FSharepoint%20and%20use%20%3CSTRONG%3Ecreate%20a%20table%20%3C%2FSTRONG%3Ethen%20%3CSTRONG%3Eupdate%20row%20%3C%2FSTRONG%3Eactions%20in%20the%20flow%2C%20but%20I%20do%20not%20want%20to%20place%20the%20file%20temporarily%20to%20any%20place%2C%20I%20need%20it%20to%20be%20sent%20to%20my%20email%20directly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20doing%20so%2C%20I%20use%20%3CSTRONG%3ECompose%3C%2FSTRONG%3E%20action%20to%20get%20the%20file%20content%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pjuvish_1-1638246701913.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F330258i3C2D463FA0C9874E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22pjuvish_1-1638246701913.png%22%20alt%3D%22pjuvish_1-1638246701913.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20then%26nbsp%3Buse%20the%26nbsp%3B%3CSTRONG%3ESend%20an%20email%26nbsp%3B%3C%2FSTRONG%3Eaction%20to%20send%20that%20file.%3C%2FP%3E%3CP%3Ebut%20the%20problem%20is%20the%20.xlsx%20created%20and%20attached%20in%20the%20email%20cannot%20be%20open%20due%20to%20a%20file%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20suppose%20there's%20something%20wrong%20with%20the%20file%20content%20in%20the%20%3CSTRONG%3ECompose%3C%2FSTRONG%3E%20action%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%22%24content-type%22%3A%20%22application%2Fvnd.openxmlformats-officedocument.spreadsheetml.sheet%22%2C%0A%20%22%24content%22%3A%20%5B%7B%0A%20%20%22cms_item_id%22%3A%20%22120978%22%2C%0A%20%20%22data_version%22%3A%20%22A%22%2C%0A%20%20%22translated%22%3A%20%22TRUE%22%2C%0A%20%20%22language_id%22%3A%20%226%22%2C%0A%20%20%22data%22%3A%20%22%40%7Boutputs('Get_response_details')%3F%5B'body%2Fr1c6600e386c648b3a04e9bce374cce47'%5D%7D%22%2C%0A%20%20%22record_status%22%3A%20%221%22%2C%0A%20%20%22created_by%22%3A%20%22%22%2C%0A%20%20%22created_when%22%3A%20%22%22%2C%0A%20%20%22last_modified_by%22%3A%20%22%22%2C%0A%20%20%22last_modified_when%22%3A%20%22%22%0A%20%7D%5D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20please%20help%20verify%20and%20suggest%20how%20I%20should%20fix%20the%20code%20to%20make%20this%20flow%20work%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%3C%2FP%3E%3CP%3EPjuvish%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3016606%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EEmail%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EJSON%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hi MS Power Automate Specialists, Experts and Gurus,

 

May I trouble you to help me a little bit with this question?

 

I created an MS Form to get a text response and then I would like to insert this text into E2 cell and send me an email with this excel file attached.

pjuvish_0-1638245548931.png

 

Basically, I can just create new .xlsx in my Onedrive/Sharepoint and use create a table then update row actions in the flow, but I do not want to place the file temporarily to any place, I need it to be sent to my email directly.

 

By doing so, I use Compose action to get the file content 

pjuvish_1-1638246701913.png

 

and then use the Send an email action to send that file.

but the problem is the .xlsx created and attached in the email cannot be open due to a file error.

 

I suppose there's something wrong with the file content in the Compose action

{
	"$content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
	"$content": [{
		"cms_item_id": "120978",
		"data_version": "A",
		"translated": "TRUE",
		"language_id": "6",
		"data": "@{outputs('Get_response_details')?['body/r1c6600e386c648b3a04e9bce374cce47']}",
		"record_status": "1",
		"created_by": "",
		"created_when": "",
		"last_modified_by": "",
		"last_modified_when": ""
	}]
}

 

Could you please help verify and suggest how I should fix the code to make this flow work?

 

Thank you in advance

Pjuvish

0 Replies