BUG?: Workflow not passing parameters to other workflow

Hi All -

I am building a workflow that calls another workflow and passes some JSON parameters. I reference the passed parameters in the second workflow using "startTrigger.data", but I do not see the values passed. Is this a bug or am I supposed to reference the passed parameters another way?

Passing parameters from workflow #1:

Logging parameters passed in workflow #2:

[log] {
  data: undefined,
  metadata: null,
  value: undefined,
  error: undefined,
  loggingMetadata: undefined
}

To add some more detail:

Workflow 1 is a loop that uses a result set from a previous query. I confirmed the query returns results. I've narrowed down the issue that values are being passed from one workflow to another if they are hardcoded... i.e. "test@test.com" instead of {{value.purchaser_email}}. I confirmed that {{value.purchaser_email}} does resolve in workflow 1, but the value does not get passed to workflow 2.

Hi @Jessica_D this is a bug that our team is working on. As a workaround, can you try using a Raw body type instead of JSON? :crossed_fingers: hope that helps for the time being!

I did try that and I had the same issue. The values inside the {{}} do not get passed either way.

Hi @Jessica_D can you share a screenshot of the full block where you are using Raw parameters? I haven't been able to reproduce a bug here (only with JSON so far) :thinking:

For reference, this is working on my side until the bug with JSON gets fixed:

*Note that if you are wrapping each value in {{}}, you need to have a space between any double curlies ({{}}) and the closing } for the object.

This also appears to work:

Another workaround is to use a Post RestQuery (instead of a Workflow trigger) where the rest url is a webhook for your second workflow:

Loop in workflow 1:


Enable this setting in workflow 2:

Here are some screenshots. By the way, I've noticed different behavior when using quotes in the JSON.

Test 1: No quotes wrapping the values
Using raw to pass in the parameter ({{value.purchaser_email}}l does not resolve to anything)

Parameters logged in workflow #2 (blank array)

Test 2: Using "" in the JSON
Passing parameters from workflow #1, now {{value.purchaser_email}} resolves

Parameters logged from workflow #2, everything is null/undefined:

I am also seeing this issue within one workflow itself when calling an API (in my case, PayPal invoicing). I can see the values inside {{}} resolve in the little green debug window, but the parameters do not actually get passed to the API and errors are returned.

This is a super critical issue that blocks all usability of workflows, so I hope you guys are able to remedy quickly.

Thanks!

I have gotten somewhere with the debugging.

  1. Wrapping the values in "" seems to have an impact on whether or not the downstream workflow has a null or just an incomplete startTrigger. If I include the "" in the raw JSON, then the downstream startTrigger is completely undefined. If I remove it, then the startTrigger 'sees' the keys, but the values are null.

For example, this 'works' in that it sends something to startTrigger (downstream workflow startTrigger contains the key name but not the value):

{
  token: {{getPayPalToken.data.access_token}},
  familyId: {{value.id}},
  students_enrolled: {{value.students_enrolled}},
  father_first_name: {{value.father_first_name}},
  father_last_name: {{value.father_last_name}},
  address_line_1: {{value.address_line_1}},
  city: {{value.city}},
  state: {{value.state}},
  zip: {{value.zip}},
  father_email: {{value.father_email}},
  mother_email: {{value.mother_email}},
  amount_due: {{value.amount_due}}
}

and this does not work (results in downstream startTrigger being completely undefined, even though my little green window shows a working JSON in the upstream workflow):

{
  "token": "{{getPayPalToken.data.access_token}}",
  "familyId": "{{value.id}}",
  "students_enrolled": "{{value.students_enrolled}}",
  "father_first_name": "{{value.father_first_name}}",
  "father_last_name": "{{value.father_last_name}}",
  "address_line_1": "{{value.address_line_1}}",
  "city": "{{value.city}}",
  "state": "{{value.state}}",
  "zip": "{{value.zip}}",
  "father_email": "{{value.father_email}}",
  "mother_email": "{{value.mother_email}}",
  "amount_due": "{{value.amount_due}}"
}
  1. If I pretend I am not in a loop and just reference the input values directly with an actual index number and not 'index', then the downstream workflow gets everything perfectly. If I try to use value or index to reference my loop, the behavior is broken.

For example, this JSON input makes my downstream workflow work beautifully:

{
  token: {{getPayPalToken.data.access_token}},
  familyId: {{findPartialPaidAccounts.data[0].id}},
  students_enrolled: {{findPartialPaidAccounts.data[0].students_enrolled}},
  father_first_name: {{findPartialPaidAccounts.data[0].father_first_name}},
  father_last_name: {{findPartialPaidAccounts.data[0].father_last_name}},
  address_line_1: {{findPartialPaidAccounts.data[0].address_line_1}},
  city: {{findPartialPaidAccounts.data[0].city}},
  state: {{findPartialPaidAccounts.data[0].state}},
  zip: {{findPartialPaidAccounts.data[0].zip}},
  father_email: {{findPartialPaidAccounts.data[0].father_email}},
  mother_email: {{findPartialPaidAccounts.data[0].mother_email}},
  amount_due: {{findPartialPaidAccounts.data[0].amount_due}}
}

And this JSON does NOT work (downstream workflow gets the keys but not the values):

{
  token: {{getPayPalToken.data.access_token}},
  familyId: {{findPartialPaidAccounts.data[index].id}},
  students_enrolled: {{findPartialPaidAccounts.data[index].students_enrolled}},
  father_first_name: {{findPartialPaidAccounts.data[index].father_first_name}},
  father_last_name: {{findPartialPaidAccounts.data[index].father_last_name}},
  address_line_1: {{findPartialPaidAccounts.data[index].address_line_1}},
  city: {{findPartialPaidAccounts.data[index].city}},
  state: {{findPartialPaidAccounts.data[index].state}},
  zip: {{findPartialPaidAccounts.data[index].zip}},
  father_email: {{findPartialPaidAccounts.data[index].father_email}},
  mother_email: {{findPartialPaidAccounts.data[index].mother_email}},
  amount_due: {{findPartialPaidAccounts.data[index].amount_due}}
}

Hope this information helps in making a fix.

I've encountered the same issue when trying to update/insert to Firebase on a workflow loop, looping on a BigQuery result.
UI seems to show the actual value in the tooltip, as in {{ value.userId }} will be shown as the-actual-id, however when executing, it is shown as "[Object object]" essentially failing.


Note that creditsToRestore is a number coming from a BigQuery result.

1 Like

DId you see the post regarding a workaround for this?

1 Like