Best answer

Error pulling data from Okta trigger into Airtable action when Zap runs live


Userlevel 1

The app returned `{"message":"You must provide either \"Search by field\" AND \"Search value\" or \"Search Formula\"."}

 

I’m using the event hook type user.session.start in Okta to record session log-in, which I want to send to the corresponding record in Airtable (list of users). When I set up the Zap and pull in test data, it works 100% of the time. I’m pulling the unique user ID (actor ID) from Okta, which is stored in an Airtable field for each record.

 

When the Zap actually runs, however, I am unable to pull in the data from the Okta JSON. “Data Out” for the trigger event shows all the correct values. “Data In” for the search step looks like this:

 

_zap_search_success_on_miss:
false
applicationId:
appue2MkPI[...]
tableName:
tblm7hLT[...]
searchByValue:
{{123426702__actor__id}}
searchByField:
Okta user ID

 

I have tried changing the search values for other fields or to a manual {{actor__id}}, which again works in testing but not in production.

 

Does anybody have any idea why the Zap isn’t pulling the date into the search step?

icon

Best answer by kpn95 3 June 2021, 01:40

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

17 replies

Userlevel 7
Badge +14

Hi @kpn95 

That usually means there is a naming convention difference for a data point, which is causing it to not map thru to Zap steps as expected.

Make sure you are using a Zap trigger example that has values for the data points your are dynamically mapping: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger

Can you please provide screenshots of how your Zap step is currently configured?

Userlevel 1

@Troy Tessalone — thanks for the feedback. As I said the data is fine. Everything is mapped properly and works if I test it (in Zapier). I can refresh the trigger and pull in as much test data as I want; it’s always correct and always updates in the search step. I can even send live data to the record during testing. The Zap only fails during the live search step when the Zap is enabled.

It looks like this:

 

Userlevel 7
Badge +14

@kpn95 

Might be best to open a ticket with Zapier Support for them to troubleshoot with your further: https://zapier.com/app/get-help

Userlevel 1

I appreciate the input; unfortunately, Zapier Support has been unresponsive so far, but I will update the thread if I get more information.

Userlevel 7
Badge +14

@kpn95 

Best case to troubleshoot will be to look at the Zap Runs history details for triggered Zaps to see the DATA IN/OUT for each Zap step to see if you can determine where the issue is.

Is the desired data point actually being provided from the trigger step?

Is the desired data point named differently than what you have mapped?

Userlevel 1

Is the desired data point actually being provided from the trigger step?

Yes

Is the desired data point named differently than what you have mapped?

No

 

In essence, I can run the Zap manually with the “Retest & Continue” button, so I know the values are both correct and mapped properly, but as soon as the Zap is live, the search step fails to pull in the value from the placeholder (even though that value is in the JSON from the trigger). 

 

I believe that is what I referenced above. “Data Out” from the trigger step has the correct values but in the live Zap, the searchByValue returns a placeholder ( e.g., {{123426702__actor__id}} ) instead of an actual value.

 

I have also tried using a manual placeholder in the Zap step (e.g., {{actor__id}}), which will pull data from the JSON and push to Airtable successfully but only during the test step. It is only when the Zap runs that I encounter the error.

Userlevel 7
Badge +14

@kpn95 

I’ve seen where the sample data from the Zap trigger used to configure the Zap can be different then the live data that comes thru, which could include different data points or differently named data points.

Would need to see more screenshots of the live data returned for the trigger step in the Zap Runs in order to further evaluate and advise.

Userlevel 7
Badge +14

@kpn95

Otherwise, you may have to explore leveraging the Okta API/webhooks (https://developer.okta.com/docs/reference/)via the Webhooks app: https://zapier.com/apps/webhook/integrations

Userlevel 1

@Troy Tessalone I’m not sure if it helps, but here’s how it looks on my end:

 

Userlevel 7
Badge +14

@kpn95 

Is the “actor” data point nested under another data point?

FYI: Nested variable names are separated by 2 underscores __

Userlevel 1

@Troy Tessalone Per Okta documentation, it is not: https://developer.okta.com/docs/reference/api/system-log/

Userlevel 1

Again, I’m not sure if this helps, but here’s how the data looks in the Zap history for the manual placeholder ({actor__id}):

 

...and this is how it looks using the Zapier placeholder selected in set-up:

 

Userlevel 7
Badge +14

@kpn95 

FYI: The ID see at the start of the dynamic variable is the Step ID in the Zap.

You can see this in the browser url path by selecting a step in the Zap.

 

Userlevel 1

In that case, it seems like it should be pulling correctly, as the Step ID corresponds to the trigger event in the Zap. Any idea why that would break in the live version?

Userlevel 7
Badge +14

@kpn95 

I’ve honestly exhausted my troubleshooting efforts.

Has Zapier Support gotten back to you about your ticket?

Userlevel 1

@Troy Tessalone Thanks again for your effort.

 

They have not, unfortunately, but I am attempting to follow up with them andwill update the thread if I get a solution.

Userlevel 1

Resolution:

I was able to get in touch with the support team, which was extremely helpful.

First, this is a known issue with the data formatting in the webhooks. The developers are working on a technical solution, but in the meantime, support offered a couple of workarounds. The simplest was to update the value place holder to nest under “data” and “events” and, crucially, function as a string array. The format to pull actor__id was “{{123426702__data__events[]actor__id}}.”

Of course this now doesn’t work in the testing step because of the difference in data formatting, but the live Zap is up and running.