# Push notifications

The Action Node **Push Notifications** may be used to push notifications to iOS or Android phones having an Appfarm App installe&#x64;**.**  It allows you to target one or many Users having an App installed on his/her phone, and you may control the content and link of this notification.

**Please read the remarks below before implementing Push notifications in your app.**

## Remarks regarding the use of Push notifications

Push notifications in web applications (and also in installed mobile apps to some extent) do **not** come with a delivery guarantee. **It is not recommended to rely solely on push notifications for important alerts**; they should be supplemented with email or SMS notifications if they are to be used.&#x20;

{% hint style="warning" %}
To have the push notifications delivered to the user, the following must be in place *before* triggering push notifications to the user (using the Push notifications action node):

* The end-user App (used by the users who should receive the notifications) needs functionality for requesting permissions (e.g. a button for this purpose). A separate action node [**Request permissions**](/library/action-nodes/request-permissions.md) exists for this purpose.
* When Request permissions is triggered, the browser/device prompts the user to accept the app's notification access. Users may decline this, effectively blocking push notifications (can be unblocked from the device app settings, or browser address bar). Some browsers may also automatically block this popup (e.g. Chrome may block by default if the user normally blocks such requests).
  {% endhint %}

## Settings

### App

Select the App you want to push notifications to. A typical scenario is that you may want to implement some action in an Administration App targeting users of another mobile App with a notification.

### Title

The title of the notification. Should be kept short and precise.

### Message

The message to the user. A bit more elaborate than the title.

### Open URL on Click

Define the URL to open when the user clicks the notification.&#x20;

### Time to Live

Define how long (in seconds) the notification will stay in the notifications center.

### Recipient Data Source

Must be a Data Source containing (the built-in object class) Users.

### Selection

Having a Recipient Data Source set, you must specify whether to send to All Users of that Data Source, the Selected Object(s), Object in Context, or a Filtered Selection.\
\
\&#xNAN;***Note**: if the link (defined in Open URL on Click) is personal, you will need to add the Push Notifications action node inside a Foreach action node, looping a `Users` Data Source (containing all users to be notified). Then, you may set the Recipient Data Source to the `Users` Data Source, and set the Selection to Object in Context of the Users Data Source.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appfarm.io/library/action-nodes/push-notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
