Best answer

Send webhook query string to slack

  • 15 October 2022
  • 6 replies
  • 368 views

i’m using a Zapier catch hook url to capture the post from an application. The post includes data in the query string. I’ve set up a Slack channel and integration to get notified when the app posts to the Zapier webhook. 

How do a get the query string from the post to be included in the generated Slack message? I can only find how to add a static message, e.g. “new message from app, file ready”

Sample post to the Zapier webhook catch: 

curl --location --request POST 'https://hooks.zapier.com/hooks/catch/000111110/qwerty/?reference_id=sample-ref-id-3&event=delivered&action_id=sample-action-id-3&external_id=product-sample'

I want the triggered Slack message to include:

  • reference_id=sample-ref-id-3
  • event=delivered
  • action_id=sample-action-id-3
  • external_id=product-sample
icon

Best answer by Troy Tessalone 17 October 2022, 21:15

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.

6 replies

 

Thank you!

Userlevel 7
Badge +14

@leland-enkasa 

Help article about how to change your trigger test data: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger

Pull in the new webhook data, then map the values from Step 1 to the Slack step.

Here’s the post request:

curl --location --request POST 'https://hooks.zapier.com/hooks/catch/12346789/querty' \

--header 'Content-Type: application/json' \

--data-raw '{

"ticket_id": "123456789",

"event": "delivered",

"model_id": "test-model-ID",

"external_id": "test-External-ID-1"

}'

 

Here’s the request received in in Zapier, with the values in the post body. Is there a resource that describes the correct configuration?

Thanks for your help.

Userlevel 7
Badge +14

@leland-enkasa 

You’ll need to properly configure the Webhook POST request that is being made to trigger the Zap to include those parameters/values.

Thanks.

My bad, it’s the ‘post’ body I want to add to the Slack message (not the query string). Config screenshots:

  1. Zap webhook

 

  1. Slack config
  1. Message text set up -- (I think this is where I should have an option to add the post body to the Slack message, but I don’t see one, and entering text for search does not find any matches. “New scan ready” is my default, static message)

 

Thanks for you help.

Userlevel 7
Badge +14

Hi @leland-enkasa 

Good question.

Please post detailed screenshots with how your Zap steps are configured in order for us to have context, thanks.

This may help…