-
-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom HTTP queries for webhooks #827
Comments
we plan on working on this, cc @CamilleLegeron Quoting @fflorent :
|
Neat! A workaround is passing requests through an external service like cloudflare workers to rewrite them, but that is a pain to setup and then annoying to maintain. |
With @CamilleLegeron working on webhooks in #832, I wonder if we could sneak a field for this into the migration she'll be introducing. Just a generic |
What about security if there is an authorization secret ? |
Thinking about what headers could be great to custom, I'm only thinking of the authorization parameter. How about adding only |
There's nothing very special to Grist about webhooks. Could be worth looking at what similar apps offer, to see if there is any consensus?
The security question is interesting. The webhook URL itself may have a sensitive key in it, which is part of why it is not stored directly in the document but in a I wonder if this needs actually two features:
|
I tend to think it be more interesting to change this issue title so it tracks three similar features that will probably be implemented altogether (otherwise please mention your disagreement about that), which are the ability to customize the following things for webhooks:
|
Hey, Following a quick talk with @fflorent and some users, I just wanted to add my 2 cents on the potential use cases for this feature.
And probably a lot more to come ! |
Regarding the implementation, what about allowing configuring a column in which it is expected to return these items thanks to a formula, like: import json
return {
'method': 'PATCH', # Defaults to Post
'headers': { # Headers to append to the one sent by the webhooks (like the headers)
'X-Specific-Header': $someColumn,
'X-Common-Header': 'Common value for all records',
},
'body': json.dumps({ # the body, defaults to nothing
'whatever': $someOtherColumn
}),
'queryParams': 'blah=' + $queryParams # Defaults to empty string.
# Other stuffs?
} (The What do you think? |
We would need to clarify the User Story, prevent security issues and have a design mockup for this issue. |
Summary: Adding authorization header support for webhooks. Issue: #827 --------- Co-authored-by: Florent <[email protected]>
Summary: Adding authorization header support for webhooks. Issue: #827 --------- Co-authored-by: Florent <[email protected]>
Tracking progress here :
@hooksie1 could you please rename this issue to the more generic "Custom HTTP queries for webhooks" |
I like this implementation. But I also think the default payload (array of rows that triggered the webhook) is a good idea. I think the default payload should be available to the Python formula, maybe a special variable such as Since you wrote this idea, @CamilleLegeron has already implemented an authorization header, which I think is a good initial approach, but I hope we can keep working towards @fflorent's idea to provide a flexible Python formula that can define all parameters of the request, with defaults provided if fields are missing. My rationale is that we need programmatic flexibility anyway to generate the payload body in general. The user needs the ability to write arbitrary logic to generate the webhook payload. |
I think it would be an awesome feature to allow custom headers in webhooks. The main thought is this would let us use systems that require some kind of authentication for the webhooks.
Talked about this in discord, tagging @vviers.
The text was updated successfully, but these errors were encountered: