SFTP File Payload manipulation with Code or API task | XM Community
Skip to main content

Hello,

I am working on automating a process to pull a CSV file from an SFTP server and use its payload to automatically create mailing lists, distribution lists, and survey URLs.

We have successfully set up the entire flow using static contact data hardcoded into different API calls. However, we now want to leverage the CSV file's payload to fully automate this process.

Could you please suggest a way to achieve this?

@m.delimitev Did you already check the guide for contact import automation? You can use SFTP as import source. 

Alternativly, you can work with an ETL workflow to extract data from SFTP (step 5 in the screenshot). You have the option to transform the extacted data (step 6 in the screenshot) as in your title you mentioned “manipulation”). But of course you can also use code tasks in this setup. Once extracted and transformed, you can loop (step 7 in the screenshot) and set up all your relevant API calls.

Best
Christian


HI @chackbusch ,

 

Thanks for the information. I managed to populate the mailing list with for-each-loop, but now i am facing a new problem. I cannot create a new task after the loop is complete to create a distribution and pull the URLs. Can you please advise? 

 


@m.delimitev I am not sure if this is possible. I remember I struggled with this in the past but found some workaround. You could create another JSON event for the creation of the distribution and call that via web service with all relevant information before the loop. To make sure the mailing list was updated before the JSON event starts, you could delay the JSON event. Looping shouldn’t take long but you could even delay it by multiple hours or days if you want to.


Thanks @chackbusch ,

 

I will push the mailing list ID to a new endpoint and do the distribution there. How have you you delayed the JSON event. To clarify : 

I have created the following flows:

 

Flow1:

  1. SFTP import
  2. Create mailing list
  3. Post the mailing list ID to Qualtrics HTTP event listener
  4. Populate Mailing list with for-each-loop 

 

Flow2:  

  1. HTTP event listener for JSON from Flow1 Step 3 

@m.delimitev You can delay it as described here. In the settings of the JSON event you can define some delay which will be considered when the JSON event is triggered from flow 1 step 3. It will not directly start but only when the delay is reached. 

 


You are awesome. Thanks a ton @chackbusch 


@m.delimitev Happy I can help. Let me know if this approach will work for you and please accept my initial comment if so. 🙂


Leave a Reply