Elementor: How to add field value to webhook? - webhooks

How to add contact_phone field value to Elementor Pro Form widget webhook url?
I tried:
contact_phone
[contact_phone]
[field id="contact_phone"]
array["fields"]["contact_phone"]["value"]
at email templates "[field id="contact_phone"]" works fine. But all my attempts at webhook were like plain text, not field value.
form name: contact_form
field id/name: contact_phone
webhook: https://***.intrumnet.com/onlineforms?action=fillform&formtype=9&data[def_customer][phone]=array["fields"]["contact_phone"]["value"]

It isn't clear to me the exact URL of your webhook, but please try this and adjust if needed.
in the form's actions after submit, include a redirect
for the redirect URL enter webhookURL/?contact_phone=[field id="contact_phone"]

In case anyone else finds this post (as I did) when searching for a similar issue, here's the answer to this post:
Copy the shortcode from the field in Elementor Forms - it will look something like this: [field id="first_name"]
Use that to construct the webhook url. My webhook url that's working fine looks like this:
https://example.com/webhook.php?first_name=[field id="first_name"]&last_name=[field id="last_name"]&email=[field id="email"]&phone_number=[field id="phone_number"]&utm_source=[field id="utm_source"]&utm_medium=[field id="utm_medium"]&utm_campaign=[field id="utm_campaign"]&utm_term=[field id="utm_term"]&remote_ip=[field id="remote_ip"]&gclid=[field id="gclid"]
This works great, until you keep having to edit every form on your sites when you want to start collecting a new parameter! I keep searching for a way to make Elementor just add every parameter and value it finds in the current url to the webhook url. It doesn't seem possible.

Related

Github restapi: how to filter pulls requests by user?

I'm trying to use the github REST api to get pull requests by user. I've read the docs and looked for examples and can't find clear directions how to do this. The basic .../pulls url works just fine - I get back a big list of pull requests. But when I try to filter to a user the way the docs seem to say, I just back an empty array.
I have verified:
The user names I am trying are correct- I have copied them from the pulls.user.login field
The users I am trying have pulls that show up in the .../pulls output
Here is what I have tried:
These attempts always return an empty array:
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myusername
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myusername&state=all
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myuserid
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myusername#mydomain
These desperate attempts always return the same output as .../pulls with no parameters
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=myusername
[githost]/api/v3/repos/[owner]/[reponame]/pulls?user=myusername
So what is the correct way to do this?
According to the GitHub,
Every pull request is an issue, but not every issue is a pull request.
So try this to get the list of all PRs created by a specific user:
https://api.github.com/search/issues?q=author%3Agenialkartik+type%3Apr
Don't forget to replace my username 'genialkartik' with your username.
OK, I figured it out by using git's search api.
The query I used looks like this:
[githost]/api/v3/search/issues?per_page=50&q=type:pr+author:myusername
The results are little more terse than what .../pulls gives, but that's something I can work around.

Remove 'Finish Later' button from DocuSign powerform

I am using Powerform for the digital signature. I have kept the return URL in the Destination URL section. But for the Finish later URL, is there any way to identify the user who kept the form for 'Finish later'? Eg: Adding an extra parameter, email of the user filling the form. So that, the user details can be updated in my DB system one the user redirect back to my website. Or, Is it possible to remove the 'Finish Later' button from the power form?
Thanks in Advance.
In my DocuSign account, I have added custom 'Merge Fields', 'sec1_email', and dragged and kept it in the email section in the PDF. In the destination URL I have added, ''http://localhost/proj/testform/?docustatus=completed&email=[[sec1_email]]' expecting, the sec1_email will replace the email id entered by the user in the form. Then once the user submit the form and the return URL became, 'http://localhost/proj/testform/?docustatus=completed&email=[[sec1_email]]'. The URL returned the same string instead of the dynamic value email. How can I replace the custom field value 'sec1_email' which was entered in the form by the user in the URL? (In template settings, When I add the merge filed, those added fields appear in the custom fields.)
You should be able to pass a unique variable in and out of the PowerForm via URL parameters. https://support.docusign.com/en/guides/ndse-user-guide-populate-custom-document-fields-in-a-web-powerform
Essentially you would want to create a custom field on the envelope, then pass in a unique identifier via the PowerForm URL. When the PowerForm completes or someone hits Finish Later, it goes to your designated landing page. These landing pages can also have parameters passed back through them. Essentially it would go from Finish Later > http://www.yourdomain.com/landingpage?customerUserId=uniqueIdentifier.
https://support.docusign.com/en/articles/How-do-I-specify-a-URL-to-redirect-to-when-a-Powerform-is-completed

Docusign API: Searching for a given Envelope/Envelopes using Custom Field

How do we compose a get url to get an envelope or envelopes that contain a given custom field. I tried to compose a get url as one shown below but not getting the desired results (i tried to follow the documentation here -> https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges but I think i am not passing the custom field to the query string correctly
https://demo.docusign.net/restapi/v2.1/accounts/ACCOUNT_ID_NUMBER/envelopes?from_date=2019-12-05&folder_types=sentitems&status=completed&custom_field=[SignerEmail=john.doe#email.com]
You're using the right API call. Try it without the square brackets and encode the value.
Eg
... &custom_field=SignerEmail%3Djohn.doe%40email.com
The above is untested. If it doesn't work, we'll dig into it further
Important: are you trying to find envelopes that have a custm_envelop_field (metadata) that you created and you named "SignerEmail"?? If so, the the above is the way to go.
If you're looking for envelopes where a signing recipient's email is john#doe.com, try the general search as Inbar suggests. If it doesn't work, you may need another tactic.
Suggest you read here:
https://developers.docusign.com/esign-rest-api/guides/concepts/envelopes/search
the parameter is called search_text and would search everything including custom fields. There's no need to separately specify custom fields.
Something like this:
https://demo.docusign.net/restapi/v2.1/accounts/ACCOUNT_ID_NUMBER/envelopes?search_text=[SignerEmail=john.doe#email.com]

How does a Gmail message Id or ThreadId map to the new Gmail UI?

Edit: addressing the first comment below and for clarity, this isn't a code question. The question is simply:
What do I put into the URI querystring of the new Gmail UI to view a draft message created by the Gmail API?
Despite this not really being a code question, I'm asking on Stack Overflow as it's Google's preferred platform for Gmail API questions.
--
If I view a draft message in the new Gmail UI, the URI is something like this:
https://mail.google.com/mail/u/1/?zx=iij9apqgzdf4#drafts?compose=jrjtXSqXwlFGnSGCQgDCdnHGVFdlpFMgzsCNgpQstQLxdLCMkjKstBmWZkCmjhWTQnpsZCJF
I can't see any way to create such a link from the Id or ThreadId of a message created via the Gmail API.
Previously, one could do this:
https://mail.google.com/mail/u/1/?zx=ov61dxfbrcga#drafts?compose=1631caae9dbb074d
where the value of "compose" is the Id.
How can the same thing be accomplished in the new UI?
I've been encountering the same problem and have had some success in this problem, as well as some issues I still can't get past.
Good news: The new compose parameter format is some kind of "base40" encoding. I searched the Gmail source for a restricted alphabet string, and found and deobfuscated the bit of code doing this encoding/decoding: https://gist.github.com/danrouse/52212f0de2fbfe33cfc56583f20ccb74
This code includes an encode and decode function which should work for Gmail-format query parameters.
Bad news: The values that it is encoding to open draft emails do not appear to be available using the Gmail API. Specifically, they look like this:
thread-f:NEW_THREAD_ID+msg-a:DRAFT_ID -- while the draft ID is the same as it was before, the Thread ID does not appear to match any of the IDs that the Gmail API returns.
Interestingly, if you inspect the subject row in the Gmail UI, it has dataset attributes including all of both the old format and new format IDs - but it's still unclear how to get the new ones programatically.
Thanks to #frank-szilinski - he pointed out that the old format is now translated. I.e. this now works again:
https://mail.google.com/mail/ca/u/1/#drafts/1661237c4db71ace
It doesn't seem to work when the Gmail tab isn't already open, however.
Building on #kremonte gist, and #chris-wood comments, I made a rails gem that correctly creates the open-the-draft-inside-gmail URL.
It's here - https://github.com/GoodMeasuresLLC/gmail_compose_encoder
It's for the use case of "my code created a draft (prepopulated with some text, of course) and now I want to open the draft in compose mode so that my user can review it before hitting "send".
How to get the URL for a draft
If, for example you use a list request from which you get your draft objects:
{
"id": string,
"message": {
object (Message)
}
}
You can take this id and put it into a URL in this format:
mail.google.com/mail/#inbox?compose=[id]
Eg.
mail.google.com/mail/#inbox?compose=3doinm3d08932d
This will open up GMail with the relevant draft open.
I was struggling because I wanted it to work with multiple accounts. However the authuser parameter did not help.
Inserting the email address instead of the integer after the u/ component solved the problem.
https://mail.google.com/mail/u/{email_address}/#drafts?compose={message_id}
The message id is the one provided by the API.

Google Surveys -- a way to pass URL parameters into survey?

I have created a Google Survey and I want to be able to pass URL parameters into the survey so that I can track where responses are coming from. Ideally these URL parameters will be populated into the spreadsheet.
I have tried something like this:
https://docs.google.com/forms/d/HASH/viewform?src=MY_SOURCE&ref=MY_REF
However, this doesn't seem to be working.
Any help or comments appreciated!
There is no way to pass hidden information, but you can pre-fill form fields using URL parameters:
Open a form in Google Forms
In the top right, click More [...]
Choose Get pre-filled link
Fill in any answer fields you want to pre-populate
Click Submit
To send the pre-populated form to respondents, copy and send the link at the top
I came across this and decided to do the following.
Create a form
At the bottom add your own parameters (lets say user_id)
Click the triple dots on the top right to get a prefilled link
Fill the user_id parameter with user_id
Click Generate and copy the link (Bottom left)
Your link will look like this: https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364=user_id
In my case I wrote something that replaces {user_id} with the actual user id. The link looked like this: https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364={user_id}
I did a simple replace (e.g user_id = 123455) link looks like this https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364=123455 and clicking on it will fill the user_id in the form with 123455
Do this if you don't mind the users to be able to change the data (most of them don't).
I've wanted to pass through hidden information through a Google Form and came up with a little work around:
Create a new page/section (old vs new forms) on the form with the questions that you want filled. If you have multiple pages, make the hidden page the last for simiplicity.
Use the "continue to page" option on the last page/section you want visible to go to Submit.
Use the prefill tool to get the entry IDs and set up the link as you need.
When a user accesses the form through the pre-filled URL, the hidden data will be filled in on the hidden page and submitted with their other answers... Although it will be hidden from an EU standpoint.
I use this frequently for transferring data from one form to another. With the CopyDown addon to copy the formula after each form submit so that it builds the pre-fill URL, that when clicked, has just the essential questions (i.e. record number, name, etc.) to verify the info. Hit Next, then Submit!
Google Form is not allow you to pass information, you may consider use another method/flow in your system

Resources