HOW TO: Pass data from one flow to another
In some instances, you may want to pass data from one flow to another. This could be useful because you
- want to utilize a single flow for creating/updating customer records within your ERP and to do so you have order flows that all call to a single customer create flow
- want page size controls over NetSuite realtime exports
- want to utilize a single flow to manage error messages to Slack
- want to work with a file you created within a file provider import step and to do so you use a postAggregate function to send the created file details to another flow
NOTE: You can also do this via script by calling the exports.run(options) JSRT function.
In order to do this, you need admin privileges, an IO api token, or to already have a connection made to IO and that connection is registered to the integration tile you have access to.
To start off:
- Go to the resources tab on the left hand side
- Click connections
- Click add connection
- Follow the steps in this article to create a connection to integrator.io
Next, you need to create flow #2
- Go to the integration tile you want this to live in
- Create flow #2
- Add a source
- Select integrator.io as the source
- Choose "Listen for real-time data from source application"
- Click Next
- Name the export
- Click the plus sign next to public URL and copy the generated value. For example, "/v1/exports/654XXXXXXX7ff2f/data".
- Add sample data. This could just be {} to start.
- Set your page size if needed.
- Add a destination
- Turn the flow on
Next, create flow #1
- Add whatever source system you need
- Add a new destination
- Select integrator.io as the destination
- Choose "Import records into destination application"
- Choose the connection you setup in the beginning
- Name the import
- Switch your form view to REST API
- Choose POST as HTTP method
- In the relative URI field, paste the copied value from step 8 above.
- Save and close.
- You can add a mapping if you want or if you specify nothing, the raw record data will pass to flow #2.
- Turn the flow on and test it out
1
Comments
ARTURO DURAN MORENO this is what we discussed on office hours and I decided to write this up to share with others.
Thanks Tyler. I will do it and let you know.
Please sign in to leave a comment.