I have a use-case where I need to pass an input parameter(partyName) to my Integration flow which has an API trigger (SendResultEmail_API_1). I have the below CURL command to test the integration from Cloud shell.
curl -X POST -H "authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -d '{"trigger_id":"api_trigger/SendResultEmail_API_1", "partyName":"sample-name-1"}' "https://asia-east1-integrations.googleapis.com/v1/projects/<project-id>/locations/-/integrations/-:execute"
The variable partyName is defined as an input variable in the Integration.
When I run the above command, I am seeing the error below -
When I run the command without the input parameter value, I'm able to get the response from Integration. I'm assuming the issue is with the way I'm passing the value as input for the Integration.
Would be great if I could get a sample payload for the input for the Integration, also comments on any issues with the command
Solved! Go to Solution.
Hey Sudershan !
Here is the same curl:
curl -X POST -H "Content-Type: application/json" -d '{"trigger_id":"api_trigger/trigger_id", "inputParameters": {"partyName": {"stringValue": "sample_string"}}}' 'https://region-integrations.googleapis.com/v1/projects/project/locations/-/integrations/integrationName:execute' -H "Authorization: Bearer $(gcloud auth print-access-token)"
You can find more details on the API here. Let us know if above works for you.
Hey Sudershan !
Here is the same curl:
curl -X POST -H "Content-Type: application/json" -d '{"trigger_id":"api_trigger/trigger_id", "inputParameters": {"partyName": {"stringValue": "sample_string"}}}' 'https://region-integrations.googleapis.com/v1/projects/project/locations/-/integrations/integrationName:execute' -H "Authorization: Bearer $(gcloud auth print-access-token)"
You can find more details on the API here. Let us know if above works for you.
Hey @vsy ! Worked like a magic. Thanks for the sharing the documentation.