I have a client that is using a form we created in Survey123 but they need to have the data sent to an FTP site in a csv form to be uploaded in an overall system that keeps track of other sensor and reporting data. I want to use Power Automate to create a new csv file everytime a new report is submitted and then send that out to the FTP site. First issue I am finding is 365 only makes normal .xlsx files and not .csv but there might be a converter I can use. The other i wanted to figure out was how to create a new individual file from possibly a template everytime the report is submitted. Below is what I am thinking so far but when i run the flow without the FTP a new file is created but no data from Survey123 has populated the form. I think another module to add data to excel is needed but it needs to reference an already made excel file which defeats the purpose of what I am looking for.
Solved! Go to Solution.
You can make a CSV in Power Automate. While I am unfamiliar with your set-up, you appear to be missing a few steps in Power Automate. Is your data stored in a repeat?
Here is a super quick and dirty way to create a CSV from a repeat in S123:
EDIT: Since it isn't apparently obvious for the Apply to each, what you do is create your "Append to array variable" step. Then, as soon as you reference anything in a S123 repeat, it automatically adds the "Apply to Each" step for you. Also, my column names there (testColum1 and testColumn2) are arbitrary and you can replace with anything you want. And finally, the column contents are simply two fields I chose at random from a repeat.
This is the result:
No worries! The above steps are actually quite flexible that way.
Just create the "Append to Array Variable", add your desired references, and Power Automate simply won't add the "Apply to Each" step (if it does, that means you have a repeat/array).
As you said, you don't have a repeat in your survey so you should not need an Apply to Each.
You flow will look like this:
When working with surveys in Power Automate, you typically do not need to add Apply to Each steps. As soon as you select a field that requires an Apply to Each, Power Automate automatically adds the Apply to Each step for you. If you selected a field and Power Automate added the Apply to Each for you automatically, then we have a different scenario on our hands (and I'd recommend you upload your XLSX so I could see what fields you are working with).
I figured out i needed to select "submittedRecord" from the list of Survey123 outputs for it to grab the correct data. I have it all set up now and it creates a new CSV file saved into my Onedrive account. If anyone wants to see for future reference below is my automation process.
You can make a CSV in Power Automate. While I am unfamiliar with your set-up, you appear to be missing a few steps in Power Automate. Is your data stored in a repeat?
Here is a super quick and dirty way to create a CSV from a repeat in S123:
EDIT: Since it isn't apparently obvious for the Apply to each, what you do is create your "Append to array variable" step. Then, as soon as you reference anything in a S123 repeat, it automatically adds the "Apply to Each" step for you. Also, my column names there (testColum1 and testColumn2) are arbitrary and you can replace with anything you want. And finally, the column contents are simply two fields I chose at random from a repeat.
This is the result:
I do not have a repeat in my survey. Each form submission creates an individual record so not sure if that would work for my situation. I want each submitted record to be turned into its own CSV file and then sent to the FTP site.
No worries! The above steps are actually quite flexible that way.
Just create the "Append to Array Variable", add your desired references, and Power Automate simply won't add the "Apply to Each" step (if it does, that means you have a repeat/array).
Do you know what field i should select in the Apply to Each portion? I get the following error so far with what i have selected to grab from Survey123
As you said, you don't have a repeat in your survey so you should not need an Apply to Each.
You flow will look like this:
When working with surveys in Power Automate, you typically do not need to add Apply to Each steps. As soon as you select a field that requires an Apply to Each, Power Automate automatically adds the Apply to Each step for you. If you selected a field and Power Automate added the Apply to Each for you automatically, then we have a different scenario on our hands (and I'd recommend you upload your XLSX so I could see what fields you are working with).
I figured out i needed to select "submittedRecord" from the list of Survey123 outputs for it to grab the correct data. I have it all set up now and it creates a new CSV file saved into my Onedrive account. If anyone wants to see for future reference below is my automation process.