Retrieve uploaded file content in an iPaaS flow.

How can the content of an uploaded file be read and set as the value for a property in an iPaaS flow?

Tags iPaaS
Asked by Gregory Baboolal on Mon 7/24/23 5:27 PM
Sign In to leave feedback or contribute an answer

Answers (2)

This answer has been marked as the accepted answer
Mark Sayers Wed 7/26/23 9:07 AM

Hi Greg,

We believe what you'll want to do is actually set the input data model and test it with attachment data.

  1. Create or open a flow that you want to run when the form is submitted
  2. On the left nav menu, go to Triggers
  3. Check the "on a form submission" button, then click Add to add a new form trigger
  4. Choose the form which you want to trigger the flow, then click Save Changes
  5. Click Yes at the pop-up to set the input data model.
  6. On the left nav menu, go to Design
  7. In the top right corner, click Test to flip into Test mode
  8. At the top of the flow, on the green "start" step, hover over the test tube icon and click the icon which looks like a piece of paper. This will launch the form in a new popup window.
  9. Fill out and submit the form. Make sure to include multiple attachments, as per the test case. Submitting the form will close the popup window and put you back on the flow
  10. The input data will appear in the right side, in the "Test Results" window.

Once you have that data, you will see what the structure looks like and you can set this as the input data model:

  1. Copy the data from the Test Results window
  2. On the left nav menu, go to Triggers
  3. On the right side, click Sample Data
  4. Erase everything in the sample data window
  5. Paste the data you copied from the Test Results area in here
  6. On the left nav, click Design

Now back in the flow, you should see the input data (via the data picker) set to the same as the flow, including the array of attachments.

I will send you a recording of this too so you can see it visually.

Sincerely,
Mark Sayers
Sr Support Consultant, CS

1 of 1 users found this helpful.
Hi Mark,

Thanks for the detailed info. I'm able to get that far. The array of attachments only contains information about the file name, extension, and size. However, there is no information about the temporary file path of the uploaded file, or even the content of the file assigned to a property of the data model? Can you provide documentation or a video on how to upload a file using a Dynamic Form and then in the submission flow retrieve the uploaded file content, i.e., which flow control or connector should be used, and set the file content as the value of a varied, e.g., a shared application variable?

{
"test_file": [
"value 2",
"value 1"
],
"test_file_Info": [
{
"Name": "value 2",
"Extension": "value 2",
"Size": 78
},
{
"Name": "value 2",
"Extension": "value 1",
"Size": 96
}
],
"_Result": "value 2",
"_LastChangedField": "value 1",
"_ExtraConditionData": "value 2"
}
- Gregory Baboolal Wed 7/26/23 10:30 AM
Thank you Mark, and Carrie! I'm now able to retrieve the attachment content by referencing the attachment file array, e.g., test_file[1], previously it was just returning the file identifier instead of its content, e.g., "@file:105-1095744-3925-1-1-1"

{
"test_file": [
"@file:105-1095744-3925-1-1-1"
],
"test_file_Info": [
{
"Name": "test.json",
"Extension": ".json",
"Size": 123893
}
],
"_Result": "SubmitBtn"
}
- Gregory Baboolal Wed 7/26/23 12:25 PM

Mark Sayers Tue 7/25/23 9:45 AM

Hello Gregory,

Can you provide a little more context on this question?

Where would the files have been uploaded to, and from where? Would they be uploaded to iPaaS via a "get file" step?

Getting the file from where? Where are you trying to put it?

Sincerely,
Mark Sayers
Sr Support Consultant, CS

No feedback
The iPaaS 2.5.1 release notes says that attachments submitted via Dynamic Forms are now presented as an array to make moving those files in an iPaaS flow significantly easier.

https://solutions.teamdynamix.com/TDClient/1965/Portal/KB/ArticleDet?ID=152942

How can this be done in a flow and is it possible to just read the contents of the temporary file into a variable?

Is it possible to define a similar input data model for a Webhook?
- Gregory Baboolal Tue 7/25/23 11:54 AM