FastGPTFastGPT
Build Apps/Workflow

Start Node, Global Variables, and System Variables Reference

Reference guide for workflow start node outputs, 12 global variable types, read-only system variables, and node I/O data types.

In FastGPT workflows, data flows across the canvas from three variable sources: Start node outputs, application-level global variables, and read-only runtime system variables.

1. Workflow Start Node (workflowStart)

Every main workflow canvas contains a single Workflow Start node that serves as the entry point for incoming conversation requests.

Output FieldInternal KeyValue TypeDescription
User questionuserChatInputStringText message submitted by the user in the current turn
File URLsuserFilesArray<string>Temporary signed URLs of documents and images uploaded in the current turn when File Input is enabled

2. Global Variables

Declare global variables under System configuration → Global Variable in the workflow editor or in the Global Variable section of a Chat Agent. Global variables can be referenced in any node via the variable picker and updated at runtime by the Variable Update node.

1. Pre-Chat Form Variables (User-Facing)

When configured, users see the corresponding form controls before starting a new conversation:

Variable TypeEnum KeyDefault Value TypeTypical Use Case
Text Input boxinputString (or Object / typed arrays)Name, ticket number, background context, or structured input
Number Input BoxnumberInputNumberResult count limit, budget cap, or numeric threshold
Single Select BoxselectStringBusiness category, target language, or output tone
Multiple selection boxesmultipleSelectArray<string>Multiple review dimensions or delivery channels
SwitchswitchBooleanToggle web search, deep analysis, or strict review branches
PasswordpasswordStringMasked temporary access token or secret
Time pointtimePointSelectStringSpecific deadline or query timestamp
Time rangetimeRangeSelectArray<string>Start and end time pair
Chat Model SelectionllmSelectStringAllow the user to switch the underlying chat model
File uploadfileArray<string>Supply pre-chat attachment file URLs

2. Hidden and Internal State Variables

Variable TypeEnum KeyVisibilityInitialization and Update
External Variable (Custom)customHidden only in share links; the input box is shown in in-app chat and run previewSupplied via embedded URL query parameters, share-auth callbacks, or OpenAPI variables
Internal variables (Internal)internalHidden from end users and external APIsInitialized with its default value inside the workflow and mutated across nodes or loop iterations via Variable Update

Configure numeric global variables and comparison operators

3. Runtime System Variables

System variables are injected automatically by the workflow engine on each run and are always available in the variable picker:

System VariableInternal KeyValue TypeDescription
User IDuserIdStringAuthenticated member ID or external customUid, often passed to HTTP nodes for permission lookup
App IDappIdStringUnique identifier of the running application
Current Chat IDchatIdStringUnique identifier of the active multi-turn conversation
AI Response IDresponseChatItemIdStringUnique record ID of the current assistant response item
Chat historyhistoriesChatHistoryConversation history array formatted as { obj: 'System' | 'Human' | 'AI', value: string }[]
Current timecTimeStringTimestamp string with timezone context when the run started

4. Node I/O Value Types (WorkflowIOValueTypeEnum)

Canvas connections and variable pickers validate compatibility using the declared port value types:

Type KeyDisplay LabelStructure
string / number / booleanString / Number / BooleanScalar primitive types
objectObjectJSON key-value object
arrayString / arrayNumber / arrayBoolean / arrayObjectArray<T>Strongly typed arrays used directly by Loop or Parallel Run
arrayAny / anyArray / AnyUntyped array or dynamic value (common in Code Run and HTTP Request outputs)
chatHistoryHistoryMulti-turn context array consumed by AI Chat and Question Classification
datasetQuoteDataset citationsRetrieved chunk array { id, datasetId, collectionId, sourceName, q, a }[]
selectDatasetSelect DatasetTarget knowledge base ID list passed into a workflow tool

Next: Learn how to mutate state with Variable Update or check Workflow Connection Rules.

Edit on GitHub

Last updated

On this page

Put your business knowledge to work with AI

Import company documents and build accurate, reliable, traceable AI answers.