Integrating external API calls into Canonic workflows allows you to extend your application's capabilities by interacting with third-party services. Whether you're fetching data, sending notifications, or performing other actions, API calls are a powerful tool for enhancing your workflow.
Setting Up External API Calls
1. Add an API Webhook
- Placement: Identify where in your workflow you need to make an API call.
- Add Node: Insert an API Webhook at this point.
2. Configure the Webhook
- HTTP Method: Choose the appropriate method (GET, POST, PUT, PATCH, DELETE).
- Endpoint URL: Specify the URL of the API you are calling.
- Headers: Include necessary headers, like
- Query: If needed, add query parameters to the URL for methods like GET.
Body: For methods like POST, include a JSON payload.
Testing and Validation
Input Test Data
Provide the necessary headers or body data as required by your API. This ensures your API call has all the needed information to execute correctly.
Run the webhook within your workflow. Monitor its execution to verify that the API call is made successfully and behaves as expected.
Check the response returned by the API call. Ensure that it aligns with the expected data output and meets your workflow's requirements.
Safely store API tokens or sensitive credentials. Avoid hardcoding them directly into your workflow to ensure security.
Be aware of any rate limits imposed by the external API. This helps prevent service interruptions or failures due to exceeding allowed request limits.
Note: The integration of external API calls in Canonic workflows can substantially enhance your application's functionality. Proper setup, testing, and adherence to best practices are key to ensuring effective and reliable API interactions.