Trigger to update txt file with REST data


#1

Matrix Version: 5.5.6

I am trying to set up a trigger where the contents of a text file is updated with the contents being returned from a REST get request, however the trigger is not updating the txt file.

I have built the trigger using this process

Condition: Asset ID (ID of the txt file)

Action: Set file contents
File contents: %globals_asset_contents_raw:123456% (ID of the REST resource)

Action: Release locks

The trigger is set to run at the metadata time event.

I have also tried to add the following dynamic parameters to try to resolve:

File Contents - Set Value - %globals_asset_contents_raw:123456%

Have also checked ‘ignore permissions’ and ‘non-critical’.

Suggestions?

Thank you


#2

Appear to have resolved the issue via the following. Not sure if it is the correct method, but its working.

Asset ID - folder the txt file is located in.

Actions - check ‘action on other assets’

Then under ‘assets’ make this the txt file ID.

It works.

:neutral_face:


(Iain Simmons) #3

That sounds correct. Otherwise the Set File Contents trigger action would attempt to run on the triggering asset, whatever that is.

What trigger event are you using?


#4

For the moment, metadata time but will look at changing soon.
Thanks