A support team often uses more than one system. I have worked with teams that keep customer and sales data in Salesforce but manage their service queue in Freshdesk.
The real challenge starts when an AI agent needs to create a Freshdesk ticket from a simple request, such as “Create a case for login access not working.”
Instead of asking an agent to manually copy the request into Freshdesk, you can assign a Flow action to your Agentforce agent.
The Flow sends an HTTP POST request to Freshdesk, creates the ticket, reads the response, and returns the Freshdesk ticket number in the agent conversation.
This guide shows how to build an HTTP Callout with Salesforce Flows integration with Freshdesk and expose it as a custom Agentforce action.

What You Will Build
This is a practical Salesforce Flow HTTP POST integration for a support team that handles around 500 customer requests every month.
When a user tells the Agentforce service agent something like:
“Create a case for password reset issue. My email is alex@example.com.”
The agent will:
- Collect the ticket details from the user prompt.
- Call an autolaunched Flow through an Agentforce action.
- Send a POST request to Freshdesk.
- Create a ticket in Freshdesk.
- Read the ticket ID from the Freshdesk API response.
- Reply with a message such as: “Your Freshdesk ticket #12345 has been created.”
The primary keyword for this tutorial is Salesforce Flow HTTP POST. You will also work with Agentforce, External Credentials, Named Credentials, HTTP Callout, autolaunched Flow, and Freshdesk API authentication.
Why Use Salesforce Flow HTTP POST for Freshdesk?
A Flow is Salesforce’s declarative automation tool. It lets administrators and consultants build business automation without writing Apex code for every process.
For this use case, the Flow works as a bridge between Agentforce and Freshdesk:
- Agentforce understands the user’s request and collects inputs.
- Flow controls the business logic and API call.
- Freshdesk creates the ticket and sends ticket details back.
- Agentforce displays the returned ticket number.
This design keeps the AI agent focused on conversation and keeps integration logic inside a reusable Flow. It also makes troubleshooting easier because you can test the Flow separately before assigning it to the agent.
If you are new to the tool, start with this guide on Salesforce Flow fundamentals. You should also understand how Agentforce actions work before connecting the Flow to your agent.

Prerequisites for the Integration
Before you build the Salesforce Flow HTTP POST process, confirm that you have the following items ready.
Salesforce Setup Access
You need access to configure:
- Named Credentials
- External Credentials
- Permission Sets
- Flow Builder
- Agentforce Builder
- Agent actions and topics
A Named Credential stores an external endpoint and references the authentication method. It prevents you from placing API keys directly inside the Flow. This is important because API keys are sensitive credentials.
If you need help with the setup, follow this guide to create a Named Credential in Salesforce and this guide to create External Credentials in Salesforce.
Freshdesk API Details
Keep these details ready from your Freshdesk account:
- Freshdesk domain, such as yourcompany.freshdesk.com
- Freshdesk API key
- Ticket creation endpoint
- Required request fields
- Expected response fields
For a basic Freshdesk ticket creation request, you usually need values such as:
- Requester email
- Ticket subject
- Ticket description
- Priority
- Status
For this example, the Agentforce user asks to create a ticket with the subject Login access not working.
Agentforce Service Agent or Employee Agent
You need an active Agentforce service agent. If you have not created one yet, use this guide to create and deploy an Agentforce service agent.
You also need to make sure that the agent has a topic that handles support-related requests. For a broader implementation approach, review these Agentforce best practices.
Agentforce Agent Action: HTTP Callout with Salesforce Flows
Below, I will explain everything from creating named credentials, Salesforce flow for HTTP callout, and assigning to flow as action to Agentforce agents.
Step 1: Create Named and External Credentials
First, create an External Credential, which defines how Salesforce authenticates with an external system.
For Freshdesk API key authentication, use a custom authentication approach that sends the API key in the required authorization format.
- Go to Setup in Salesforce.
- Search for Named Credentials in Quick Find.
- First select External Credential, then click New.
- Enter a label, such as “External Freshdesk API,” and provide “Name”.
- In the Authentication Protocol, select Basic Authentication. Save it.

- Get the API key from your external system.

- Scroll down and create a principal such as Freshdesk Integration Principal.
- Add the required authentication parameter.
- Store the Freshdesk API key securely in Username and provide any password I provided X.
- Assign access to the principal through a Permission Set and assign the PS to the user.

Now, create a Named Credential for the Freshdesk API endpoint. This keeps your endpoint configuration separate from your Flow.
- Enter a label, such as “Freshdesk API,” and provide “Name
- Set the URL to your Freshdesk base URL.
Example:
https://yourcompany.freshdesk.com
- Select the external credential that you created.
- Save the Named Credential.

Do not add /api/v2/tickets to the base URL if you want to reuse this Named Credential for other Freshdesk endpoints later. You can add the path while configuring the HTTP callout action in Flow.
Step 2: Create an HTTP Callout Action in Flow
Now create the reusable HTTP Callout action. An HTTP callout sends a request from Salesforce to an external API.
- Go to Setup.
- Search for Flows.
- Click New Flow.
- Select Autolaunched Flow (No Trigger).
- Click Create.
- In Flow Builder, click New Resource if you want to create test variables first.
- Click the + icon on the canvas.
- Select Action.
- Search for HTTP Callout.
- Click New HTTP Callout.
Configure the action with these values:
| Setting | Example value |
|---|---|
| External Service | FreshDeskExternal |
| Named Credential | Freshdesk API |
| Invocable Action | Invoke FreshDesk |
| Method | POST |
| URL Path | /api/v2/tickets |


The full endpoint becomes similar to this:
https://yourcompany.freshdesk.com/api/v2/tickets
Define the Request Body
Use a sample request body to generate the request structure.
{
"description": "Not able to sign in to the Power Apps portal. Created by Salesforce Agentforce.",
"subject": "Unable to access Power Apps portal",
"email": "xyz@gmail.com",
"priority": 2,
"status": 2
}In a real Agentforce action, do not type fixed values such as alex@example.com. Instead, map those fields to Flow input variables.
The fields mean:
- email: The requester email address.
- subject: A short title for the Freshdesk ticket.
- description: A detailed explanation of the issue.
- priority: The ticket priority value.
- status: The initial Freshdesk ticket status.

Keep the first version simple. I usually start with email, subject, and description. After the team validates ticket quality, I add priority, category, group, product, or custom field mappings.
Define the Response Body
‘Use Example Response’ to generate the response structure or you can aslo use connect for schema which will direct connect with External system where you will get all parameters from Freshdesk.
{
"id": 12345,
"subject": "Login access not working",
"status": 2,
"priority": 2
}The most important field is id. Store it in an output variable and return it to Agentforce as the ticket number.

Click the Save button.
Step 3: Add Action Element Details
- Provide the Label
- To set the Request Body in Value, we have to create New Resource, so click on the Value field, click New Resource, and follow the steps below.

- Provide API Name
- Data Type and Class Name selected automatically

Step 4: Create Input Variables for Agentforce
Your autolaunched Flow needs input variables. These are fields that Agentforce passes to the Flow when it runs the action.
Create the following Flow variables.
| API Name | Data Type | Available for Input | Purpose |
|---|---|---|---|
| varRequesterEmail | Text | Yes | Customer email for the Freshdesk ticket |
| varTicketSubject | Text | Yes | Subject supplied by the user or agent |
| varTicketDescription | Text | Yes | Full issue description |
| varPriority | Number | Yes | Ticket priority |
| varTicketNumber | Text | No | Returned Freshdesk ticket number |
| varResultMessage | Text | No | Agent response message |
Set varTicketNumber and varResultMessage as Available for Output. This lets Agentforce use them after the Flow finishes.
You can learn the full variable setup process in creating variables with Flow Builder.
Step 5: Add Assignment to Map Variables to the HTTP Request
In the HTTP Callout action, map Flow variables to the JSON request fields:
| Freshdesk field | Flow value |
|---|---|
email | {!varRequesterEmail} |
subject | {!varTicketSubject} |
description | {!varTicketDescription} |
priority | {!varPriority} |
status | 2 |
Use a default priority of 2 if your support team uses a standard normal-priority process. Ask the Agentforce user for priority only when it affects handling or service-level commitments.

Save the flow, debug it, and activate it.
Step 6: Create the Agentforce Flow Action
After you activate the Flow, expose it to your Agentforce agent.
- Open Agentforce Builder.
- Select your service agent.
- Open the topic that handles support ticket requests.
- Click New Action.
- Select Flow as the action type.
- Choose your activated Flow.
- Label the action Create Freshdesk Ticket.
- Add a clear action description.
Use an action description such as:
Use this action when a user asks to create a Freshdesk support ticket. Collect the requester email, a clear subject, issue description, and priority before running the action. Return the Freshdesk ticket number from the Flow output.
Map the Agentforce action inputs to:
- varRequesterEmail
- varTicketSubject
- varTicketDescription
- varPriority
Map the Flow output varResultMessage so the agent can use it in its reply.
For more implementation detail, see how to create a custom Flow action for Agentforce and how to use Flow custom actions in Agentforce.
Step 7: Add Agent Instructions
The action alone does not guarantee a good user experience. Add clear instructions to the Agentforce topic so the agent knows when to call the Flow.
Use instructions similar to these:
When a user asks to create a Freshdesk ticket, collect the requester email, issue subject, and a clear description.
Ask one follow-up question if the email, subject, or description is missing.
Use the Create Freshdesk Ticket action only after you have the required details.
After the action completes, confirm that the ticket was created and include the returned ticket number.
Do not invent a ticket number. Use only the value returned by the action.
These instructions prevent common AI-agent problems, such as calling the action with incomplete data or inventing a ticket number before Freshdesk confirms creation.
If you are planning multiple agent actions, review how to assign custom actions to Agentforce agents.
Things to Keep in Mind
- Protect the API key: Store the Freshdesk API key in an External Credential and never place it inside Flow variables, formulas, prompts, or hard-coded text.
- Use an integration user: Run the Flow through a dedicated Salesforce integration user with only the permissions it needs. This improves security and auditability.
- Add fault paths: Configure a Fault Path for every callout action so Agentforce can give a clear response when Freshdesk rejects a request.
- Validate required inputs: Require a valid requester email, ticket subject, and description before the agent runs the Flow. Incomplete details create low-quality support tickets.
- Prevent duplicate tickets: Save the returned Freshdesk ticket ID in Salesforce and check recent requests before creating another ticket for the same issue.
- Test in a sandbox first: Use a Salesforce sandbox and a non-production Freshdesk environment or controlled test tickets before activating the action for users.
Frequently Asked Questions
Can Salesforce Flow make an HTTP POST request to Freshdesk?
Yes. You can use an HTTP Callout action in an autolaunched Flow to send a POST request to the Freshdesk ticket endpoint. Configure a Named Credential and External Credential first so Salesforce can authenticate securely.
Can Agentforce create Freshdesk tickets without Apex?
Yes. Agentforce can call an autolaunched Flow as a custom action. The Flow can make the HTTP POST request and return the Freshdesk ticket ID without requiring custom Apex for the basic integration.
How do I return the Freshdesk ticket number to Agentforce?
Map the id value from the HTTP callout response to a Flow output variable. Then map that output variable or a formatted result message to the Agentforce action response.
What details should Agentforce collect before creating a ticket?
At minimum, collect the requester email, ticket subject, and issue description. You can also collect priority, product name, category, order number, and customer account details if your Freshdesk setup requires them.
Why does my Salesforce Flow HTTP callout fail?
The most common causes are an incorrect endpoint, invalid API key, missing authentication configuration, invalid JSON fields, or a user without access to the External Credential principal. Use Flow Debug and your fault path to identify the exact stage that fails.
Conclusion
You now have a complete Salesforce Flow HTTP POST pattern that lets Agentforce create a Freshdesk ticket and return the real ticket number to the user. Start with the required fields, secure the API key correctly, test every error path, and then expand the Flow as your support process grows.
You May Also Like
- Set up a Named Credential in Salesforce
- Call external APIs from Salesforce Agentforce
- Create a Salesforce Case with Flow
- Create an Agentforce service agent
- Fix Agentforce Apex action issues

Shubham is a Certified Salesforce Developer with technical skills for Building applications using custom objects, approval processes, validation rules, Salesforce flows, and UI customization. He is proficient in writing Apex classes, triggers, controllers, Apex Batches, and bulk load APIs. I am also familiar with Visualforce Pages and Lightning Web Components. Read more about me.