In workflows
Published functions show up in the workflow builder alongside built-in actions.1
Open a workflow
Go to Workflows and open or create a workflow.
2
Add the function as a step
In the step picker, find your function under Code Actions.
3
Map the inputs
Each function has input fields. Connect them to data from the workflow trigger or earlier steps. For example, map a ticket’s requester email to the function’s “email” input.
4
Use the outputs
The function’s output is available to every step after it.
Example
A common pattern is enriching a ticket with information from another tool:- Trigger: A new ticket is created.
- Foundry function: Look up the requester in your CRM by email and return their company and plan.
- Update ticket: Set custom fields with the CRM data and route the ticket based on the plan.
With AI agents
Agents in your workspace can use published functions automatically. When a user asks something a function can help with, the agent calls it. You can also point agents at specific functions in your . Reference a function by name with@Function Name:
When a user asks about a customer, use @Look up CRM contact to find their details by email. Share the company, role, and plan with the user.
See how teams wire published functions into real workflows and agent rules in the Foundry examples guide.
Who sees a function
A function is visible to the same workspaces its integrations are.
For functions that use more than one integration, the most restrictive scope wins.
Managing published functions
- Unpublish removes the function from workflows and agents. Workflows already running finish, but new runs won’t start.
- Update and republish pushes a new version. Workflows and agents pick it up automatically.
- Regenerate the AI tool prompt if you’ve changed what the function does and want agents to learn the new behavior.
Learn more about building workflows and configuring AI agents.