Why Does the First Request Time Out and the Trigger Not Work When Deploying Triggers on Pipedream?

This topic was automatically generated from Slack. You can find the original thread here.

hi! I’m having odd issues deploying triggers. The first request always times out, the second one always goes through, and seems to create a trigger, but when i try testing it in SF by updating the record, nothing happens.

here’s the payload i send in await pipedreamBEClient.triggers.deploy(deploymentPayload);

{
  "id": "salesforce_rest_api-record-updated-instant",
  "externalUserId": "id",
  "configuredProps": {
    "webhook_urls": [
      "https://id.ngrok-free.app/api/agents/webhook"
    ],
    "objectType": "Account",
    "salesforce": {
      "authProvisionId": "id",
    }
  }
}

what i get from the pipedream client:

{
  "data": {
    "id": "dc_GQuD3QO",
    "ownerId": "id",
    "componentId": "sc_4EigJK0D",
    "configurableProps": [
      {
        "name": "salesforce",
        "type": "app",
        "app": "salesforce_rest_api"
      },
      {
        "name": "db",
        "type": "$.service.db"
      },
      {
        "name": "http",
        "type": "$.interface.http",
        "customResponse": true
      },
      {
        "name": "timer",
        "type": "$.interface.timer",
        "description": "The timer is only used as a fallback if instant event delivery (webhook) is not available.",
        "default": {
          "intervalSeconds": 900
        }
      },
      {
        "name": "objectType",
        "type": "string",
        "label": "Object Type",
        "description": "The type of object for which to monitor events",
        "remoteOptions": true
      },
      {
        "name": "fields",
        "type": "string[]",
        "label": "Fields To Watch",
        "description": "If specified, events will only be emitted if at least one of the selected fields is updated. This filter is only available when a webhook is c
                                                                                                                  created successfully.",
        "remoteOptions": true,
        "optional": true
      }
    ],
    "configuredProps": {
      "salesforce": {
        "authProvisionId": "id",
        "objectType": "Account"
      },
      "db": {
        "type": "$.service.db"
      },
      "http": {
        "endpoint_url": "https://id.m.pipedream.net"
      },
      "timer": {
        "cron": null,
        "interval_seconds": 900
      },
      "objectType": "Account"
    },
    "active": true,
    "createdAt": 1755265049,
    "updatedAt": 1755265049,
    "name": "jen-dev - exu_WDiWla",
    "nameSlug": "jen-dev---exu-w-di-wla-6"
  }
}

am i doing anything wrong? also, sidenote, is there any place in dashboard where i can see the triggers for external users?

calling

const deployedTriggers = await pipedreamBEClient.deployedTriggers.list({
    externalUserId: session.activeOrganizationId!,
  });

returns a bunch of them (from my testing) and they are all listed as active, but none of them seem to work

Hey you should remove the Pipedream endpoint URL from your first message

done, sorry, my b

Since anyone could call that endpoint

Nice

So I looked at your trigger, and saw this in the error logs: Could not deploy Apex code to Salesforce.

While there isn’t a dashboard for all the Connect Triggers yet (this is in the roadmap), I believe you can see the trigger in the UI by accessing Pipedream - Connect APIs, AI, databases and more

Could you open it and check the logs tab please and see if there are any errors there too

thanks, let me see…

yeah i see what you said, the “can’t create”

Oh ok

Check out this part of Salesforce: Salesforce API Integrations - Pipedream

There are some additional steps you would have to take to use the webhook (instant) triggers

ah, i see, i must have missed that, the docs are a bit scattered… let me try to follow the steps

Actually this is for your users

Yea I hear you

So since you’re deploying this for your user, then they are the ones that need to follow those steps in their account

yes, i’m just testing in my sandbox (so the user is me), so it’s still me doing this for now :slightly_smiling_face:

Ah gotcha