Skip to main content

Hello,

My client is interested in automating some of their workflows. One of their applications is hosted on AWS Lambda as a series of Python functions. I’ve tested calling the Lambda functions from Zapier with Invoke Function (Sync) and this works. But I haven’t found a way to use the data returned from the Lambda function in subsequent Zapier steps.

The Lambda function returns flat JSON results, and these show up when I test the step, as “Result Json Body” and “Result Json Status Code”, but I can’t see a way to actually use this data, for example to send a message via Slack.

Here is an anonymised sample of the sort of data our function is returning:

{
"last_operation_time": "2025-02-04T11:26:43.989Z",
"email": "hello@example.com",
"firstname": "Alice",
"user_id": "123456",
"lastname": "Cooper",
"last_operation": "Subscribe",
"last_operation_status": "Error",
"error_message": "Something bad happened..."
}

I feel like I’m missing something obvious and any advice is much appreciated.

 

Hi ​@WGreen 

Try this:

 


Thanks. I solved the problem by calling the Lambda from a Zapier code step instead.

In case anyone else has this issue, you can use the Python response module like this. I’ve omitted error handling for brevity and you need to set the lambda_url and payload to the correct values for your function.

import response
headers = {'Content-Type': 'application/json'}
lambda_url = "https://LAMBDA_URL.on.aws/"
payload = {"user_id": input_dataa'user_id']}
response = requests.post(lambda_url, json=payload, headers=headers)
return(response.json())

 


Wow! Thank you for confirming that your resolution got the Zap running. This will significantly help our Community members to have as a reference for the same issue.