The Amazon SNS platform (SNS) is a web service that enables you to send an SMS or a text-enabled mobile push notification to targeted subscribers.
Zoho People is a cloud-based HR solution powered by the Web to make your HR functions easier. It is specifically designed for organizations of all sizes.
Zoho People IntegrationsZoho People + Amazon SNS
Create Message to Amazon SNS from New Record in Zoho People Read More...Zoho People + Amazon SNS
Create Topic to Amazon SNS from New Record in Zoho People Read More...Amazon SNS + Slack
Send messages to Slack from the Amazon Simple Notification Service (SNS) Read More...Amazon SNS + Google Sheets
Add new rows on Google Sheets for new Amazon SNS messages Read More...It's easy to connect Amazon SNS + Zoho People without coding knowledge. Start creating your own business flow.
(30 seconds)
(10 seconds)
(30 seconds)
(10 seconds)
(2 minutes)
Amazon Simple Notification Service (Amazon SNS. is a web service that allows you to create, send, and receive notifications.Zoho People is a cloud-based human resource (HR. management software that helps you manage employee information. In this post, I will discuss how to integrate Amazon SNS and Zoho People.
As a first step, we need to integrate Amazon SNS and Zoho People. We can do so with the AWS SDK for PHP. Below is a sample code for doing so:
require_once('vendor/autoload.php'); $accessKeyId = ''; $secretAccessKey = ''; $region = ''; $sns = new AwsSnsSnsClient([ 'region' => $region, 'version' => 'latest', 'credentials' => [ 'key' => $accessKeyId, 'secret' => $secretAccessKey ], ]); $zohoprofile = new AwsSnsResourcesZohoProfile([ 'region' => $region, 'version' => 'latest', ]); $zohoprofile->setArn(getenv('ZOHO_APIKEY')); $sns->addSubscriptionOwner([ 'arn' => $zohoprofile->arn, 'topicArn' => getenv('ZOHO_TOPIC'), 'protocolType' => "email", 'protocolVersion' => "2.0" ]);
Note that we have stored the Zoho API key in the environment variable ZOHO_APIKEY . This is done using getenv('ZOHO_APIKEY'. . Also, we need to set up the subscription in the above code in order to integrate Amazon SNS and Zoho People. You can find the sample code for setting up the subscription here.Next, we need to make sure that we are sending notifications from and subscribing to the correct topic. The next code segment shows how to do this:
<?php include('vendor/autoload.php'); use AwsSnsSnsClient; // Create an instance of sns client $accessKeyId = ''; $secretAccessKey = ''; $region = ''; $sns = new AwsSnsSnsClient([ 'region' => $region, 'version' => 'latest', 'credentials' => [ 'key' => $accessKeyId, 'secret' => $secretAccessKey ], ]); // Set the credentials for Zoho People application $zohoprofile = new AwsSnsResourcesZohoProfile([ 'region' => $region, 'version' => 'latest', ]); // Set the arn of zoho profile application $zohoprofile->setArn(getenv('ZOHO_APIKEY')); // Create subscription owner to subscribe to topic with email protocol $sns->addSubscriptionOwner([ 'arn' => $zohoprofile->arn, 'topicArn' => getenv('ZOHO_TOPIC'), 'protocolType' => "email", 'protocolVersion' => "2.0" ]); // Use subscribe method to subscribe to topic with email protocol try { // Subscribe with email protocol $result = $sns->subscribe([ 'topicArn' => getenv('ZOHO_TOPIC'), 'protocolType' => "email", 'protocolVersion' => "2.0", ]); } catch (AwsExceptionInvalidParameterException $e. { echo "Failed to subscribe user:<br>"; print_r($e->getMessage()); } catch (AwsExceptionInvalidResourceStateException $e. { echo "Failed to subscribe user:<br>"; print_r($e->getMessage()); } catch (AwsExceptionInvalidTopicException $e. { echo "Failed to subscribe user:<br>"; print_r($e->getMessage()); } ?>
After this, we will need to set up our webhook on Amazon SNS. The following code segment shows how to do so:
<?php include('vendor/autoload.php'); include('config.php'); // Create an instance of sns client $accessKeyId = ''; $secretAccessKey = ''; $region = ''; $sns = new AwsSnsSnsClient([ 'region' => $region, 'version' => 'latest', 'credentials' => [ 'key' => $accessKeyId, 'secret' => $secretAccessKey ], ]); // Set the credentials for Zoho People application $zohoprofile = new AwsSnsResourcesZohoProfile([ 'region' => $region, 'version' => 'latest', ]); // Set the arn of zoho profile application $zohoprofile->setArn(getenv('ZOHO_APIKEY')); // Create subscription owner to subscribe to topic with email protocol $sns->addSubscriptionOwner([ 'arn' => $zohoprofile->arn, 'topicArn' => getenv('ZOHO_TOPIC'), 'protocolType' => "email", 'protocolVersion' => "2.0" ]); // Set up webhook on zoho profile app try { // Set up webhook on zoho profile app $result = $sns->createWebhook([ 'webhookName' => getenv('WEBHOOK_NAME'), 'topicArn' => getenv('ZOHO_TOPIC'), 'sourceArn' => getenv('ZOHO_PROFILE'), ]); } catch (AwsExceptionInvalidParameterException $e. { echo "Failed to setup webhook:<br>"; print_r($e->getMessage()); } catch (AwsExceptionInvalidResourceStateException $e. { echo "Failed to setup webhook:<br>"; print_r($e->getMessage()); } catch (AwsExceptionInvalidTopicException $e. { echo "Failed to setup webhook:<br>"; print_r($e->getMessage()); } ?>
Next, we need to make all webhook HTTP requests go through our PHP script. In order to do so, we will need to use Apache rewrite rules. The following code segment shows how to do so:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ /app/index.php?url=$1 [QSA] <?php include('vendor/autoload.php'); include('config.php'); // Create an instance of sns client $accessKeyId = ''; $secretAccessKey = ''; $region = ''; $sns = new AwsSnsSnsClient([ 'region' => $region, 'version' => 'latest', 'credentials' => [ 'key' => $accessKeyId, 'secret' => $secretAccessKey ], ]); // Set the credentials for Zoho People application $zohoprofile = new AwsSnsResourcesZohoProfile([ 'region' => $region, 'version' => 'latest', ]); // Set the arn of zoho profile application $zohoprofile->setArn(getenv('ZOHO_APIKEY')); // Create subscription owner to subscribe to topic with email protocol $sns->addSubscriptionOwner([ 'arn' => $zohoprofile->arn, 'topicArn' => getenv('ZOHO_TOPIC'), 'protocolType' => "email", 'protocolVersion' => "2.0" ]); // Set up webhook on zoho profile app try { // Set up webhook on zoho profile app $result = $sns->createWebhook([ 'webhookName' => getenv('WEBHOOK_NAME'), 'topicArn' => getenv('ZOHO_TOPIC'), 'sourceArn' => getenv('ZOHO_PROFILE'), ]); } catch (AwsExceptionInvalidParameterException $e. { echo "Failed to setup webhook:<br>"; print
The process to integrate Amazon SNS and Zoho People may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick solution to help you automate your workflows. Click on the button below to begin.