Using JSON data in a previous flow

(Andrew Catchpole) #1

I have complete access to the JSON data in my flow. However, when I go to a new flow I lose the reference back to the JSON data in the previous flow. Therefore, is it possible to reference JSON data from a previous flow? Other attributes allow this.

#2

@Smartview_Property your second flow should use a trigger New Flow,
in first flow you should trigger the second flow with a metadata with your JSON,
in the second flow you should use a Code to parse the metadata, see Can't parse JSON passed in metadata?

1 Like
(Andrew Catchpole) #3

@CaosMkt Thank you for replying but sounds complicated :frowning:

#4

@Smartview_Property try to Set an attributes with your JSON, your attributes will have a stringify of your JSON, in your second flow use a code action to use JSON.parse() of your attributes and then read it’s result

1 Like
(Karen Barker) #5

Hi @Smartview_Property

As @CaosMkt says there are really only 2 ways to handle this. The first would be to trigger the 2nd flow using a “Trigger a Flow” Action, sending the JSON data across in the metadata. This does however create a string for the JSON which you do need to use the code service in order to turn back into a JSON object.

If you are triggering the 2nd flow from a user clicking a shortcut button for instance then you will need to use attributes as these are the only objects which are persistent across flows. You can either save the whole JSON object into an attribute and then as above with the metadata you would need to use the code service in flow 2 to recreate the JSON object from a string. Alternatively if you aren’t comfortable with the code service you could create a different attribute for each item of data you require and then just use these to access the data in flow 2.

(Joanne Go) #6

Hi Karen:

I think this is the right topic to ask my question.

I have flow Main Flow 2 and Flow Q&A.

Main Flow 2 has Send to New Flow action, with input from 3 ask question actions.

I’ve used the choices to trigger Flow Q&A successfully, but I need to submit the metadata I’ve captured from flow Main Flow 2 to the new message trigger in Flow Q&A as an input so that it can retrieve the answer from the next action which is a retrieve google row action.

I’ve successfully triggered the flow. I’ve successfully passed the metadata to the new flow. But when I use metadata as an input in the send a message trigger, it doesn’t submit this to the excel get a row action and I cannot retrieve the correct date from the google sheet.

Can you help me on this?

(Nathan Stults) #7

Have you looked in your Interaction Logs to see what the error message is when the excel action fails?

Nathan

(Joanne Go) #8

Hi Nathan:

Yes, Google Sheets had a problem searching with given parameters. The name of the column might be not supported.

What I’ve noticed in the successful Google sheet pulls is that the group is successfully filled in. In the error logs for the failed Google sheet pull is that the group is not successfully filled in and so only shows that the metadata was successfully transferred between flows.

(Nathan Stults) #9

Ok. You’ll need to submit a ticket to support@flowxo.com and provide a Request ID so we can see what might be going wrong.

Finding the Request ID for an Interaction

(Joanne Go) #10

Hi Nathan:

I’ve emailed with the request ID and I’ve referenced the conversation above.