                 # Note: due to Apple Sandbox limitations, we cannot import
                 # "file" type items
                 if bodyItem["type"] == "text"
-                    bodyObject[bodyItem["key"]] = bodyItem["value"]
+                    bodyObject[bodyItem["key"]] = @expandEnvironmentVariables context, bodyItem["value"]
 
             pawRequest.multipartBody = bodyObject
 
         return pawRequest
+
+    @expandEnvironmentVariables = (context, string) ->
+        rx = /\{\{([^\n\}]+)\}\}/g;
+        items = string.split(rx)
+        if items.length < 2
+            return string
+        for i in [1...items.length] by 2
+            envVariable = @getEnvironmentVariable context, items[i]
+            varID = envVariable.id
+            dynamicValue = new DynamicValue "com.luckymarmot.EnvironmentVariableDynamicValue", {environmentVariable: varID}
+            items[i] = dynamicValue
+        return new DynamicString items...
 
     @createPawGroup = (context, postmanRequestsById, postmanFolder) ->
 

                # Note: it sounds like all data fields are "text" type
                # when in "urlencoded" data mode.
                if bodyItem["type"] == "text"
                    bodyObject[bodyItem["key"]] = bodyItem["value"]

            pawRequest.urlEncodedBody = bodyObject;



        return true

    @getEnvironmentDomain = (context) ->
        env = context.getEnvironmentDomainByName('Imported (Postman)')
        if typeof env is 'undefined'
            env = context.createEnvironmentDomain('Imported (Postman)')
        return env

    @getEnvironment = (environmentDomain) ->
        env = environmentDomain.getEnvironmentByName('ImportedEnv')
        if typeof env is 'undefined'
            env = environmentDomain.createEnvironment('ImportedEnv')
        return env

    @getEnvironmentVariable = (context, name) ->
        envD = @getEnvironmentDomain context
        variable = envD.getVariableByName(name)
        if typeof variable is 'undefined'
            env = @getEnvironment(envD)
            varD = {}
            varD[name] = ''
            env.setVariablesValues(varD)
            variable = envD.getVariableByName(name)
        return variable

    return

PostmanImporter.identifier = "com.luckymarmot.PawExtensions.PostmanImporter"
