# New Chatter Feed Item (Instant or Polling) — Salesforce

> Emit new events for each Chatter FeedItem (post) created in Salesforce, polling FeedItem via SOQL on CreatedDate. Use this to react to Chatter posts on Cases and other records, since Chatter activity does not update the parent record's…

- Key: `salesforce_rest_api-new-feed-item`
- Type: Trigger (Polling)
- Version: 0.0.6
- App: Salesforce (`salesforce_rest_api`) — https://pipedream.com/apps/salesforce-rest-api.md
- This page (HTML): https://pipedream.com/apps/salesforce-rest-api/triggers/new-feed-item
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/salesforce_rest_api/sources/new-feed-item/new-feed-item.mjs

## Description

Emit new events for each Chatter FeedItem (post) created in Salesforce, polling `FeedItem` via SOQL on `CreatedDate`. Use this to react to Chatter posts on Cases and other records, since Chatter activity does not update the parent record's `LastModifiedDate` (so **New Record (Instant, of Selectable Type)** and **New Case (Instant, of Selectable Type)** never emit for it). Set `parentObjectType` to the parent object's API name (e.g. `Case`, `Opportunity`) to only emit posts whose parent record is of that type. Set `excludeSelf` to `true` to drop posts authored by the connected integration user. Note: `Body` is null for system-generated post types (e.g. `TrackedChange`). Attempts instant delivery via webhook and falls back to timer polling automatically when the Streaming API does not support this object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_feeditem.htm)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `timer` | `$.interface.timer` | Yes | The timer is only used as a fallback if instant event delivery (webhook) is not available. |
| `parentObjectType` | `string` | No | Optional. Only emit posts whose parent record is of this Salesforce SObject API name, e.g. Case or Opportunity (traversal of the polymorphic FeedItem.ParentId). Enforced on both delivery paths: AND Parent.Type = '<value>' in the polling SOQL, and the parent's Salesforce ID key prefix on instant (webhook) deliveries. Leave blank to emit posts on any parent object. |
| `excludeSelf` | `boolean` | No | Optional. When true, appends AND CreatedById != '<authenticatedUserId>' to filter out posts created by the connected user. The user ID is resolved at runtime via the userinfo endpoint and cached in db. |

## Returns

Events emitted by Salesforce.

## Run it

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const deployed = await pd.triggers.deploy({
  id: "salesforce_rest_api-new-feed-item",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    salesforce_rest_api: { authProvisionId: "apn_xxxxxxx" },
    timer: { "intervalSeconds": 900 },
    parentObjectType: "Parent Object Type",
  },
  webhookUrl: "https://example.com/webhooks/salesforce-rest-api",
})

console.log(deployed.id)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/triggers/deploy \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "salesforce_rest_api-new-feed-item",
    "webhook_url": "https://example.com/webhooks/salesforce-rest-api",
    "configured_props": {
      "salesforce_rest_api": { "authProvisionId": "apn_xxxxxxx" },
      "timer": { "intervalSeconds": 900 },
      "parentObjectType": "Parent Object Type"
    }
  }'
```

**MCP**

MCP servers expose Salesforce actions as on-demand tools.

New Chatter Feed Item (Instant or Polling) is an event source, so your application deploys it with the Connect SDK or API and then either receives each event at a webhook URL or retrieves events on demand with the trigger events API.

## Event delivery

Every event is sent to the HTTP endpoint you choose when you deploy the source. Or: no webhook required — your app or agent can fetch recent events from the [trigger events API](https://pipedream.com/docs/connect/api-reference/list-trigger-events.md) instead.

---

- App: https://pipedream.com/apps/salesforce-rest-api.md · All apps: https://pipedream.com/apps
