) $location_message = $param_location + "付近にな りました" $authKey = Get-AutomationVariable -Name 'fcmApiKey' $location_message $postText=@" { "to": "/topics/all", "data": { "url": "https://www.yahoo.jp" }, "notification": { "title": "$($location_message)", "body": "近づきました" } } "@ $postBody = [Text.Encoding]::UTF8.GetBytes($postText) $headers = @{ 'Content-Type' = 'application/json' 'Authorization' = $authKey } $postText $postBody = [Text.Encoding]::UTF8.GetBytes($postText) $postUri = "https://fcm.googleapis.com/fcm/send" $Response = Invoke-RestMethod -Method POST - Headers $headers -Uri $postUri -Body $postBody $Response