Trigger Scribe Online integration when a file is uploaded
Is it possible to trigger an integration when a file is placed in the agent’s data exchange folder? I know this is functionality with Scribe Insight, but wasn’t sure if it made its way to Online yet.
Glad to see you here in the new Success Community.
This feature isn't available in the current version of Scribe Online. I have a potential workaround using Powershell and a Request / Reply map.
- Create a sub-directory under /DataExchange i.e. /TriggerFiles
- Upload a sample file to TriggerFiles i.e. data.csv
- Create a Text File as Source Connection,
- Name it "Trigger File"
- Link /TriggerFiles/data.csv to an entity called Data
- Populate the metadata for that entity
- Create a Security rule in your organization to allow Event Solution Access from the public IP where the local agent is installed
- Create a Request / Reply map (REST Service)
- The Request block can have any field you want. We're just using it to run the map.
- Add the Connection "Trigger File" to the map
- Insert a Fetch block from that Connection. Select the Data entity
- When the map runs, the Fetch block will process all the records in the text file
- Using Powershell, register a handler that
- Monitors the /TriggerFiles directory
- Sends a POST to the URL of the Request Reply map
- Be sure to set the scrip to run at startup
- For a Powershell sample see: http://superuser.com/questions/226828/how-to-monitor-a-folder-and-trigge...
Then, when a file called data.csv uploaded to the directory, the handler will trigger the POST to the REST service, which runs the Request / Reply map.
I haven't done a Proof of Concept, but it should work. I recommend adding error checking and designing a map that can handle multiple runs on the same data, just in case.
You could also use a polling method with a map that runs every minute, but the Powershell solution seems cleaner.
I'll add the disclaimer that this is not officially supported and you should test before deploying to production.
Let me know if you need anything else.
Looks like we had a concurrency issue while @James Rosseel and I were replying at the same time. Use the Excel connector instead of the Text connector in my instructions and it should work, and only process the file once.
For the record, my method won't rename the text file. Also, I don't know if adding the file rename to the Excel connector is on the road map.
Thanks James. I like the 5 minute interval, but it will continually reprocess my Excel file. I believe the text adapter can rename the field after processing, but I'm using the Excel adapter from Scribe Labs. Do you know if there's any plans to adjust this functionality?
Scribe Online does not have any setting to run a Solution when a requirement is made in Integration Services. You can set the Scheduling on a Solution to Run every 5 minutes at the lowest timer. You can use the Event and Request/Reply Solutions if you are working with Webhooks to trigger Solutions but normal IS/RS solutions cannot.