Tuesday, February 27, 2024

400, 403, 405, 415 or XSRF check failed when sending POST to custom rest endpoint + Power automate Desktop

I need to get list of projects issues from Jira using custom rest endpoint in power automate desktop (that it (API) works fine when I call it from postman), but when I submit this dialog, it appears "XSRF check failed".



I am using the basic AUTH to get issue using the API in postman and it created successfully but when I do the same using the invoke webservice action - it gives me 403 XSRF check failed
https://domain/rest/api/latest/search

  • Adding headers: { 'X-Atlassian-Token': 'nocheck' }

  • JQL query as per the requirement in request body - Screenshot captured below

  • Click advanced setting.

    Uncheck this option if it is checked - Screenshot captured below

  • Change User Agents Header - Power Automate Desktop Screenshot captured below 
  • Whitelist/Allowlist the origin domain in Jira. When you send a request to the Jira API your browser automatically populates the "origin" header. You need to add that value to the whitelist/allowlist in Jira. -> See here: https://confluence.atlassian.com/adminjiraserver073/configuring-the-allowlist-1014667631.html Type "Domain" should work.

Resolution

To call protected APIs from external systems you can add the X-Atlassian-Token header to each request, setting the value to no-check. Adding this header to a request bypasses the server-side XSRF check and allows the request to be fulfilled and set the User Agent : "PostmanRuntime/7.30.0"

Regarding getting issues from JIRA using the action "Invoke Web Service". You can solve the issue "XSRF Check Failed" by adding following headers:

X-Atlassian-Token: nocheck
Authorization: Basic <base64>
User-Agent: PowerAutomateDesktop/1.0.0 OR User-Agent: PostmanRuntime/7.30.0



Hope this helps!

Friday, February 23, 2024

How to Send bulk Messages on WhatsApp Without Adding or saving Contact

WhatsApp provides a great communication platform for businesses and organizations. However, while it offers many features like Broadcast Lists and WhatsApp communities that make business communication easier, it doesn’t directly support sending bulk messages to numbers that aren’t saved as contacts in your phone. If you’re generating leads online and contacting them through WhatsApp, you wouldn’t save each contact on your phone, which is not only tedious but may also make your contacts list messy. So what do you do in that case?  

Method 1: Send Bulk Message Using Third Party Tools

Method 2: Using WhatsApp’s ‘Click to Chat’ Feature

WhatsApp has a ‘Click to Chat’ feature that allows users to send messages to unsaved numbers. This feature uses a URL format (https://wa.me/<number>) to open a chat window. You can then send your message to the number without saving it on your contacts. Here’s a step-by-step process to use ‘Click to Chat’ feature:

1.    Type https://wa.me/ and add the number you wish to send messages to (enter country code and the mobile number). For example, if you wish to send a message to a U.S. number (country code +91), and the mobile number is 1234567890, the URL becomes https://wa.me/911234567890

2.    Paste the URL into your web browser and hit enter.

3.    A page will appear with a ‘Continue to Chat’ option. Click it to open the chat in WhatsApp.

4.    You can now send a message without adding the number as a contact.

While this method doesn’t allow you to send bulk messages in one go by default, it’s a handy workaround for sending individual messages to multiple unsaved contacts. You can combine this method with your spreadsheet to use a formula to auto-generate the links for many people at a time. 

Put in csv and use Power automate tool to this.

Method 3: Using WhatsApp Business API

Update or edit status filed in JIRA issue

the status field is a special case and can't be updated directly, which is the second problem here. Changing a status in Jira is called ...