Hubspot Custom Workflow Actions are not listing in Workflow tool - crm

I have followed the below steps to create a custom workflow action:
Created a Hubspot developer account and created an App with proper scope, redirect URL and etc.. in it.
I was able to create the action definitions through post man using this App id and H API key.
The definitions were also listed when I use the GET Call
https://api.hubspot.com/automation/v4/actions/121**?hapikey=5af26**-***-***-***-*********
I wanted to use this action in my workflow tool in my test account and sandbox account. So installed it using the install URL in the App section.
Chose the App, accepted permission and received the code also generated the access token with it, during the installation process. (oath process done)
The App was showing up in the "Connected Apps" section in the Integration tab.
So in order to test my App I went to worflowtool but I couldn't find the actions which I custom-defined to appear here.  Can someone help me, what I'm missing here...
Is there some other way I can view the UI of the defined action definition?? Why the custom action is not serachable or not listed in the workflow?
PS: Though the name is Twilio, I'm not integrating it with Twilio, I know there is integration plugins existing already.
Thanks in advance!!

Could be a few possible things that I personally encountered:
published field in your action is set to false. By default the action is created in this way. You need to pass published: true in the creation POST request for it to be enabled on creation. Alternatively you could make a PATCH request and update it after creation.
objectTypes field in your action isn't correct. I has created my action with objectTypes: ['DEALS'] but was checking for the action in a Contact workflow.

Related

GTM Consent Mode: Best way to trigger updateConsentState without full page reload?

Probably a real beginner question, as I'm trying to wrap my head around Google's architecture. I've written a custom sandbox template that is triggered by Consent Initialization - All Pages, as described in the official support document: https://developers.google.com/tag-platform/tag-manager/templates/consent-apis
Now, what I can easily do here is to set the default states and update them if the user had previously made a choice and I read out their consent from a cookie. I run the update through the callInWindow() function, which appears to be the only API function that's able to communicate with code outside of the sandbox through callback functions that I can grant access to.
Now for the following use case: The user pulls up my cookie banner and makes a different choice. If I continue using the default "Consent Initialization" trigger, then I'd be forced to make a full page reload so that the callInWindow() function runs once more in order to perform updateConsentState() with updated data from my website code.
I'd actually like to avoid the full page reload, cause that just feels somewhat clumsy from an end user perspective. Is there anything that speaks against calling my sandbox template with anything else than "Consent Initialization - all Pages"? I think I'd just create another trigger that responds to a specific button click to re-run my sandbox template and update consent through the callback function again. But nowhere in the code samples I see consent templates being used together with any other than aforementioned trigger. What I typically see is people using the dataLayer to push updates after user interaction, which Google says should not be used for consent-related settings.
Can I just go with my idea or is there anything that speaks against it?

Is it safe to make a Facebook Graph API Call from the Client using a Page Access Token?

I want to call Facebook's Graph API from the client to READ public posts on a page using a permanent Page Access Token. I'm curious if this is safe (or how to make it safe). From everything I've read and tried, an access token is required to perform this operation and none of Facebook's other functionality will suit my needs (see background below).
https://developers.facebook.com/docs/javascript/reference/FB.api/ suggests that it is safe to expose Page Access Tokens to the client, but I'm suspicious they're lying to me.
Background:
I'm working with a group that wants to display some posts from their Facebook feed on their WordPress website. They don't want to display all posts, but rather filter them based on a hashtag. I don't know a ton about WordPress, but I'm guessing I can't implement custom back-end API calls on a WordPress site. Please suggest any alternative solutions that you might have!
Access Token are like house keys, you NEVER leave them in front of the door. Which means, you should NEVER hardcode any Access Token. No matter if it is an App, Page or User Token. The docs do not state anywhere that it is ok to expose tokens, they just state how you can use a Page Token on that page in your question - but you cannot just hardcode it on the client.
Vulnerabilities: Without extra permissions, this would be more like a privacy issue, because you can get a lot more info with a Page Token (as the Page owner) than with a simple App Token.
Of course it is possible to do that kind of backend-calls with wordpress. And it would be the far better way, i think.
First you can use the WP-Cron to time your Facebook-Calls. You could create a Cron-Job every hour or so.
WP Developer Scheduling WP Cron Events
Wordpress Codex wp_cron Function Reference
Kinsta Knowledgebase Wordpress Cron Job Tutorial
If you work first time with the WP-Cron have one thing in mind: WP-Cron depends on Site-Activity to be run. So if there is no Traffic on the Wordpress-Site, no Cron-Jobs are run. Here is a link how to add WP-Cron to your systems cron, so your API-Call will be called every time you intend to:
WP Developer Hooking WPCron into System Task Scheduler
The Cron-Job than can use the Wordpress HTTP API to do the call. You should check the Docs on the HTTP API and the wp_remote_request function in special.
Wordpress Codex HTTP API
WP Developer wp_remote_request Reference
Or you could install the Facebook SDK with your Theme/Plugin.
I'm not sure about the security impacts when using a Page Access Token on the Client, but it seems to me, that it would be a better way to do that kind of job.

Google Forms PayPal Express Integration

I am doing work for a non profit with 0 budget for IT. They need to allow users to enter information on a Google Form and then collect payment. I have done a lot of research on the topic and currently appears you can only add a hyperlink on the Google Forms to link to PayPal. However, I was wondering if there was some way to link the PayPal Express Checkout javascript(https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/) into the Google Form so it calls back with a transaction id and status. Then I would be able to somehow insert those values into the Google Form. Any thoughts on how to integrate would be helpful. I am a developer but not familiar with Google Forms.
I recently wrestled with this exact question and ended up building a G Suite addon to make this easier for others. Coincidentally I also do volunteer IT for a small nonprofit and we wanted to use PayPal with our signup form (there's pricing for the addon but just ping me if you're a small nonprofit).
Here's what I learned while building it:
There's no way for Apps Script to modify the form once it's shown to the user, or to use Apps Script to respond to user input
There's no way to redirect the user automatically to PayPal after a form is submitted
That means if you want to send someone to PayPal, you've got to use an ordinary link. You can do this within the form by adding the URL to a question description, or you can add the URL to the text shown once someone has submitted the form. For PayPal, you've got two options for this kind of link:
PayPal buttons
Express checkout
PayPal buttons are a static link managed by PayPal. They don't require any coding - just go here and create a button. Then you need to get the raw text link for the button, which PayPal calls the "email" version. You can insert that into your form directly and tell users to access it. The one problem is there's no real way to get the transaction ID. You could try correlating the form submit time with the payment time, or the payer email with the form submit email. It's possible that neither of them will match up and you'll have to do it manually.
Express checkout requires you to dynamically create a new link for each payment by calling the PayPal API. That means your link needs to open a page that then generates an express checkout URL and redirects the user to it. You can do this using a web app in Google Apps Script using a doGet() trigger, or you can create your backend on your server in any language.
If you can run your own server somewhere, I recommend that (plenty of PaaS services have a free tier). It's much easier to test and debug things when you aren't using Apps Script. I used the PayPal Node SDK which works great despite being unmaintained. (Express checkout is "deprecated" by PayPal, but I'll bet it's not going away anytime soon). Their example will get you most of the way there. When the user arrives, generate a payment link and redirect them. When they finish they'll return to your server, and you can display whatever you want. For example, you can ask them to copy the transaction ID and paste it into your form.
Finally, when your form is submitted an onSubmit() trigger can be set up. There are actually two kinds of onSubmit() triggers for forms - one for the form itself, and a second for the spreadsheet linked to the form. You can register a trigger to do extra processing (e.g. look up the transaction ID), but you can't modify the response in the trigger. You can however modify the spreadsheet where the trigger gets sent, which for most cases is equivalent. For example, you could add a column to the spreadsheet with a link to the PayPal transaction based on the transaction code.

In wso2 api cloud is it possible to add custom sequence for manipulating request and response to/from back end service

From my understanding of the regular WSO2 API Manager product I could create multiple synapse-configurations and register them as (global or api specific) sequences by placing them in the proper directory.
I would then utilize the Sequence configuration capabilites on the "Manage screen" to apply different sequences to the request and response payloads of the backend.
I read the documentation at https://docs.wso2.com/display/APICloud/Key+Concepts#KeyConcepts-Sequences as it is not possible to add more but I wanted to ask specifically.
Is it at all possible to do this type of manipulation in the current version of public API cloud?
I have talked with the relevant teams and this is how you can add a sequence in the API Cloud. Although I mentioned about adding a sequence via the Gateway's carbon console (and said it was broken), WSO2 API Manager product is not a position to make it working (this is a known limitation). If I explain the reason in simple terms, to support it they will need to ship a lot of mediator UIs which will make the product similar to the WSO2 ESB. Following is what you can do.
Use WSO2 Developer Studio to create the sequence you want.https://docs.wso2.com/display/DVS371/Creating+ESB+Artifacts#CreatingESBArtifacts-Workingwithsequences
Go to API Gateway at https://gateway.api.cloud.wso2.com/carbon
You need to login to the gateway. Username is email#tenantDomain. If your email abc#gmail.com and tenant domain (or the organisation key is xyz) you need to give abc.gmail.com#xyz as the username (note the # in the email being replaced with a DOT). Go to "Manage" in the top level menu of API Cloud and you will be able to figure out your organisation key.
Go to Resources -> Browse menu and navigate to /_system/governance/apimgt/customsequences/ registry path. Upload your sequence to in, out or fault folders based on your requirement. This will be then available when you create APIs via the API Publisher.
Yes, it is possible. You have to follow the below steps.
Go to API Gateway at https://gateway.api.cloud.wso2.com/carbon
You need to login to the gateway. Username is email#tenantDomain. If your email abc#gmail.com and tenant domain (or the organisation key is xyz) you need to give abc.gmail.com#xyz as the username (note the # in the email being replaced with a DOT). Go to "Manage" in the top level menu of API Cloud and you will be able to figure out your organisation key.
After login, you can go to sequence menu and add a sequence. I tried these steps just now and realised there is a broken page at add sequence. We are in the process of fixing it. Will keep you updated.
Difference of API Cloud and API Manager standalone version is, you have to store the sequence in the registry for it to be available at the API Publishing time.
We'll be adding a doc on this at the following location soon.
https://docs.wso2.com/display/APICloud/About+WSO2+API+Cloud#AboutWSO2APICloud-CommonAPICloudusecases

Do OpenGraph Actions have to be approved before they can be used in testing?

I've created an open graph action, and so far I can only seem to use it to post the test page that Facebook has generated for me (I'm messing around with curl and a webserver serving the correct kinds of metadata).
Is this a restriction on actions (where, for sandboxed applications, only actions which have been approved can post real updates to a timeline), or am I likely looking at a bug?
In the app dashboard, you can create roles. Create one test user. After you log in from the test user (that will log you out from your original account), you can test freely. Or else, you can not post for global users unless your actions are submitted (via app dashboard -> open graph) and approved.

Resources