Workflow publish failed: Salesforce refused to publish the workflow trigger
Updated
Applies to: Workflows with a Salesforce trigger
You selected Publish in a workflow's builder, and an error said Salesforce refused to publish the workflow trigger. Nothing was published: your draft stays a draft, and the workflow stays as it was before you selected Publish. Here's what causes it and how to clear it.
This message appears when the updated Salesforce trigger connection is turned on for your organization. If you don't see it, contact your OnRamp team.
Why it happens
When you publish a workflow with a Salesforce trigger, OnRamp creates a Flow and an Outbound Message in your connected Salesforce org. This happens when the trigger is new or changed since the last published version, or when the workflow is paused. It also happens when the set of Salesforce fields the workflow's steps use has changed, even if the trigger itself hasn't. Workflows with other trigger types don't create anything in Salesforce.
Salesforce refused that request. Either the Salesforce user OnRamp connects as is missing a permission it needs to create Flows and Outbound Messages, or API access is turned off for the org.
The error reads:
Salesforce refused to publish the workflow trigger for '<object>' (Salesforce error <code>). The Salesforce user OnRamp connects as is missing a permission it needs to create Flows and Outbound Messages, or API access is turned off for the org. Ask your Salesforce admin to grant that user Manage Flows, Modify Metadata Through Metadata API Functions, Send Outbound Messages and Customize Application, then publish again.
The message names the Salesforce object the trigger watches. When Salesforce returns an error code, the message shows it in parentheses. If it doesn't, the message leaves that part out. The codes that produce this message are INSUFFICIENT_ACCESS, INSUFFICIENT_ACCESS_OR_READONLY, INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, API_DISABLED_FOR_ORG, API_CURRENTLY_DISABLED and FUNCTIONALITY_NOT_ENABLED.
The same refusal can happen when you resume a Workflow that was paused. The workflow stays paused, and the same message appears.
Fix it
Copy the error message, including the object name and any Salesforce error code.
Send it to your Salesforce admin, and ask them to grant the Salesforce user OnRamp connects as these permissions:
Manage Flows
Modify Metadata Through Metadata API Functions
Send Outbound Messages
Customize Application
If the code is
API_DISABLED_FOR_ORGorAPI_CURRENTLY_DISABLED, ask your Salesforce admin to turn on API access for the org.Once your admin confirms the change, open the workflow's builder and select Publish again. If you see Edit from v followed by a version number instead of Publish, select it first. If the workflow was paused, toggle the Workflow on again instead, and then select Confirm.
If Publish is turned off, save any unsaved changes and fix any invalid steps. Publish also stays off while the workflow is saving, when it has fewer than three steps, or when its trigger points to a Salesforce connection that needs re-linking. If you don't have permission to publish workflows, hover over Publish to see why it's turned off.
If you see a different message
If the message says the trigger failed on the integration's side and may be only partially applied, retry the publish to finish it.
If the message says
Salesforce rejected the workflow trigger, followed by details, or asks you to refresh fields and update trigger conditions, it isn't a permission problem. Follow what the message says.
Still stuck?
Contact support with the workflow's name, the full error message with its Salesforce error code, the time you published, and the username of the Salesforce user OnRamp connects as.