diff --git a/lib/private/notification/action.php b/lib/private/notification/action.php
index 6de8a1a4bbc380d6471a87c4206acdfe8d4d0695..e1171531716ed86190c6e2e7d34f124df9ba3e53 100644
--- a/lib/private/notification/action.php
+++ b/lib/private/notification/action.php
@@ -39,6 +39,9 @@ class Action implements IAction {
 	/** @var string */
 	protected $icon;
 
+	/** @var bool */
+	protected $primary;
+
 	/**
 	 * Constructor
 	 */
@@ -94,6 +97,27 @@ class Action implements IAction {
 		return $this->labelParsed;
 	}
 
+	/**
+	 * @param $primary bool
+	 * @throws \InvalidArgumentException if $primary is invalid
+	 * @since 9.0.0
+	 */
+	public function setPrimary($primary) {
+		if (!is_bool($primary)) {
+			throw new \InvalidArgumentException('The given primary option is invalid');
+		}
+
+		$this->primary = $primary;
+	}
+
+	/**
+	 * @return bool
+	 * @since 9.0.0
+	 */
+	public function isPrimary() {
+		return $this->primary;
+	}
+
 	/**
 	 * @param string $link
 	 * @param string $requestType
diff --git a/lib/private/notification/iaction.php b/lib/private/notification/iaction.php
index da6728f5c525daf9dfc133757573f933bf7a5fe4..9fd964e3dcfc3dcdc6b089a4413fbd60a3c35e43 100644
--- a/lib/private/notification/iaction.php
+++ b/lib/private/notification/iaction.php
@@ -60,6 +60,19 @@ interface IAction {
 	 */
 	public function getParsedLabel();
 
+	/**
+	 * @param $primary bool
+	 * @throws \InvalidArgumentException if $primary is invalid
+	 * @since 9.0.0
+	 */
+	public function setPrimary($primary);
+
+	/**
+	 * @return bool
+	 * @since 9.0.0
+	 */
+	public function isPrimary();
+
 	/**
 	 * @param string $link
 	 * @param string $requestType
diff --git a/lib/private/notification/notification.php b/lib/private/notification/notification.php
index 40fe39a956eadd93ef6d2062de6525dfc0f78ab5..15ca0fee5d20eed803b2b770ca9b880747271e80 100644
--- a/lib/private/notification/notification.php
+++ b/lib/private/notification/notification.php
@@ -68,6 +68,12 @@ class Notification implements INotification {
 	/** @var array */
 	protected $actionsParsed;
 
+	/** @var bool */
+	protected $hasPrimaryAction;
+
+	/** @var bool */
+	protected $hasPrimaryParsedAction;
+
 	/**
 	 * Constructor
 	 */
@@ -369,6 +375,15 @@ class Notification implements INotification {
 		if (!$action->isValid()) {
 			throw new \InvalidArgumentException('The given action is invalid');
 		}
+
+		if ($action->isPrimary()) {
+			if ($this->hasPrimaryAction) {
+				throw new \InvalidArgumentException('The notification already has a primary action');
+			}
+
+			$this->hasPrimaryAction = true;
+		}
+
 		$this->actions[] = $action;
 		return $this;
 	}
@@ -391,6 +406,15 @@ class Notification implements INotification {
 		if (!$action->isValidParsed()) {
 			throw new \InvalidArgumentException('The given parsed action is invalid');
 		}
+
+		if ($action->isPrimary()) {
+			if ($this->hasPrimaryParsedAction) {
+				throw new \InvalidArgumentException('The notification already has a primary action');
+			}
+
+			$this->hasPrimaryParsedAction = true;
+		}
+
 		$this->actionsParsed[] = $action;
 		return $this;
 	}
diff --git a/tests/lib/notification/notificationtest.php b/tests/lib/notification/notificationtest.php
index a790a53eaa795a4b80c831e1f16b63533803b570..98dc0e5bacd15a5fd322a35b12f4549dc6bbb3b8 100644
--- a/tests/lib/notification/notificationtest.php
+++ b/tests/lib/notification/notificationtest.php
@@ -438,6 +438,24 @@ class NotificationTest extends TestCase {
 		$this->notification->addAction($action);
 	}
 
+	public function testAddActionSecondPrimary() {
+		/** @var \OC\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+		$action = $this->getMockBuilder('OC\Notification\IAction')
+			->disableOriginalConstructor()
+			->getMock();
+		$action->expects($this->exactly(2))
+			->method('isValid')
+			->willReturn(true);
+		$action->expects($this->exactly(2))
+			->method('isPrimary')
+			->willReturn(true);
+
+		$this->notification->addAction($action);
+
+		$this->setExpectedException('\InvalidArgumentException');
+		$this->notification->addAction($action);
+	}
+
 	public function testAddParsedAction() {
 		/** @var \OC\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
 		$action = $this->getMockBuilder('OC\Notification\IAction')
@@ -472,6 +490,24 @@ class NotificationTest extends TestCase {
 		$this->notification->addParsedAction($action);
 	}
 
+	public function testAddActionSecondParsedPrimary() {
+		/** @var \OC\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
+		$action = $this->getMockBuilder('OC\Notification\IAction')
+			->disableOriginalConstructor()
+			->getMock();
+		$action->expects($this->exactly(2))
+			->method('isValidParsed')
+			->willReturn(true);
+		$action->expects($this->exactly(2))
+			->method('isPrimary')
+			->willReturn(true);
+
+		$this->notification->addParsedAction($action);
+
+		$this->setExpectedException('\InvalidArgumentException');
+		$this->notification->addParsedAction($action);
+	}
+
 	public function dataIsValid() {
 		return [
 			[false, '', false],