Repository: zulip/zulip

Issue:
Integration with Notion
We received a feature request from a user asking for an integration with Notion. It seems like this might be possible as an incoming webhook via their Zapier integration - https://zapier.com/apps/notion/integrations/webhook/599249/trigger-post-webhooks-with-new-items-in-notion-databases to send messages in Zulip about events in Notion


Discussion:
Hello @zulip/server-integrations members, this issue was labeled with the "area: integrations" label, so you may want to check it out!

<!-- areaLabelAddition -->

@sbansal1999 Would you be up for taking a look at this one?
I just had some initial thoughts that if there is a Zapier integration for Notion, users can simply use Zapier to create a Zap that will send a message when a particular event happens on Notion. The trigger event for this Zap would be 'New Database Item'. More information on how to add the Zapier integration can be found [here](https://zulip.com/integrations/doc/zapier).

Instead of Zapier sending a POST request to our server, processing it, and then sending the message, I think it would be better for the Zap to send the message itself. According to me, the users can just basically use Zapier and connect it to Zulip.

 Let me know if I have misunderstood anything.


I might be wrong as never used our Zapier integration before but is there any specific reason why they can't just use our existing zapier integration?

https://zapier.com/apps/zulip/integrations/notion

Seems like it is possible.
In fact I think you were suggesting the same thing @sbansal1999 
Yeah exactly that's what I am suggesting. Users can simply use the Zapier Integration and get messages from events on Notion.
At least in my opinion there would be no good reason to try and custom build one when the only way of sending a webhook from notion is through zapier, its easier and simpler to just link straight through zapier. 

Not sure if we support doing it, but maybe we could just create an integrations docs page for notion which explains they can use zapier so it would still show them we supported the app but that its through zapier. Not sure what you think @alya 
It indeed looks like Notion doesn't have a native API at all; we could consider writing a documentation page on how to setup Zapier with Zulip if that's not trivial; we have a couple other integration doc pages along those lines.
I think we already have instructions on how to set up Zapier with Zulip [here](https://zulip.com/integrations/doc/zapier). Also, I think the information given there is pretty straightforward and easy to follow as well.
Since Notion is a popular product, I think it's worth adding a dedicated documentation page, especially if there are any specific setup suggestions we can make for the Zapier integration. @sbansal1999 would you be up for taking a pass at that? You can use https://zulip.com/integrations/doc/asana as an example/starting point.
I got your point; Notion is pretty popular so creating a dedicated documentation for it is surely worth it. 

I will work on creating the documentation for this and thanks for giving a heads-up on the example.

Resolving patch:
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -582,6 +582,9 @@ def __init__(self, name: str, *args: Any, **kwargs: Any) -> None:
         stream_name="commits",
     ),
     "nagios": Integration("nagios", "nagios", ["monitoring"], doc="zerver/integrations/nagios.md"),
+    "notion": Integration(
+        "notion", "notion", ["productivity"], doc="zerver/integrations/notion.md"
+    ),
     "openshift": Integration(
         "openshift",
         "openshift",


Test patch: