How to call external API from mobile builder

Kumar210
Tera Contributor

Hi Experts,

My Requirement is to call external API and render the data and show in mobile screens could anyone help with this.

1 REPLY 1

Samaksh Wani
Giga Sage
Giga Sage

Hello  @Kumar210 

 

1. Create an Integration in ServiceNow:

  • Navigate to Integration Hub:
    • Go to System Applications > Integration Hub in your ServiceNow instance.
  • Create an API Connection:
    • Click on New to create a new Integration API.
    • Define the connection details like name, authentication method (e.g., basic auth, OAuth), endpoint URL, headers, etc.
    • Test the connection to ensure it's working correctly.

2. Build a Flow:

  • Navigate to Flow Designer:
    • Go to Flow Designer in your ServiceNow instance.
  • Create a New Flow:
    • Click on New Flow.
    • Define the trigger for your flow (e.g., when a record is viewed, when a button is clicked, etc.).
  • Add Actions:
    • Use the HTTP Request action to make a request to the external API.
    • Configure the HTTP action with the API connection you created in Integration Hub.
    • Define the method (GET, POST, etc.), endpoint URL, headers, and any necessary parameters.
  • Handle API Response:
    • Use Data capsule to extract data from the API response.
    • Transform and manipulate the data as needed.
    • Store the data in ServiceNow tables or pass it to the mobile app for rendering.

 

Please mark my response as accept, if you find it helpful.

 

Regards,

Samaksh Wani