Integry Docs
  • Welcome
  • Sign up for a free trial
  • Apps
    • Overview
    • Authentication
      • Access Control and Testing
    • Passthrough Requests
    • Supported Apps
      • Accelo
      • Aircall
      • Constant Contact
      • Copper
      • Elastic Email
      • Fireflies
      • Insightly
      • Instantly
      • Ontraport
      • RingCentral
      • Sendy
      • ServiceTitan
      • ActiveCampaign
      • Jotform
      • ActiveTrail
      • Agile CRM
      • Aha!
      • Airtable
      • Amazon SES
      • Asana
      • Basecamp3
      • BirdSend
      • Breezy HR
      • Brevo
      • Campaign Monitor
      • Capsule CRM
      • Chargify
      • CleverReach
      • ClickUp
      • ClickSend
      • Cliengo
      • Coda
      • Constant Contact
      • ConvertKit
      • Copper
      • Customer.io
      • Delighted
      • Demio
      • Drip
      • E-goi
      • Eventbrite
      • EverAction
      • Everhour
      • Formstack
      • Freshdesk
      • Freshworks CRM
      • Mautic
      • Customer.guru
      • Front
      • FTP
      • GetResponse
      • GitHub
      • Google Contacts
      • Google Sheets
      • GoToTraining
      • Groove
      • Help Scout
      • HubSpot
      • Keap
      • Mailchimp Transactional
      • Mailjet
      • MailUp
      • MeisterTask
      • Monday.com
      • MoonMail
      • Moosend
      • Nimble
      • Notion
      • Ontraport
      • PagerDuty
      • Pipedrive
      • Pipeline
      • Salesforce
      • SendPulse
      • Slack
      • Snappy
      • SolarWinds
      • Stripe
      • SurveySparrow
      • Teamgate
      • Unbounce
      • Zoho Books
      • Zoho Campaigns
      • Zoho CRM
      • Zoho Mail
      • Zoom
  • Flows
    • Overview
    • Flow Tutorials
      • Sync data TO another app from your app
      • Sync data FROM another app to your app
      • Create a two-way flow
    • Build a Flow
    • Trigger a Flow
      • Multiple Triggers in a Flow
    • Steps in a Flow
    • Integrations
      • Runs
  • Functions
    • Overview
    • Try Functions in 60 seconds
    • Quickstart for AI
    • Viewing Function Calls
    • Source Functions
    • Agent Frameworks
      • LangChain/LangGraph
      • CrewAI
      • AutoGen
      • LlamaIndex
      • Haystack
      • Smolagent
      • LiteLLM
      • Mistral AI
  • Embedded UI
    • Embed Integry Apps Marketplace
    • Add Integry Apps to an Existing Marketplace
    • Render modes, layouts and styling
    • Embedding FAQs
  • APIs and SDKs
    • JS SDK Reference
      • React Web Apps
    • API Reference
  • Workspaces
    • Overview
    • Workspace Variables
    • User Variables
  • Users
    • Testing with Beta Users
Powered by GitBook
On this page
  • Populate dropdown options
  • Fetch custom fields
  • Call a source function
  • List all source functions

Was this helpful?

Export as PDF
  1. Functions

Source Functions

PreviousViewing Function CallsNextAgent Frameworks

Last updated 5 months ago

Was this helpful?

Source functions return object arrays that can be used to dynamically , or .

Populate dropdown options

Functions like slack-post-message require the user to provide an ID value for the channel parameter. Source functions help populate such arguments.

For example, when you to the user so they can select a channel, we call the source function slack-list-conversations (using the user's auth credentials) to populate the channel dynamic dropdown.

In fact, when you , we call the same source function to get the list of channels so we can predict the most relevant option.

When you , the description of a field will mention if there is a source function available to list the options for that field.

See line 9 of this sample response for GET /functions/slack-post-message:

{
    "name": "slack-post-message",
    "description": "Post a message in a channel",
    "parameters": {
        "type": "object",
        "properties": {
            "channel": {
                "type": "string",
    
            },
            "attachments": {
                "type": "string",
                "description": "A JSON-based array of structured attachments, presented as a URL-encoded string."
            },
            "blocks": {
                "type": "array",
                "description": "A JSON-based array of structured blocks, presented as a URL-encoded string.",
                "items": {
                    "type": "string"
                }
            },
            "text": {
                "type": "string",
                "description": "The content of the message."
            },
            "as_user": {
                "type": "boolean",
                "description": "(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps."
            },
            "icon_emoji": {
                "type": "string",
                "description": "Emoji to use as the icon for this message. Overrides icon_url."
            },
            "icon_url": {
                "type": "string",
                "description": "URL to an image to use as the icon for this message."
            },
            "link_names": {
                "type": "boolean",
                "description": "Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead."
            },
            "metadata": {
                "type": "string",
                "description": "JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
            },
            "mrkdwn": {
                "type": "boolean",
                "description": "Disable Slack markup parsing by setting to false. Enabled by default."
            },
            "parse": {
                "type": "string",
                "description": "Change how messages are treated."
            },
            "reply_broadcast": {
                "type": "boolean",
                "description": "Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false."
            },
            "thread_ts": {
                "type": "string",
                "description": "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
            },
            "unfurl_links": {
                "type": "boolean",
                "description": "Pass true to enable unfurling of primarily text-based content."
            },
            "unfurl_media": {
                "type": "boolean",
                "description": "Pass false to disable unfurling of media content."
            },
            "username": {
                "type": "string",
                "description": "Set your bot's user name."
            }
        },
        "required": [
            "channel",
            "text"
        ]
    }
}

Fetch custom fields

Apps like Hubspot let the user completely customize objects to represent their business. Hence, functions like hubspot-create-contact don't have any typical standard parameters like email, name, etc. Instead, it requires an object parameter called properties in which all the fields of the contact to be created have to be passed. Source functions help populate such arguments.

Sample response for GET /functions/hubspot-create-contact:

{
    "name": "hubspot-create-contact",
    "description": "Create a contact with the given properties. Call hubspot-list-properties to get the properties.",
    "parameters": {
        "type": "object",
        "properties": {
            "properties": {
                "type": "object",
                
                "properties": {}
            }
        },
        "required": []
    }
}

Call a source function

In fact, they can typically be called headlessly because they usually don't have any required parameters. You should cache the data to avoid repeated calls.

Good candidates to cache are channel list, user list, issue types, project names, etc. Ultimately, it depends on your use-case, but you can also implement a generic solution for supporting function data.

List all source functions

You cannot list all source functions, per se, because they are context-dependent. Instead, you can list all query-type functions with GET /functions?type=query. To get all query-type functions for just one app, call GET /functions?type=query&app=<app_name>.

When you to the user so they can fill the Contact object fields, we call the source function hubspot-list-properties (with objectType: Contact) to fetch all the custom fields for the Contact object.

Similarly, when you , we call the same source function to get the list of fields so we can predict the most relevant values for the fields.

When you , the description of an object field will mention if there is a source function available to list the fields for that object.

You can call a source function like any other function via the or .

See for more options.

show the Function UI
predict the arguments with Integry AI
get a function
API
SDK
/functions
show the Function UI
predict the arguments with Integry AI
get a function
populate dropdown options
fetch custom fields